skill · built into metaphor
/ai-pr
Budgeted whole-PR critique via the pr subagent — map diff, evidence findings, return a pr_review_draft for the Agent Review canvas
- Built in
- Slash command
you ›/ai-pr
metaphor ›Loaded the ai-pr skill. What should I work on?
What the agent is told
This is the skill's SKILL.md, exactly what Metaphor reads before the task.
Use when the ask is a pull request / branch review in chat (not a CI-only ask).
Prefer to delegate: task({ subagent_type: "pr", description, prompt }) runs the ladder in the background; await_subagent before you answer. Then call pr_review with the child's pr_review_draft so the Agent Review canvas opens — the human edits and publishes from there.
Structured Agent Review (/review @pr:N or the Agent Review CTA) already attaches the PR package — do not review on the primary. First turn: spawn pr (and security / a perf pr when those skills are active) in parallel, await_subagent, then one pr_review. Pass @state/pull-requests/pr-N/ so children skip gh pr diff and test suites.
Ladder (inside the pr subagent)
- Scope — pin PR number / repo / branch before reading the diff.
- Map — on-disk package (
summary.json,all.diff,files/) when the parent names it; otherwisegh pr view+gh pr diff. Never run test suites. 2b. Graph — callcode_graph({ action: "review" })after MAP (pass paths when known). Useimpactfor blast radius before walking more ofall.diff. Fall back to grep/read if status is unavailable/skipped. - Checks — skip when a package was provided; otherwise one
gh pr checksfor context. CI-only asks belong toci. - Critique — correctness, boundaries, blast radius, contracts, tests; prefer graph hotspots, then targeted
read/grepon tip when available (notdiff_only). - Evidence — path + lines + short snippet per concrete finding.
- Conclude — Verdict prose +
pr_review_draftJSON for the parent.
Parent handoff
After await_subagent returns a draft:
- Call
pr_reviewonce with that payload (canvas opens). - Keep the chat reply to one line — do not paste the full review into chat.
- Do not post to GitHub from the agent.
Budget
Cap at about 12 bash/gh calls. Batch independent calls in the same turn. Large diffs spill under @state/tool-output/ — aggregate; never paste the full diff.
Agents that use it
Questions
What is the ai-pr skill?
Budgeted whole-PR critique via the pr subagent — map diff, evidence findings, return a pr_review_draft for the Agent Review canvas
How do I use ai-pr in Metaphor?
It is built into Metaphor. Type /ai-pr in the composer, or describe the task and the agent loads the skill when it fits.
What is a skill?
A skill is a set of written instructions the agent reads before it starts a kind of task. It changes how the agent works, not what it is allowed to do.
More built-in skills
- /ai-ciSkillBudgeted investigation of failed GitHub Actions / PR checks — bootstrap annotations first, then failed logs, localize to code, classify flake vs real vs infraships with metaphor
- /ai-securitySkillBudgeted security and AI-agent risk review — ai_security scan, OSV CVE/GHSA lookups, OWASP LLM/MCP/Top10 tagging, draft for Agent Review canvasships with metaphor
- /ai-sreSkillBudgeted production investigation against connected observability/logs MCP servers — scope, resolve schema, query, correlate, conclude with evidenceships with metaphor
- /boardSkillHow to work on the shared Board canvas — when to use it, locking onto one board, teaching with drawings, tool choice, placement, camera, narration and the…ships with metaphor
- /board-designSkillDesign language for the Board canvas — layout grid, hierarchy, roles and colour, typography, arrows, frames and patterns for common diagram typesships with metaphor
- /browser-debugSkillReproduce and diagnose a front-end bug in the Browser tab using the page snapshot and console errors.ships with metaphor