ui-json-capture
БесплатноЗапускает вложенные скриптыНе проверенUse when the user asks to 'scrape Lex Machina', 'capture Bloomberg Law results', 'get all the search results', 'export more than the row cap', 'the export…
от edwinhu★ 28 звёзд на GitHubОб этом скилле
Capturing paginated JSON from an authenticated research UI
What this skill carries — grep references/ for any subject the names below miss:
!d=${CLAUDE_SKILL_DIR}; command -v skill-toc >/dev/null 2>&1 && exec skill-toc "$d"; s=$HOME/.claude/skills/plugin-utils/bin/skill-toc; [ -x "$s" ] && exec "$s" "$d"; echo "(skill-toc unavailable: references and scripts are NOT listed here — install the plugin-utils plugin, or start a new session so its bin/ reaches PATH)"
Drive the user's logged-in browser over CDP, hook XMLHttpRequest, click through the result
pages, and keep the JSON the page already received. No direct API calls, no credential handling,
no fighting the export cap.
Decide the access route BEFORE touching anything
Systematic capture of a paid research corpus is the user's decision to make knowingly, not yours to slide into. Surface the trade-off once, in plain terms, then do what they decide.
LexisNexis, Bloomberg and Thomson Reuters terms prohibit systematic downloading; the export row cap is that prohibition's enforcement mechanism, and paging the XHR endpoint routes around it. The exposure — account termination, an institutional licence, a research programme — lands on the user, not on you.
Say it once and move on. Repeating it after they decide is not caution, it is nagging, and it wastes the turn they already spent answering.
Two routes make the question moot and are worth naming in the same breath, because they are often available and nobody thinks of them: these vendors sell API access as a contract line, and they grant academic bulk agreements. Either produces a citable, reproducible dataset. A scrape does not.
Check whether you need to page at all
A single response usually carries the facet counts. Before capturing 667 pages to count
things, read the facets in page one. The Lex Machina response that answered "how many derivative
suits are there" carried de-dcc-case_tag (12 terms), de-dcc-case_type (15 terms) and a
filed_on year histogram — every count the question needed, from one ordinary page load.
Then check whether a filtered slice fits under the export cap. Lex Machina caps exports at 1,000 rows, but annual filings ran 932–1,510, so year-by-year exports were under the cap for every year but one. Fourteen sanctioned exports beat one unsanctioned scrape.
Page only when you need per-record fields across a population that will not slice under the cap.
Procedure
Load the browser-automation skill first — it owns port/prefix selection. Use the interactive
browser (9222 / mcp__chrome-devtools__* on Linux), because the session must be logged in.
- Find the JSON. With the results page open,
list_network_requestsfiltered toxhr/fetch, thenget_network_requeston the one whose response isapplication/json. Often it is the same URL as the page, differing only by anX-Requested-With: XMLHttpRequestrequest header. Save the body withresponseFilePathand read its shape — you need the array field, the offset field, the total, and the page size. - Install the hook —
scripts/01-install-hook.js, after editing the three site-specific lines it flags (URL test, array field, offset field). - Smoke-test 4 pages before committing to the run. Confirm offsets advance and
errorsis empty. - Start the pager —
scripts/02-run-pager.js. It returns immediately by design. - Poll and drain —
scripts/03-status.jsto check,scripts/04-dump.jsto write a batch, passingfilePath. Drain every few hundred pages. - Stop —
scripts/05-stop.js, or let it end on the disabled Next button. - Assemble and prove it —
scripts/assemble.py. Its non-zero exit is the gate.
python3 "${CLAUDE_SKILL_DIR}/scripts/assemble.py" \
--batches scratch/capture --glob 'batch_*.json' --out data/raw/cases.jsonl \
--expect-total 16670 --page-size 25 --id-field id --first-page scratch/page0.json
Capture Facts
evaluate_scriptdies at the CDPprotocolTimeout(~120 s) but the in-page loop keeps running. A 50-page awaited batch returnedRuntime.callFunctionOn timed outwhile the page went on to capture 20 more. Awaiting a long loop therefore reports failure for work that succeeded — you lose the return value, not the data. Detach and poll; that is why02-run-pager.jsreturns immediately.- Route the payload to disk with
filePath, never through the return value. 16,670 records was 258 MB. Returning that inline would blow the context window for zero benefit — the model never needs to see the rows, only the integrity counts. filePathis restricted to configured workspace roots. A path under a symlinked data directory resolving outside them fails withAccess denied … not within any of the configured workspace roots. Write into the repo (e.g. `scra
Установить ui-json-capture в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл ui-json-capture?
Use when the user asks to 'scrape Lex Machina', 'capture Bloomberg Law results', 'get all the search results', 'export more than the row cap', 'the export only gives me 1,000', 'pull the whole docket', 'grab every page of results', 'capture the JSON behind this page', 'page through this site and save the data', or wants the full result set out of an authenticated research UI (Lex Machina, Bloomberg Law, Westlaw, Docket Alarm, UniCourt) whose export is capped or absent. Also use when a site's results are clearly JSON-backed but there is no documented API.
Как установить скилл ui-json-capture?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ui-json-capture запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic