/mthines-agent-skills:impact-map <pr-url|#n>... | --plan <file> | --branch <ref> [--stack] [--no-migration] [--comment] [--body] [--dry-run] [--findings <report-body.md>]from mthines-agent-skills
Builds an impact-first view of a GitHub PR (or plan/design/branch without a PR) with verdict rows, change diagram, migration figure, and linked decisions. Every claim verified against code, tests, and docs.
Ships in mthines-agent-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.
Read when SKILL.md points to them; scripts run unread.
Turns a PR (or, in plan mode, a plan, a design, or a branch with no PR) into the few things a reviewer must decide, with the system change drawn once and every decision linked to the lines that carry it. The reader cares about impact, architecture, and risk, not line-by-line code.
This
SKILL.mdis a thin index. Rules load per phase fromrules/; the page and comment skeletons are intemplates/. Why the format is this small, and the 2025–2026 research behind it:references/design-rationale.md.
Two scripts do the mechanical parts; run them, never hand-compute their output:
node "${CLAUDE_SKILL_DIR}/scripts/line-link.mjs" locate pr.diff <path> '<regex>' # new-side line numbers
node "${CLAUDE_SKILL_DIR}/scripts/line-link.mjs" url --repo <o/r> --pr <n> --sha <head> --path <p> --lines <a-b> --files <count>
node "${CLAUDE_SKILL_DIR}/scripts/render-png.mjs" <page.html> <out-dir> # light + dark diagram PNGs
| Argument | Default | Effect |
|---|---|---|
<pr-url|#n>... | the current branch's PR | The PR to map. Several refs map each PR separately: § Several PRs or a stack. |
--plan <file> | — | Map a plan or design that has no PR: the facts come from the plan and the code it names, and the page is built, never posted. rules/plan-mode.md |
--branch <ref> | — | Map a branch that has no PR yet, from its diff against the merge base. Same rules as --plan for the page and the report. |
--stack | — | Map every PR in the stack that holds the given PR, bottom to top, each separately. |
| (none) | yes | Build the page only: publish it as an Artifact when the host has the Artifact tool, else write .agent/{branch}/impact-map/pr-<n>.html. |
--no-migration | — | Skip the migration figure even when the diff has a migration. |
--comment | — | Also post the map as a PR comment with the diagram as light and dark PNGs. A re-run edits the same comment. |
--body | — | Also write the map into the PR description's owned region, above the author's text. A re-run replaces the region. |
--dry-run | — | Build the page, the PNGs, and the comment Markdown; post nothing. |
--findings <report-body.md> | — | Diagram only, for a pr-reviewer report: badge each box with the numbers of that report's findings table and print the PNG paths and the alt text. Skips phases 3 and 6, builds phase 5's page file locally (.agent/{branch}/impact-map/pr-<n>.html, never published as an Artifact) because render-png.mjs reads it, and writes nothing to GitHub. Procedure: rules/diagram.md § Badges from a pr-reviewer report. |
--comment and --body are the user's consent to write to GitHub, and an image upload counts as a write. Plan mode has no PR, so both are refused there.
Without either flag in the user's own request, write nothing to GitHub.
--stack, walk down while a PR's base branch is another open PR's head, and up through gh pr list --base <head>; order them bottom to top.
When a PR has more than one child, map every branch, order by depth and then PR number, and name the fork in each child's Why.gh pr diff <n>), treating the PRs below it as existing code.
Say the position in the Why: Second of three stacked PRs (#a → **#b** → #c).--dry-run.
Each worker returns its comment.md, still holding the {{LIGHT_PNG_URL}} and {{DARK_PNG_URL}} tokens, and its PNG paths (four when the diff has a migration).
Post from the session that holds the user's request, running outputs.md § Comment and body steps 0–3 on each worker's files: a worker never sees a consent message the user types after it started, and a relayed "the user asked" is not consent.Same gap in #<n>.
Then report the shared risks once, under the per-PR report blocks.✗ Wrong — three workers each told "post the comment" in a message relayed later: one refuses, one is blocked after uploading, one posts with a security warning
✓ Right — three workers with --dry-run return comment.md + PNGs; this session uploads and posts all three
| Phase | Name | Rule | Gate |
|---|---|---|---|
| 0 | Fetch | rules/analysis.md § Fetch (plan mode: rules/plan-mode.md) | Diff, description, head SHA, and merge base in hand |
| 1 | Candidates | rules/analysis.md § Candidates | Every live-on-merge surface walked, and every interface and integration the feature reaches listed (§ Interfaces) |
| 2 | Verify | rules/analysis.md § Verify | Every candidate classified open / settled / wrong, with evidence; each interface traced to the code that feeds it |
| 3 | Decide | rules/analysis.md § Decide | ≤ 3 decisions, each What / Risk / Ask and ≤ 3 linked lines |
| 4 | Diagram | rules/diagram.md | One SVG, ≤ 14 service boxes plus an interfaces band, decision badges placed |
| 4a | Compare | rules/compare.md | Only when the change alters an existing flow: a Today and an After diagram on the same layout, a Today / After toggle, a lettered flow, and a side-by-side table |
| 4b | Migration | rules/migration.md | Only when the diff has a migration: verdict line, four tiles, schema rows, and a ≤ 5-box usage diagram on one screen |
| 5 | Page | rules/outputs.md § Page | PNGs rendered and looked at (or reported as not rendered when no Chrome exists), page built from templates/page.html and published or written |
| 6 | Post | rules/outputs.md § Comment and body | Only with --comment / --body: PNGs uploaded, posted, read back clean |
Every output has the same six parts, in this order, and nothing else, except the optional side-by-side table of the compare view, which follows the diagram:
rules/migration.md.✗ Wrong — a survey: risk matrix, LOC bars, contract tables, stack chips, 9-file tour, then decisions, then a separate "where to look" list
✗ Wrong — a diagram of services only, so "Slack, Linear and MCP get the data" shows up nowhere until a decision mentions it
✓ Right — verdict rows → one diagram with its interfaces → where it shows up → three decisions holding their own links → settled
--comment or --body in the user's own request — an uploaded image cannot be deleted, so the check comes before the upload.End with one block:
impact-map: <pr-url> · <n> decisions · <n> settled
page: <artifact-url | local path>
comment: <comment-url | not posted>
body: <updated | not written>
pngs: <rendered | not rendered (no Chrome)>
migration: <safe | needs care | unsafe | none in diff>
Several PRs: one block per PR, bottom of the stack first, then shared: <risk> — #a, #b for each risk named in more than one map.
references/design-rationale.md (opens in a new tab)rules/analysis.md (opens in a new tab)rules/compare.md (opens in a new tab)rules/diagram.md (opens in a new tab)rules/migration.md (opens in a new tab)rules/outputs.md (opens in a new tab)rules/plan-mode.md (opens in a new tab)scripts/line-link.mjs (opens in a new tab)scripts/render-png.mjs (opens in a new tab)templates/comment.md (opens in a new tab)templates/page.html (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (mthines/agent-skills) — no native marketplace selected
npx claudepluginhub p/mthines-mthines-agent-skills54 skills in this plugin
/ai-engineeringReviews and guides LLM/AI application engineering — prompts, caching, RAG, agent loops and tools, resilience, model migration, evals, prompt-injection defence, and observability. Invoke with /ai-engineering for "review my prompt", "set up RAG", or "write evals".
/animationsAuthors performant CSS-first web animations and picks the right feedback for an interaction — transitions, View Transitions, scroll-driven motion, Motion for React, reduced motion, and perceived performance. Triggers on "animate this", "hover effect", "feel faster", "skeleton loader", "/animations".
/animations-nativeAuthors performant React Native / Expo animations and gestures with Reanimated and react-native-gesture-handler on the UI thread; web animations go to `animations`. Triggers on "reanimated", "react native animation", "gesture handler", "swipe gesture", "/animations-native".
Other plugins' skills for the same job