kata-review-pull-requests
Run a comprehensive pull request review using multiple specialized agents. Each agent focuses on a different aspect of code quality, such as comments, tests, error handling, type design, and general code review. The skill aggregates results and provides a clear action plan for improvements. Triggers include "review PR", "analyze pull request", "code review", and "PR quality check".
What this skill does
# Comprehensive PR Review
Run a comprehensive pull request review by spawning `general-purpose` subagents with inlined reference instructions. Each subagent gets a fresh context window with its specialized review instructions, the diff, and project context.
**Review Aspects (optional):** "$ARGUMENTS"
<process>
## 1. Determine Review Scope
- Check git status to identify changed files
- Parse arguments to see if user requested specific review aspects
- Default: Run all applicable reviews
## 2. Available Review Aspects
| Aspect | Reference File | Purpose |
| ------------ | ------------------------------------ | ------------------------------------------ |
| **code** | code-reviewer-instructions.md | General code review for project guidelines |
| **tests** | pr-test-analyzer-instructions.md | Test coverage quality and completeness |
| **comments** | comment-analyzer-instructions.md | Code comment accuracy and maintainability |
| **errors** | failure-finder-instructions.md | Silent failures and error handling |
| **types** | type-design-analyzer-instructions.md | Type design and invariants |
| **simplify** | code-simplifier-instructions.md | Code clarity and maintainability |
| **all** | _(all applicable)_ | Run all reviews (default) |
## 3. Identify Changed Files
- Run `git diff --name-only` to see modified files
- Check if PR already exists: `gh pr view`
- Identify file types and what reviews apply
**Error handling:**
- If `git diff` fails (not a git repo): Report error clearly and stop
- If `gh pr view` fails with "no PR found": Expected for pre-PR reviews, continue with git diff
- If `gh pr view` fails with auth error: Note that GitHub CLI authentication is needed
- If no changed files found: Report "No changes detected" and stop
## 4. Determine Applicable Reviews
Based on changes:
- **Always applicable**: code (general quality)
- **If test files changed**: tests
- **If comments/docs added**: comments
- **If error handling changed**: errors
- **If types added/modified**: types
- **After passing review**: simplify (polish and refine)
## 5. Read Reference Instructions
Read each applicable reference file into a variable for inlining into subagent prompts:
```
code_instructions = Read("./references/code-reviewer-instructions.md")
test_instructions = Read("./references/pr-test-analyzer-instructions.md")
comment_instructions = Read("./references/comment-analyzer-instructions.md")
errors_instructions = Read("./references/failure-finder-instructions.md")
types_instructions = Read("./references/type-design-analyzer-instructions.md")
simplify_instructions = Read("./references/code-simplifier-instructions.md")
```
Only read files for applicable review aspects. Also read:
- `git diff` output into `diff_content`
- `CLAUDE.md` (if exists) into `project_context`
## 6. Resolve Model Profile
```bash
MODEL_PROFILE=$(node "${CLAUDE_PLUGIN_ROOT}/skills/kata-review-pull-requests/scripts/kata-lib.cjs" read-config "model_profile" "balanced")
WORKTREE_ENABLED=$(node "${CLAUDE_PLUGIN_ROOT}/skills/kata-review-pull-requests/scripts/kata-lib.cjs" read-config "worktree.enabled" "false")
```
Default to "balanced" if not set.
**Model lookup table:**
| Agent | quality | balanced | budget |
| ---------------- | ------- | -------- | ------ |
| code-reviewer | opus | sonnet | sonnet |
| test-analyzer | sonnet | sonnet | haiku |
| comment-analyzer | sonnet | sonnet | haiku |
| failure-hunter | sonnet | sonnet | haiku |
| type-analyzer | sonnet | sonnet | haiku |
| code-simplifier | sonnet | sonnet | haiku |
## 7. Launch Review Agents
Spawn `general-purpose` subagents via parallel Task calls. Each agent receives its reference instructions inlined as `<agent-instructions>`, the diff, and project context.
**Task call pattern:**
```
Task(
prompt="<agent-instructions>\n{instructions_content}\n</agent-instructions>\n\nReview the following changes:\n\n<diff>\n{diff_content}\n</diff>\n\n<project-context>\n{project_context}\n</project-context>",
subagent_type="general-purpose",
model="{resolved_model}",
description="PR review: {aspect}"
)
```
**Example parallel launch (3 agents):**
```
Task(prompt="<agent-instructions>\n{code_instructions}\n</agent-instructions>\n\nReview these changes:\n<diff>\n{diff_content}\n</diff>\n<project-context>\n{project_context}\n</project-context>", subagent_type="general-purpose", model="{code_model}", description="PR review: code")
Task(prompt="<agent-instructions>\n{test_instructions}\n</agent-instructions>\n\nReview these changes:\n<diff>\n{diff_content}\n</diff>\n<project-context>\n{project_context}\n</project-context>", subagent_type="general-purpose", model="{test_model}", description="PR review: tests")
Task(prompt="<agent-instructions>\n{errors_instructions}\n</agent-instructions>\n\nReview these changes:\n<diff>\n{diff_content}\n</diff>\n<project-context>\n{project_context}\n</project-context>", subagent_type="general-purpose", model="{errors_model}", description="PR review: errors")
```
All run in parallel. Task tool blocks until all complete.
**Agent failure handling:**
- If agent completes: Include results in aggregation
- If agent times out: Report "[aspect] review timed out - consider running independently"
- If agent fails: Report "[aspect] review failed: [error reason]"
- If one agent fails, STILL proceed with remaining agents
- **Never silently skip a failed agent** - always report its status
## 8. Aggregate Results
After agents complete, summarize:
- **Critical Issues** (must fix before merge)
- **Important Issues** (should fix)
- **Suggestions** (nice to have)
- **Positive Observations** (what's good)
**Edge cases:**
- If no issues found: "All Checks Passed" summary
- If agents conflict: Note the disagreement and let user decide
- If agent output malformed: Note "[aspect] output could not be parsed"
- Always include count of agents completed vs failed
## 9. Provide Action Plan
Organize findings:
```markdown
# PR Review Summary
## Critical Issues (X found)
- [aspect]: Issue description [file:line]
## Important Issues (X found)
- [aspect]: Issue description [file:line]
## Suggestions (X found)
- [aspect]: Suggestion [file:line]
## Strengths
- What's well-done in this PR
## Recommended Action
1. Fix critical and important issues
2. Consider suggestions
3. Re-run review after fixes
```
## 10. Handle Review Findings
Route based on review results:
| Findings | Route |
| ----------------------------- | ------------------------- |
| Critical issues found | Route A (must address) |
| Important issues, no critical | Route B (should address) |
| Suggestions only | Route C (optional) |
| No issues | Route D (clean) → step 11 |
---
**Route A: Critical issues found**
Use AskUserQuestion:
- header: "Critical Issues"
- question: "{N} critical issues found. How do you want to handle them?"
- options:
- "Fix all issues" — fix critical, important, and suggestions
- "Fix critical only" — fix critical, add rest to backlog
- "Add all to backlog" — create issues for everything, fix nothing now
- "Skip" — continue without addressing
**Route B: Important issues, no critical**
Use AskUserQuestion:
- header: "Review Findings"
- question: "{N} important issues found. How do you want to handle them?"
- options:
- "Fix all issues" — fix important and suggestions
- "Fix important only" — fix important, add suggestions to backlog
- "Add to backlog" — create issues, fix nothing now
- "Skip" — continue without addressing
**Route C: Suggestions only**
Use AskUserQuestion:
- header: "Suggestions"
- question: "{N} suggestions found. Address them?"
- options:
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.