/core-skills:pr-diff-targeted-readerfrom core-skills
Reads the changed files in a PR without hitting token limits. When a PR has more than ~15 changed files, get_files overflows; this skill identifies which files are relevant to the current task (from test imports, component names, or error messages) and fetches only those via targeted get_file_contents calls.
Ships in core-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Reads the changed files in a PR without hitting token limits. get_files overflows on large PRs (>~15 files); this skill identifies the subset relevant to the current task and fetches only those.
Born from a session where get_files on PR #256 (28 changed files) returned 122k chars, exceeding the token limit and requiring 5 sequential get_file_contents fallback calls.
Required: mcp.client — GitHub MCP tools (pull_request_read, get_file_contents).
Optional: fs.read — local file fallback for branches already checked out.
Fallback: paste the PR diff manually.
get_files or pull_request_read get_diff has returned a token-limit errorArguments: $ARGUMENTS — PR number followed by optional focus hint (e.g. 256 dashboard tests).
pull_request_read get — owner, repo, pullNumber
Note: changed_files count, head.sha, head.ref, base.ref.
pull_request_read get_files directly. Done.Use pull_request_read get_files with perPage: 15 and paginate until all filenames are collected. Extract only the filename field from each entry — do not read file contents yet.
Apply the focus hint (from $ARGUMENTS or inferred from context) against the filename list using three tiers:
Tier 1 — directly named: files whose names contain the focus keywords
(e.g. focus "AnalyticsTab" matches AnalyticsTab.jsx, AnalyticsTab.test.jsx)
Tier 2 — same directory or module: files in the same directory as tier-1 hits, or files likely imported by tier-1 files
(e.g. workerContractsClient.js if AnalyticsTab.jsx imports from it)
Tier 3 — related by change type: other files of the same type/pattern as tier-1 hits likely affected by the same root cause (e.g. other tab components if one tab component is in tier 1)
Stop at tier 2 unless the task explicitly requires broader coverage. Aim for ≤ 10 files total.
For each selected file, call:
get_file_contents — owner, repo, path, ref: head.sha
Group results by tier in your response. Note how many files were skipped.
After reading, summarise:
Read <N> files (Tier 1: <n>, Tier 2: <n>, Tier 3: <n>). Skipped <M> unrelated files.
Then present the file contents in relevance order, starting with the files most likely to contain the root cause.
Input: /pr-diff-targeted-reader 256 AnalyticsTab dashboard tests
Output:
PR #256: 28 changed files. Fetching targeted subset.
Tier 1 (directly named): AnalyticsTab.jsx, AnalyticsTab.test.jsx, dashboard-findings.test.jsx
Tier 2 (same module): workerContractsClient.js, ContextCostTab.jsx, ConfigTab.jsx
Read 6 files. Skipped 22 unrelated files.
Then file contents follow in tier order.
Input: /pr-diff-targeted-reader 254
Output:
PR #254: 3 changed files. Reading all files directly.
Uses get_files and reads all three.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
35 skills in this plugin
/autoresearchAutonomously optimise any skill by running it repeatedly, scoring outputs against
binary evals, mutating the prompt, and keeping improvements. Based on Karpathy's
autoresearch methodology.
Use when: "optimise this skill", "improve this skill", "run autoresearch on",
"make this skill better", "self-improve skill", "benchmark skill", "eval my skill",
"run evals on". Outputs: an improved SKILL.md copy, a results log, and a changelog
of every mutation tried.
/changelogWhen to useGenerate structured changelog entries from git history, grouping commits by conventional prefix and flagging breaking changes./npx claudepluginhub internet-dot/ai-config-os --plugin core-skills