com um clique
phx-pr-review
// Address PR review comments on Elixir/Phoenix code — fetch comments, draft responses, optionally fix code. Use when the user shares a PR URL or mentions reviewer feedback.
// Address PR review comments on Elixir/Phoenix code — fetch comments, draft responses, optionally fix code. Use when the user shares a PR URL or mentions reviewer feedback.
Self-improving loop for plugin skills. Reads program.md, proposes one mutation per iteration, evaluates against deterministic scorer, keeps improvements via git, reverts failures. Targets weakest skill+dimension. Use with /loop for overnight runs.
Compute metrics for Claude Code sessions. Discovers via ccrider, filters trivial, computes friction/opportunity/fingerprint scores. Use for broad session triage.
Project health audit and health check — architecture, performance, tests, dependencies, code quality. Use when assessing overall project health, before releases, or after refactors.
Recommend safe Bash permissions for Elixir mix commands in settings.json. Use when permission prompts slow workflow, "fix permissions", "reduce prompts", "auto-allow mix".
Brainstorm Elixir/Phoenix features — explore ideas, compare approaches, gather requirements. Use when vague idea, not sure how to approach, or want to discuss before plan.
Analyze Elixir/Phoenix performance — N+1 queries, assign bloat, ecto optimization, genserver bottlenecks. Use when slowness, timeouts, or high memory reported.
| name | phx:pr-review |
| description | Address PR review comments on Elixir/Phoenix code — fetch comments, draft responses, optionally fix code. Use when the user shares a PR URL or mentions reviewer feedback. |
| effort | high |
| argument-hint | <PR number or URL> [--fix] |
Fetch PR review comments, categorize them, draft responses, and optionally apply code fixes.
/phx:pr-review 42 # Address comments on PR #42
/phx:pr-review 42 --fix # Address + apply code fixes
/phx:pr-review https://... # Full URL also works
$ARGUMENTS = PR number (or URL), optionally followed by --fix.
Run gh pr view {number} --json title,body,state,baseRefName,headRefName for PR metadata.
Run gh api repos/{owner}/{repo}/pulls/{number}/comments --paginate and gh api repos/{owner}/{repo}/pulls/{number}/reviews --paginate for all review comments.
Run gh pr diff {number} for the diff context.
Parse the PR number from $ARGUMENTS. If a URL, extract the
number from it. Detect --fix flag.
Group each comment into one of these categories:
| Category | Signal | Action |
|---|---|---|
| Code change | "should be", "change to", "use X instead" | Draft fix + response |
| Question | "why", "what if", "how does" | Draft explanation |
| Nitpick | "nit:", style-only, formatting | Quick acknowledgment |
| Praise | "nice", "good", "LGTM" | No action needed |
| Discussion | Architecture, trade-offs, alternatives | Draft thoughtful response |
For each code-change comment:
path and positionFor each comment, draft a response following patterns in
${CLAUDE_SKILL_DIR}/references/response-patterns.md.
Present ALL draft responses to the user for review:
## PR #{number}: {title}
### {n} comments to address
**Code changes ({n}):**
1. {file}:{line} — {reviewer suggestion} → {proposed fix}
**Questions ({n}):**
1. {question summary} → {draft answer}
**Nitpicks ({n}):**
1. {nit} → Acknowledged
**Discussion ({n}):**
1. {topic} → {draft response}
If --fix flag provided AND user approves:
mix compile --warnings-as-errors && mix testSTOP and ask user to review all draft responses.
After user approves (may edit some):
Post each approved response as a reply using gh api repos/{owner}/{repo}/pulls/{number}/comments/{id}/replies -f body="{response}".
PR receives review comments
↓
/phx:pr-review {number} ← YOU ARE HERE
↓
Fix code? → --fix flag applies changes
↓
Post responses (after user approval)
↓
Push changes → user handles git push
After addressing review comments, suggest follow-up:
- `/phx:plan` — Create a plan if findings reveal scope gaps
- `/phx:verify` — Run full verification before pushing
- Push changes — user handles git push
${CLAUDE_SKILL_DIR}/references/response-patterns.md — Response templates and common patterns