Loading...
Loading...
Generate a visual diff review page (ArchitectureGrid for impacted modules + CodeDiff for hunks + Callouts for risks) from a git range, PR URL, or pasted diff. Use whenever the user asks for a PR review, diff summary, change impact analysis, or pastes `git diff` output. Requires the `hyperscribe` skill (renderer engine).
npx skill4agent add atipico1/hyperscribe hyperscribe-diffStep 0 — Preference: Before running any renderer command, perform the theme-preference resolution block from the baseskill (hyperscribe, section "Step 0"). It sets~/.claude/skills/hyperscribe/SKILL.mdand$THEME. If absent, this wrapper falls back to$MODE+studio.light
hyperscribe/CodeDiffhyperscribe/ArchitectureGridhyperscribe/Callouthyperscribegit diffgithub.com/owner/repo/pull/Nmain..HEADHEAD~5..HEADhyperscribeCodeBlockgit diff <range>gh pr diff <N> -R owner/repogh api repos/owner/repo/pulls/<N>.diff{
"a2ui_version": "0.9",
"catalog": "hyperscribe/v1",
"is_task_complete": true,
"parts": [
{
"component": "hyperscribe/Page",
"props": { "title": "Diff: <short summary>", "subtitle": "<N files, +X -Y lines>", "toc": true },
"children": [
{
"component": "hyperscribe/Section",
"props": { "id": "summary", "title": "Summary", "lead": "**What changed** and **why it matters**." },
"children": [
{ "component": "hyperscribe/Prose", "props": { "markdown": "One-paragraph summary." } },
{ "component": "hyperscribe/ArchitectureGrid", "props": {
"layout": "grid",
"nodes": [ { "id": "auth", "title": "Auth module", "tag": "modified" } ]
}}
]
},
{
"component": "hyperscribe/Section",
"props": { "id": "risks", "title": "Risks" },
"children": [
{ "component": "hyperscribe/Callout", "props": { "severity": "warn", "title": "Migration required", "body": "..." }}
]
},
{
"component": "hyperscribe/Section",
"props": { "id": "changes", "title": "Changes" },
"children": [
{ "component": "hyperscribe/CodeDiff", "props": {
"filename": "src/auth.ts",
"lang": "ts",
"hunks": [ { "before": "const x = 1;", "after": "const x = 2;", "atLine": 42 } ]
}}
]
}
]
}
]
}ProseArchitectureGridmodifiedaddedremovedCalloutCodeDiffStepList| Severity | When |
|---|---|
| Notable but benign (e.g., removes unused import) |
| Context reviewer should know (e.g., related to issue #42) |
| Behavior change callers should verify |
| Breaking change, security concern, data-loss risk |
| Celebratory (new test coverage, perf win) |
hyperscribeHS=$(for p in \
./.claude/skills/hyperscribe ~/.claude/skills/hyperscribe \
./.codex/skills/hyperscribe ~/.codex/skills/hyperscribe \
./.cursor/skills/hyperscribe ~/.cursor/skills/hyperscribe \
./.opencode/skills/hyperscribe ~/.opencode/skills/hyperscribe \
~/.claude/plugins/cache/hyperscribe-marketplace/*/plugins/hyperscribe
do [ -x "$p/scripts/hyperscribe" ] && { echo "$p/scripts/hyperscribe"; break; }; done)
if [ -z "$HS" ]; then
echo "hyperscribe renderer not found. Install with: npx skills add Atipico1/hyperscribe" >&2
exit 1
fi
mkdir -p ~/.hyperscribe/out
OUT=~/.hyperscribe/out/diff-$(date +%Y%m%d-%H%M%S).html
MODE_FLAG=""
[ "${MODE:-}" = "light" ] && MODE_FLAG="--mode light"
[ "${MODE:-}" = "dark" ] && MODE_FLAG="--mode dark"
cat <<'EOF' | "$HS" --theme "${THEME:-studio}" $MODE_FLAG --out "$OUT"
<the JSON you built>
EOF
open "$OUT"CodeBlockCodeDiffMermaidArchitectureGrid