gs-navigate-pages について
Google Scholar の検索結果ページを移動するスキルです。直前の検索コンテキストを必要とし、指定ページの結果を抽出して報告します。
主な機能
- 01次または前のページへ移動
- 02指定したページ番号へ移動
- 03検索 URL のページ指定を更新
- 04ページの検索結果を抽出して報告
活用シーン
- 01検索結果の次ページを確認
- 02前の結果ページに戻る
- 03前回の検索の特定ページを開く
MCP 対応
Chrome DevTools MCP の navigate_page ツールを使い、更新した Google Scholar URL を開きます。
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ cookjohn/ gs-skills --skill gs-navigate-pagesインストール後、Claude Code で/gs-navigate-pagesを入力して読み込まれたか確認します。
詳細
Google Scholar のページを移動する
検索結果ページを移動します。以前に gs-search または gs-advanced-search を呼び出した際のコンテキストが必要です。
引数
$ARGUMENTS には次の値を指定できます。
next— 次のページに移動しますprevious— 前のページに移動しますpage N— N ページ目に移動します
前提条件
このスキルを使うには、以前の検索のコンテキストが必要です。
currentUrl:現在の Google Scholar 検索 URLpage:現在のページ番号(1 始まり)
手順
1. 新しい URL を計算する
Google Scholar はページネーションに start パラメーターを使用します(0 始まりで、10 ずつ増加します)。
- 1 ページ目:
start=0(または省略) - 2 ページ目:
start=10 - 3 ページ目:
start=20
$ARGUMENTS に基づいて、次のように設定します。
next:newStart = currentStart + 10previous:newStart = max(0, currentStart - 10)page N:newStart = (N - 1) * 10
現在の検索 URL の start パラメーターを変更します。URL に start がない場合は、&start={newStart} を追加します。
2. 移動する
更新した URL を指定して mcp__chrome-devtools__navigate_page を使用します。
3. 検索結果を抽出する(evaluate_script)
gs-search の手順 2 と同じ抽出スクリプトを使用します。
async () => {
for (let i = 0; i < 20; i++) {
if (document.querySelector('#gs_res_ccl') || document.querySelector('#gs_captcha_ccl')) break;
await new Promise(r => setTimeout(r, 500));
}
if (document.querySelector('#gs_captcha_ccl') || document.body.innerText.includes('unusual traffic')) {
return { error: 'captcha', message: 'Google Scholar requires CAPTCHA verification. Please complete it in your browser, then tell me to continue.' };
}
const items = document.querySelectorAll('#gs_res_ccl .gs_r.gs_or.gs_scl');
const results = Array.from(items).map((item, i) => {
const titleEl = item.querySelector('.gs_rt a');
const meta = item.querySelector('.gs_a')?.textContent || '';
const parts = meta.split(' - ');
const authors = parts[0]?.trim() || '';
const journalYear = parts[1]?.trim() || '';
const citedByEl = item.querySelector('.gs_fl a[href*="cites"]');
return {
n: NEW_START + i + 1,
title: titleEl?.textContent?.trim() || item.querySelector('.gs_rt')?.textContent?.trim() || '',
href: titleEl?.href || '',
authors,
journalYear,
citedBy: citedByEl?.textContent?.match(/\d+/)?.[0] || '0',
citedByUrl: citedByEl?.href || '',
dataCid: item.getAttribute('data-cid') || '',
fullTextUrl: (item.querySelector('.gs_ggs a') || item.querySelector('.gs_or_ggsm a'))?.href || '',
snippet: item.querySelector('.gs_rs')?.textContent?.trim()?.substring(0, 200) || ''
};
});
const totalText = document.querySelector('#gs_ab_md')?.textContent?.trim() || '';
const hasNext = !!document.querySelector('#gs_n a.gs_ico_nav_next, #gs_nm a:last-child');
const currentUrl = window.location.href;
return { total: totalText, page: NEW_PAGE, resultCount: results.length, hasNext, currentUrl, results };
}
計算した値に合わせて NEW_START と NEW_PAGE を置き換えます。
4. 報告する
Page {page} for "{query}" ({total}):
1. {title}
Authors: {authors} | {journalYear}
Cited by: {citedBy}
Data-CID: {dataCid}
2. ...
{hasNext ? "More results available — ask me for the next page." : "No more results."}
補足
- このスキルでは 2 回ツールを呼び出します:
navigate_page+evaluate_script - Google Scholar はデフォルトで 1 ページあたり 10 件の検索結果を表示します
startパラメーターはページネーションのオフセットを指定します
コメント
Markdown 対応