cookjohn/sd-skills · Archived

sd-navigate-pages

Navigate pages, change sort order, or adjust results per page on ScienceDirect search results.

First seen Mar 5, 2026

Installation

$ npx skills add cookjohn/sd-skills --skill sd-navigate-pages

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from cookjohn/sd-skills.

npx skills add cookjohn/sd-skills

Browse all from cookjohn/sd-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 54
License MIT
Default branch master
Open issues 0
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,238 B
  • docs SUMMARY.md 119 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 15 installs

SKILL.md

ScienceDirect Pagination & Sorting

Navigate between result pages, change sorting, or adjust results per page.

How pagination works

ScienceDirect uses URL parameters for pagination:

  • offset — starting result index (0-based). Default is 0 (page 1).
  • show — results per page. Options: 25, 50, 100.
  • sortBy — sort order. date for newest first; omit for relevance.

Page calculation: page Noffset = (N - 1) * show

Steps

Step 1: Determine current state

Use evaluate_script to read the current URL and pagination info:

() => {
  const url = new URL(window.location.href);
  const params = Object.fromEntries(url.searchParams);
  const pageInfo = document.querySelector('.Pagination li:first-child')?.textContent?.trim() || '';
  const totalText = document.querySelector('.search-body-results-text')?.textContent?.trim() || '';
  return { params, pageInfo, totalText, currentUrl: window.location.href };
}

Step 2: Build target URL

Based on $ARGUMENTS, modify the URL parameters:

User intent Action
"next" / "下一页" offset += show
"prev" / "上一页" offset -= show (min 0)
"page 3" / "第3页" offset = (3-1) * show
"sort by date" / "按日期排序" add sortBy=date
"sort by relevance" / "按相关性排序" remove sortBy
"show 100" / "每页100条" set show=100, reset offset=0

Step 3: Navigate and extract

Use navigate_page to the new URL. Always include initScript to prevent bot detection:

initScript: "Object.defineProperty(navigator, 'webdriver', {get: () => undefined})"

Then extract results using evaluatescript with built-in waiting (same as sd-search). Do NOT use waitfor — it returns oversized snapshots.

Notes

  • Always preserve existing query parameters (qs, tak, authors, etc.) when modifying pagination/sort.
  • When changing show, reset offset to 0 to avoid out-of-range pages.
  • Maximum 2-3 tool calls per operation.