From rp1-dev
Generates 1-4 Mermaid diagrams visualizing behavioral and structural PR changes from git diffs. Pure markdown output for quick PR reviews.
npx claudepluginhub rp1-run/rp1 --plugin rp1-devGenerate 1-4 Mermaid diagrams capturing behavioral/structural PR changes. Pure markdown output. | Param | Pos | Default | Purpose | |-------|-----|---------|---------| | PR_BRANCH | $1 | current | Branch to analyze | | BASE_BRANCH | $2 | main | Comparison base | | REVIEW_DEPTH | $3 | standard | quick / standard / detailed | | FOCUS_AREAS | $4 | all | Optional focus filter | | STANDALONE | $5 | ...
Transforms PR diffs into minimal Mermaid diagrams visualizing behavioral and structural code changes for visual code reviews. Color-codes additions, removals, and modifications; outputs HTML previews or Markdown.
Explains code flow in PRs, functions, modules with concrete input/output examples, ASCII diagrams, before/after tables. Use for /explain-flow or 'explain this PR'.
Mermaid diagram generator agent. Analyzes codebases to create flowcharts, sequence, class, ER, and state diagrams visualizing architecture, relationships, and data flow. Read/Grep/Glob tools.
Share bugs, ideas, or general feedback.
Generate 1-4 Mermaid diagrams capturing behavioral/structural PR changes. Pure markdown output.
| Param | Pos | Default | Purpose |
|---|---|---|---|
| PR_BRANCH | $1 | current | Branch to analyze |
| BASE_BRANCH | $2 | main | Comparison base |
| REVIEW_DEPTH | $3 | standard | quick / standard / detailed |
| FOCUS_AREAS | $4 | all | Optional focus filter |
| STANDALONE | $5 | true | true: save artifact file + register. false: return markdown to stdout |
| RP1_ROOT | prompt | .rp1/ | Work artifacts root |
Read {{$RP1_ROOT}}/context/index.md + architecture.md for arch awareness. Warn if missing.
gh pr view, gh pr diffgit diff BASE_BRANCH...PR_BRANCHUse a thinking block. For each changed file:
If no meaningful changes: output exactly No visualizations needed. and stop.
Per diagram, emit this format:
## <Title>
<One sentence: what changed>
` ` `mermaid
<diagram>
` ` `
<Optional: 1-2 bullets max>
STANDALONE=true (default):
pr-{num} from PR number, or sanitized branch name (replace / with -)mkdir -p {{$RP1_ROOT}}/work/pr-reviews{REVIEW_ID}-visual-*.md -> zero-pad 3 digits{{$RP1_ROOT}}/work/pr-reviews/{REVIEW_ID}-visual-{NNN}.mdrp1 agent-tools emit --type artifact_registered --data '{"path": "{{$RP1_ROOT}}/work/pr-reviews/{REVIEW_ID}-visual-{NNN}.md"}'
STANDALONE=false:
Print raw markdown to stdout. No file write. No artifact registration.
[+ New], [~ Modified], [- Removed]) for change typeSingle pass. Do not:
If blocked: document the issue, output partial results, stop.