Imported from yandy-r/claude-plugins (
.cursor-plugin/skills/visual-recap/SKILL.md). Install upstream withnpx skills add yandy-r/claude-plugins --skill visual-recap. Copyright stays with the author.
Visual Recap (LOCAL-ONLY)
/visual-recap builds a visual plan from a diff, not toward one. It is the
reverse of forward planning: instead of describing the change you are about to
make, you describe the change that was just made, at a higher altitude than
line-by-line review. Schema, API, file, and architecture changes become the same
data-model, api-endpoint, file-tree, and diagram blocks a forward plan
would use, only now they summarize work that exists. A reviewer scans the shape
of the change before spending attention on the literal lines.
LOCAL-ONLY mandate — read this first
This ycc port inverts the upstream BuilderIO
visual-recapskill. Upstream ALWAYS publishes the recap to the hosted Agent-Native Plan database and FORBIDS inline output ("a recap's entire value is the hosted plan"). This skill does the opposite. It is permanently pinned to local-files mode and MUST NOT regress to any hosted Plan create tool.
Hard rules for this skill:
AGENT_NATIVE_PLANS_MODE=local-filesprefixes every Agent-Native runtime command. Do not rely on a process-wide export. The recap never writes to the hosted Plan database.- NEVER call a hosted Plan create/publish tool. The hosted recap-create tool,
create-visual-plan,import-visual-plan-source,update-visual-plan,patch-visual-plan-source,get-plan-feedback,export-visual-plan, andset-resource-visibilityare all disabled in this skill. They are listed only to be explicitly excluded — do not invoke them. - The ONLY permitted Plan application request is the pinned block-catalog CLI command
(
env AGENT_NATIVE_PLANS_MODE=local-files npx -y @agent-native/core@0.59.1 plan blocks --out <path>). It carries no recap content. Do not call theget-plan-blocksMCP tool; local-files mode does not register an MCP server.npxmay contact the npm registry to resolve that exact package version, but it must never send plan or recap content. - The deliverable is local MDX under
docs/prps/reviews/visual/<slug>/, served via the localhost bridge (env AGENT_NATIVE_PLANS_MODE=local-files npx -y @agent-native/core@0.59.1 plan local serve --open, 127.0.0.1, ephemeral port). There is no hosted link and no shareable URL. - Diffs are sourced through the shared collector
${CURSOR_PLUGIN_ROOT}/skills/_shared/scripts/visual-recap-collect.sh, which uses local git refs only — so it behaves identically against the publicgithubremote and the private Forgejoorigin(no vendor PR API, no hardcoded host or trunk branch).
For the pinned @agent-native/* install, the localhost-bridge command surface,
the hosted-only MCP connector, and the hosted-egress policy, read — do not duplicate —
${CURSOR_PLUGIN_ROOT}/skills/_shared/references/agent-native-setup.md.
When to use
Build a recap when a change is large, multi-file, or touches schema, API contracts,
or architecture, and a reviewer would benefit from seeing the change mapped to
structured blocks before reading the raw diff. Skip it for small, single-file, or
obvious diffs when choosing proactively — a recap is review overhead, and a tiny
change reviews faster as plain diff. An explicit visual-recap or
/visual-recap invocation overrides this heuristic; honor the request.
Phase 0 — Collect the diff (remote-agnostic, local refs only)
Drive the shared collector with $ARGUMENTS. Invoke it directly, then retain the
absolute path printed on stdout as the resolved bundle path:
# (none) → tracked working-tree diff vs HEAD
# <base>..<head> → explicit range
# <branch> → branch as head; base = merge-base against tracked upstream
${CURSOR_PLUGIN_ROOT}/skills/_shared/scripts/visual-recap-collect.sh $ARGUMENTS
The collector writes a bundle under docs/prps/reviews/visual/<slug>/:
diff.patch— full unified diff (local refs only)files.txt— changed-file name listmetadata.txt— range / base / head / remote provenance (every remote URL viagit remote get-url, never a hardcoded host)
The printed path is the slug directory the recap MDX is written into.
Read diff.patch and files.txt to ground every block. Print the resolved
range and remote provenance from metadata.txt before authoring so it is obvious
which refs the recap covers. If both diff.patch and files.txt are empty, stop
and report that there are no tracked changes to recap; do not author an empty
artifact.
Phase 1 — Scope the work unit
Default scope is the whole change in the collected range, not only the most recent edit. Separate the changes that belong to this work unit from unrelated pre-existing dirty work. If the scope is genuinely ambiguous, state the assumption or ask a concise question before authoring.
Make a short surface/state inventory from the diff before writing any block: changed routes, components, popovers/dialogs, role/access states, empty/error/loading states, and shared abstractions. The final recap must either represent each meaningful item with a block or intentionally omit it as tiny/redundant/not-user-visible.
Phase 2 — Fetch the block catalog (the one permitted network call)
GOTCHA: The MDX block vocabulary drifts upstream between releases. Do NOT author from memorized JSX tags — they silently produce wrong tags that error on import.
Before writing any structured MDX, invoke mktemp and retain the absolute path
printed on stdout. Substitute that resolved temp path in the catalog command;
do not rely on shell-variable persistence across tool calls:
env AGENT_NATIVE_PLANS_MODE=local-files npx -y @agent-native/core@0.59.1 plan blocks --out <resolved-temp-path>
Read that file first. The command calls the public no-auth block-catalog route and sends no recap content. If the pinned package is unavailable from cache or the registry, stop with the setup error; do not guess tags or register a fallback MCP.
Author every block against the tags and schemas that call returns. The catalog is temporary runtime data, not part of the recap bundle; do not commit it.
Phase 3 — Map the diff to blocks
Derive every structured block mechanically from the real diff (real paths, real fields, real method/path, real before/after text). The names below are CONCEPTUAL block types; resolve each to its exact tag + props via the fetched temporary catalog.
- Schema / migration change →
data-modelfor the resulting entities, fields, and relations. Flag each field/entity withchange: "added" | "modified" | "removed" | "renamed"; for a changed type setwasto the prior value. The diff-awaredata-modelis the headline; add a splitdiffof literal SQL only when the exact statement still matters. - API / action / route change →
api-endpointwith the post-change method, path, params, request, and responses. Flag each changed param/response withchange(andwaswhen a type/shape changed); setchangeon the endpoint root for a wholly added or removed route; mark removed routesdeprecated: true. Author each request/response example as a single valid JSON value. - Files added / removed / renamed →
file-treewith each entry'schangeflag (added,removed,modified,renamed) and a shortnote. - Any meaningful code hunk →
diffwith split view as the default (mode: "split"), carrying the realbefore/aftertext plusfilename/language. Give everydiffa one-linesummary; attach a few high-signalannotationsto the key files. Reservemode: "unified"for a genuinely narrow standalone hunk. Group the key files under a## Key changesheading in a single horizontaltabsblock (one file per tab) so the selected split diff gets full document width. - Brand-new file with no meaningful "before" →
annotated-coderather than a one-sided splitdiff. - Rendered UI / interaction change →
wireframeblocks (see below) showing the visible delta before any code. - Architecture or data-flow shift →
diagram(data.html/data.csstwo-panel before/after, layered, or swimlane; ormermaidfor a quick graph). Use--wf-*theme tokens and.diagram-*primitives — never hex, rgb/hsl, orfont-family. Do not usediagramas a stand-in for rendered UI; UI changes needwireframe. - Outcome-first narrative →
rich-textfor the "what changed and why": the objective, key decisions visible in the diff, and risks. This is the only place the model writes freely.
Canonical shape
A strong recap follows one skeleton, top to bottom:
- UI-impact headline — wireframes first, when the diff changed rendered UI.
- Short outcome narrative (
rich-text): what changed and why, 1–3 paragraphs. data-model/api-endpointblocks for schema and contract changes.file-treeof the changed files withchangeflags.## Key changes— one horizontaltabsblock ofdiff/annotated-code(3–8 focused tabs; prefer under ~150 lines per tab).
Keep the body lean: no boilerplate intro/disclaimer/provenance prose. Add prose only when it tells the reviewer something the structured blocks do not.
UI impact requires wireframes (MANDATORY)
When the diff changes rendered UI, layout, density, visual state, interaction
affordances, navigation, controls, menus, dialogs, or design tokens, the recap MUST
include one or more wireframe blocks. Prose and file diffs are not a substitute for
showing what changed visually.
Before authoring ANY wireframe, read
${CURSOR_PLUGIN_ROOT}/skills/visual-recap/references/wireframe.md in full — it is the
single source of truth for HTML wireframe quality (.wf-* classes, [data-icon] Tabler
set, surface presets, --wf-* tokens, before/after comparability, skeleton states).
Do not author wireframes from memory. Show the changed entry point, the main changed
interaction surface, and the resulting/destination state; for UI-heavy changes a single
before/after of the entry surface is not enough.
Phase 4 — Write and serve the local recap
Write the recap as a local MDX folder inside the collected bundle directory:
docs/prps/reviews/visual/<slug>/plan.mdx(required), optionalcanvas.mdx, and optional.plan-state.json. Setkind: "recap"andlocalOnly: truein the source frontmatter/state.
Validate, then serve via the localhost bridge:
env AGENT_NATIVE_PLANS_MODE=local-files npx -y @agent-native/core@0.59.1 plan local check --dir <resolved-bundle-path>
env AGENT_NATIVE_PLANS_MODE=local-files npx -y @agent-native/core@0.59.1 plan local serve --dir <resolved-bundle-path> --kind recap --open
Run serve with the host's long-running-process support, capture its first localhost
URL, and keep the bridge process alive without relaying incidental CLI logs as result
output. It binds 127.0.0.1 on an ephemeral CLI-chosen port, performs no DB writes
and sends no recap content to any server, and renders the on-disk MDX through the
localhost bridge. Report the URL from stdout (or <slug>/.plan-url, a local token file —
do not commit it). The URL is not shareable across machines.
Treat review feedback as file/chat feedback: edit the MDX directly, rerun the pinned local check and serve commands above, and report the new local bridge URL. Hosted comments, sharing, screenshots, and PR sticky-comment publishing are intentionally unavailable.
Grounding & security
- Grounding rule.
diff,data-model,api-endpoint, andfile-treeblocks must be built mechanically from the real changed lines — never inferred, rounded, or invented. Mark anything the model inferred (not extracted) as inferred in prose. When the diff does not contain a fact, leave it out. - Never transcribe secrets. A diff can contain API keys, tokens, webhook URLs,
signing secrets, or
.envvalues. Never copy these into any block, snippet, caption, or note — redact them (sk-•••). This mirrors the repo's hardcoded-secret rule. - No egress. This skill performs no hosted upload. The shared
${CURSOR_PLUGIN_ROOT}/skills/_shared/scripts/visual-egress-guard.shexists for the consent-gated hosted path used byvisual-plan; it is NOT invoked here because this recap never leaves the machine.
Output
- Local MDX recap under
docs/prps/reviews/visual/<slug>/(plan.mdx+ bundle). - A
127.0.0.1localhost-bridge preview URL printed to stdout. - No hosted link, no shareable URL, no PR comment, no GitHub/Forgejo Action.
Related
visual-plan— forward planning; faithful hosted+local MDX workflow with consent-gated egress. Shares the wireframe quality bar word-for-word.${CURSOR_PLUGIN_ROOT}/skills/_shared/references/agent-native-setup.md— runtime contract (install pin, connector, bridge, egress policy).