Agent skill
Review Pull Request
Analyze a pull request diff and provide structured feedback on correctness, conventions, and quality.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/review-pr-carrot-foundation-methodology-rules-2
SKILL.md
-
Read the diff: Run
git diff main...HEADto see all changes in the branch. If a PR number is provided, usegh pr diff <number>instead. -
Check for correctness:
- Logic errors and potential bugs
- Proper error handling (no swallowed errors, meaningful messages)
- Null/undefined safety given
noUncheckedIndexedAccessis enabled - Correct use of Zod schemas (
.safeParse()for untrusted input,.parse()for internal data)
-
Check conventions:
- Module boundaries respected (processors only import from
shared, no cross-scope imports) - Path aliases used (
@carrot-fndn/shared/...) instead of relative imports across libraries - Conventional commit message format in PR title
- No real data in tests (no real company names, tax IDs, plates, addresses, or PII)
- Test stubs use
@faker-js/fakerandzockerhelpers
- Module boundaries respected (processors only import from
-
Check test coverage:
- New logic has corresponding unit tests
- Rule processors have both
*.spec.tsand*.e2e.spec.tsfiles - Test cases use
describeblocks andit.eachfor table-driven patterns where appropriate
-
Run quality gates: Execute
pnpm lint:affected && pnpm ts:affected && pnpm test:affectedto verify all checks pass. -
Provide feedback grouped by severity:
- Critical: Bugs, logic errors, security issues, broken tests, real data in tests
- Suggestion: Missing tests, naming improvements, better patterns, performance concerns
- Nit: Style preferences, minor readability improvements
Focus on bugs and logic errors over style. If everything looks good, say so explicitly.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?