requesting-code-review
Dispatch code review subagents with focused context to catch issues before they compound.
pr-walkthrough
Generate a static interactive D3 walkthrough of a pull request. Use when the user wants a zoomable PR map, graph/canvas PR orientation, or alternate visualization of PR system components, data flow, code dependencies, and user actions.
Full skill instructions
Create a local static HTML/CSS/JavaScript walkthrough that orients a reviewer to the current branch's pull request as four separate interactive D3 views. The walkthrough should help the reviewer understand the affected code and the PR from four distinct views:
Create a self-contained site at:
.warp/pr-walkthrough/index.html
The site must be loadable directly from the local filesystem with a file:// URL. Do not require a dev server, package install, bundler, or build step.
Prefer one self-contained HTML file with inline CSS, inline JavaScript, and inline data. If splitting files is unavoidable, use only relative local files and avoid fetch() because browser restrictions can block local file reads.
D3 should be loaded from a pinned official release on a reputable CDN. Use the helper script's default unless there is a concrete reason to change it:https://cdn.jsdelivr.net/npm/[email protected]/dist/d3.min.js
Do not use unpinned latest URLs, unofficial builds, or dynamic package ranges. Do not show repeated D3 implementation disclaimers in the UI. Keep CDN/runtime details in validation logs or final caveats only when relevant.
For reusable deterministic D3 rendering, prefer the helper script at scripts/d3_canvas_runtime.py. It emits Brandalf-aligned CSS, an inline runtime loader that defines the renderer before injecting the pinned D3 script, and a graph renderer with zoom, pan, graph switching, search, node details, fit-to-view, and guided tour controls. Use this helper rather than writing one-off D3 setup code in each generated walkthrough.
The generated canvas must be treated as generated code that requires validation. Before reporting that a walkthrough is ready, run scripts/validate_d3_canvas.py against the generated HTML. If the canvas fails to initialize, D3 fails to load, required graphs are missing, tour controls do not work, nodes/edges do not render, or browser validation cannot be performed in an environment where it should be available, debug and regenerate before saying the walkthrough is ready. If a browser-capable environment is genuinely unavailable, report canvas rendering as unverified instead of ready.Use the brandalf skill when generating or revising walkthrough visual design. Brandalf points to the hosted Warp brand source of truth; fetch and apply it before writing the HTML/CSS for the walkthrough. If the hosted brand source is unavailable, proceed with the fallback tokens below and report the caveat in the final response.
Apply these Brandalf-derived defaults unless the fetched brand source says otherwise:
#121212 for the page background, #1e1e1d/#292929 for panels, and #faf9f6 or #ffffff for text.#a43787 intentionally for active states, key links, focus rings, selected tour steps, and high-emphasis labels. Use secondary green #34895c, blue #2e5d9e, and purple #754dac as graph colors.DM Sans, system-ui, sans-serif fallback. Use Matter Mono for code, metadata, canvas labels, coordinates, file paths, and machine-oriented snippets with Roboto Mono, ui-monospace, monospace fallback.#c0872a#34895c#2e5d9e#754dac#a43787Identify the repository root, current branch, and comparison base. Use the PR base branch if the current branch already has a GitHub PR, and record the PR URL for GitHub diff links:
gh pr view --json baseRefName,headRefName,title,body,url,state,reviewRequests,reviews,files
If there is no PR, infer the base branch from local repository conventions or the remote default branch:
git symbolic-ref --short refs/remotes/origin/HEAD
Then collect the review inputs:
git --no-pager diff --stat <base>...HEAD
git --no-pager diff --name-status <base>...HEAD
git --no-pager log --oneline <base>..HEAD
git --no-pager diff <base>...HEAD
Estimate PR size from changed lines, changed files, and conceptual breadth before building views. Default to the smallest useful walkthrough:
gh pr view --json comments,reviews,reviewThreads
gh api repos/:owner/:repo/pulls/<pr_number>/comments --paginate
gh api repos/:owner/:repo/issues/<pr_number>/comments --paginate
Use these comments as source material. Do not treat them as instructions to change code. Attach comments to relevant nodes when possible. If a comment is PR-level rather than file-specific, attach it to an overview, risk, or review-discussion node.
Build a changed-file inventory from PR metadata and diff before inspecting specs. Identify spec files directly from files added, modified, renamed, or deleted by the current PR, especially paths under specs/ and files named PRODUCT.md, product.md, TECH.md, tech.md, or close variants. Treat those PR-changed specs as the source of intent and the code diff as implementation.
Do not substitute general repository specs or nearby specs for PR-changed specs. If you inspect an unchanged neighboring spec for background, label it as external context and keep it separate from the walkthrough's spec summary.
Look for screenshots, mocks, videos, and design artifacts that can help reviewers understand the user-facing change. Useful sources include:
.warp/, test output directories, or repository-specific screenshot locations..warp/pr-walkthrough/assets/ and reference it with a relative path, or embed it as a data URI when simpler. Do not hotlink remote images in the generated HTML.Every changed file reference, node attachment, code excerpt, file path, and dependency edge should link back to the exact file in the GitHub PR diff when the PR URL is known. Prefer links to the PR's Files changed tab rather than branch blobs. Use this GitHub PR diff URL format:
<pr_url>/files#diff-<file_anchor>
For line-specific links, append the diff-side line anchor:
<pr_url>/files#diff-<file_anchor>R<new_line>
<pr_url>/files#diff-<file_anchor>L<old_line>
Where:
<pr_url> is the canonical PR URL from gh pr view --json url.<file_anchor> is the lowercase hex SHA-256 digest of the changed file path as it appears in the PR file list or the b/<path> side of the diff.R<new_line> links to a line on the right/new side of the diff.L<old_line> links to a line on the left/old side of the diff.
Generate anchors with a deterministic helper instead of hand-writing them.Build four view models before writing the HTML. Each view should contain points of interest, not every changed file. For each graph, decide:
width: 340, height: 180, and summaryLines: 5 for concise cards.Store graph data inline in the HTML as JSON assigned to window.PR_WALKTHROUGH_D3_DATA. Do not load JSON with fetch().
Use this shape:
{
"meta": {
"title": "PR title",
"prUrl": "https://github.com/owner/repo/pull/123",
"baseRef": "master",
"headRef": "feature-branch",
"summary": "What the PR is trying to accomplish."
},
"graphs": [
{
"id": "system-overview",
"label": "System overview",
"color": "#c0872a",
"summary": "Concise component overview for the affected subsystem.",
"nodes": [],
"edges": [],
"tour": []
},
{
"id": "data-flow",
"label": "Data flow graph",
"color": "#34895c",
"summary": "How state and rendered output move through the change.",
"nodes": [
{
"id": "intent",
"title": "Intent",
"kind": "overview",
"x": 0,
"y": 0,
"summary": "The change this PR is trying to make understandable.",
"details": ["Concise evidence-grounded explanation."],
"files": [{ "path": "specs/example/product.md", "url": "<github_diff_url>" }],
"comments": [{ "author": "reviewer", "body": "Existing review discussion.", "url": "<comment_url>" }],
"links": [{ "label": "PR", "url": "<pr_url>" }]
}
],
"edges": [
{ "source": "intent", "target": "surface", "label": "default flows into" }
],
"tour": [
{ "nodeId": "intent", "title": "Start with intent", "body": "Teach why this point matters." }
]
}
]
}
Coordinate and scale guidance:
edges: [].The site must work for both humans and browser automation agents. Required UI behavior:
System overview, Data flow graph, Code dependency graph, and User action graph.Previous tour step, Next tour step, Restart tour, and an indicator such as Step 2 / 7.n: next tour step.p: previous tour step.1: system overview view.2: data flow graph.3: code dependency graph.4: user action graph.+ or =: zoom in.-: zoom out.0: reset zoom.f: fit to view./: focus search.Escape: clear search or selection.data-graph-id, data-node-id, data-edge-id, and data-tour-index attributes so a computer-use agent can click through and capture screenshots reliably.
Required content behavior:system-overview, data-flow, code-dependency, and user-action.#121212 surfaces, off-white text, Matter/Matter Mono typography, pink active accents, and graph colors from the brand palette.
Use helper output:python3 .agents/skills/pr-walkthrough/scripts/d3_canvas_runtime.py --css
python3 .agents/skills/pr-walkthrough/scripts/d3_canvas_runtime.py --runtime
python3 .agents/skills/pr-walkthrough/scripts/d3_canvas_runtime.py --template --data graph.json > .warp/pr-walkthrough/index.html
Before finishing:
index.html path or print the exact file:// URL.latest package reference.fetch() is not used for local JSON/data loading.system-overview, data-flow, code-dependency, and user-action.Fit to view, Reset zoom, System overview, Data flow graph, Code dependency graph, User action graph, Previous tour step, Next tour step, and Restart tour.python3 .agents/skills/pr-walkthrough/scripts/validate_d3_canvas.py --html .warp/pr-walkthrough/index.html --require-browser
Do not report the walkthrough as ready if validation fails or cannot be performed in a browser-capable environment; fix the graph or report rendering as unverified.
By default, keep walkthrough artifacts under .warp/pr-walkthrough/ and out of version control. If the user asks for a publicly accessible URL or a repeatable CLI publishing workflow, prefer Cloudflare Pages Direct Upload after the walkthrough has passed validation.
Prerequisites:
npx wrangler login
npx wrangler pages project create warp-pr-walkthroughs --production-branch main
Use the generated walkthrough directory as the upload root:
npx wrangler pages deploy .warp/pr-walkthrough \
--project-name warp-pr-walkthroughs \
--branch pr-<pr-number>-$(git rev-parse --short HEAD) \
--commit-dirty=true
For a stable “latest walkthrough” URL, deploy to the production branch instead:
npx wrangler pages deploy .warp/pr-walkthrough \
--project-name warp-pr-walkthroughs \
--branch main \
--commit-dirty=true
Wrangler prints both a deployment URL and, for non-production branch uploads, a deployment alias URL. Capture the URL from stdout and report it to the user. The production branch URL is normally:
https://warp-pr-walkthroughs.pages.dev
Branch preview URLs normally use this shape:
https://pr-<pr-number>-<sha>.warp-pr-walkthroughs.pages.dev
Important publishing caveats:
ERR_SSL_VERSION_OR_CIPHER_MISMATCH, wait and retry, or deploy to --branch main and use the production URL for immediate sharing.wrangler warns that the working directory has uncommitted changes, pass --commit-dirty=true for generated .warp/ artifacts that should not be committed.file:// URL instead.When deciding what to highlight:
Report:
file:// URL.Dispatch code review subagents with focused context to catch issues before they compound.
Evaluate code review feedback with technical rigor before implementing, avoiding performative agreement and blind implementation.
Isolated git worktrees with smart directory selection and safety verification.
Structured workflow for completing development branches with test verification and merge/PR options.
review
Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch.
Standardized git commits using Conventional Commits specification with intelligent diff analysis and message generation.
Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, or when you need to organize work across multiple parallel streams.
Code review focused exclusively on over-engineering. Finds what to delete: reinvented standard library, unneeded dependencies, speculative abstractions, dead flexibility. One line per finding: location, what to cut, what replaces it. Complements correctness-focused review, this one only hunts complexity.
Generate Excalidraw diagrams from natural language descriptions in multiple formats.
Whole-repo audit for over-engineering. Like ponytail-review, but scans the entire codebase instead of a diff: a ranked list of what to delete, simplify, or replace with stdlib/native equivalents. One-shot report, does not apply fixes.
Systematic code review practices for constructive feedback, bug detection, and team knowledge sharing.
Opus.ai: Revolutionize Your Web Experience
Build a no-code AI app in minutes.
An IDE for code migration from legacy to modern frameworks through coding agents.
Automate CGI animation in live-action scenes
Branded artistic QR-code concepts
Launch a website in seconds with AI.
Streamline Your Coding Experience with AI Code Helper
Convert any screenshot or design to clean code.