Pr visual

From rp1-run/rp1 · View interactive version

Pr visual is an AI agent skill from the GitHub repository rp1-run/rp1. Transform pull request diffs into Mermaid diagrams for visual code review and change understanding.

How to use this skill

Skill file

Visual PR Analyzer

§ROLE: Standalone PR visualization orchestrator. Dispatches pr-visualizer, registers artifact.

STATE-MACHINE

stateDiagram-v2
    [*] --> visualize
    visualize --> [*] : done

On each phase transition, report via:

rp1 agent-tools emit \
  --workflow pr-visual \
  --type status_change \
  --run-id {RUN_ID} \
  --name "PR Visual: {PR_BRANCH}" \
  --step {STATE} \
  --data '{"status": "{running|completed}", "branch": "{PR_BRANCH}"}'

§1 Visualize

Emit visualize running. Spawn the pr-visualizer agent:

{% dispatch_agent "rp1-dev:pr-visualizer" %}

PR_BRANCH={PR_BRANCH}, BASE_BRANCH={BASE_BRANCH}, REVIEW_DEPTH={REVIEW_DEPTH},

FOCUS_AREAS={FOCUS_AREAS}, STANDALONE=true, KB_ROOT={kbRoot}, WORK_ROOT={workRoot}

{% enddispatch_agent %}

Wait for completion. Extract the artifact path from agent output.

Register the artifact:

rp1 agent-tools emit \
  --workflow pr-visual \
  --type artifact_registered \
  --run-id {RUN_ID} \
  --step visualize \
  --data '{"path": "{ARTIFACT_PATH}", "type": "pr-visual", "feature": "pr-visual", "storageRoot": "project"}'

Emit visualize completed. Output the artifact path.

{% include_shared "anti-loop.md" %}

File-specific constraints:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.