ワンクリックで
code-review
Conduct thorough, actionable code reviews that catch real problems without drowning in noise
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Conduct thorough, actionable code reviews that catch real problems without drowning in noise
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | code-review |
| description | Conduct thorough, actionable code reviews that catch real problems without drowning in noise |
| invocation | /review |
| aliases | ["cr","review-pr"] |
Conduct thorough, actionable code reviews that catch real problems without drowning in noise.
Good code review serves three purposes:
A review that only finds style nits has failed. A review that only finds bugs but ignores maintainability has also failed. Balance matters.
Never review blind. The diff alone lacks the information needed to judge whether code is correct, appropriate, or consistent.
| Source | Purpose |
|---|---|
| PR description / commit messages | Understand intent |
AGENTS.md | Coding style rules |
.rules/* | Additional project conventions |
docs/*-design.md | Architectural intent |
docs/roadmap.md | Current priorities |
docs/documentation-style-guide.md | Doc conventions |
| Neighbouring files | Established patterns |
.github/workflows/* | CI expectations |
# Determine primary language
if [ -f "Cargo.toml" ]; then
echo "Rust"
elif [ -f "pyproject.toml" ]; then
echo "Python"
elif [ -f "package.json" ]; then
echo "TypeScript/JavaScript"
fi
# Commits on this branch
git log --oneline $(git merge-base HEAD main)..HEAD
# Files changed with line counts
git diff $(git merge-base HEAD main)..HEAD --stat
# Full diff
git diff $(git merge-base HEAD main)..HEAD
# Show a specific commit
git show <sha> --stat
# Find the merge base
git merge-base HEAD main
# Check if a PR exists for the current branch
gh pr view --json number,title,state 2>/dev/null && echo "PR exists" || echo "No PR"
# Get PR description (body) and metadata
gh pr view --json title,body,baseRefName,headRefName,labels,milestone
# Get just the PR body (useful for piping)
gh pr view --json body --jq '.body'
# Get PR with comments (for context on ongoing discussion)
gh pr view --json body,comments --jq '{body, comments: [.comments[].body]}'
# Get linked issues from PR
gh pr view --json body --jq '.body' | grep -oE '#[0-9]+' | sort -u
# View a linked issue
gh issue view <number> --json title,body
# List PR checks and their status
gh pr checks
# Get PR diff directly (alternative to git diff)
gh pr diff
# Get PR files changed with stats
gh pr diff --stat
# Full context dump for review
echo "=== PR Details ==="
gh pr view --json number,title,state,baseRefName,headRefName,labels
echo -e "\n=== PR Description ==="
gh pr view --json body --jq '.body'
echo -e "\n=== Linked Issues ==="
for issue in $(gh pr view --json body --jq '.body' | grep -oE '#[0-9]+' | tr -d '#' | sort -u); do
echo "--- Issue #$issue ---"
gh issue view "$issue" --json title,body --jq '"\(.title)\n\(.body)"' 2>/dev/null || echo "Could not fetch issue"
done
echo -e "\n=== CI Status ==="
gh pr checks
echo -e "\n=== Commits ==="
git log --oneline $(git merge-base HEAD main)..HEAD
echo -e "\n=== Files Changed ==="
gh pr diff --stat
The code should do what it claims to do.
The code should follow project conventions.
Check against: AGENTS.md, .rules/*, language-specific linters
The code should respect established boundaries.
Check against: docs/*-design.md, existing module structure
The code should be maintainable.
Code Smells to Flag:
| Smell | Symptom |
|---|---|
| Repeated code | Copy-paste with minor variations |
| Complex conditionals | Nested if/else, boolean expressions with >3 terms |
| Bumpy road | Function alternates between high and low abstraction |
| High similarity | Two functions that differ only in one parameter |
| Magic literals | Unexplained numbers or strings |
| Long parameter lists | Functions taking >4 arguments |
| Feature envy | Method uses another object's data more than its own |
| Primitive obsession | Using strings/ints where a type would clarify intent |
Positive Patterns to Encourage:
The code should explain itself where it cannot show itself.
Check against: docs/documentation-style-guide.md
The code should prove it works.
The code should not introduce vulnerabilities.
See: guides/security-issues.md for detailed patterns and examples.
The code should not introduce regressions.
See: guides/performance-concerns.md for detailed patterns and examples.
Structure findings by severity:
## Summary
<One paragraph overall assessment. Lead with the most important point.>
## Critical Issues
Issues that block merge. Security flaws, correctness bugs, data loss risks.
### [CRITICAL] <Short title>
**File:** `path/to/file.rs` (lines 42-56)
<Explanation of the problem>
```rust
// Problematic code
Suggested fix:
// Better approach
Improvements that strengthen the code but are not blocking.
File: path/to/file.rs (line 78)
Questions, minor notes, patterns worth discussing.
## Best Practices
### Calibrate Severity
Not everything is critical. Reserve that label for:
- Security vulnerabilities
- Data corruption or loss
- Crashes or hangs
- Silent incorrect behaviour
Style violations and minor inefficiencies are suggestions, not blockers.
### Be Specific
Bad: "This function is too complex."
Good: "This function has a cyclomatic complexity of 15. The nested conditionals on lines 34-52 could be extracted into a `validate_input()` helper."
### Suggest, Don't Demand
Bad: "Change this to use `filter_map`."
Good: "Consider using `filter_map` here—it combines the filter and map into a single pass and makes the None-handling explicit."
### Acknowledge Good Work
If something is particularly well done, say so. Positive reinforcement shapes future contributions.
### Ask Questions
If you don't understand why something was done a certain way, ask. The author may have context you lack. Or they may realize their approach needs better documentation.
### Consider the Author
A junior contributor needs different feedback than a senior maintainer. Adjust your tone and the level of explanation accordingly.
### Timebox
Diminishing returns set in. If you've spent an hour on a 200-line PR, you're likely past the point of useful findings. Note your time limit and move on.
## Common Pitfalls
### Reviewing Without Context
Reading the diff without understanding the feature leads to superficial or incorrect feedback.
### Bikeshedding
Spending disproportionate time on trivial style matters while missing structural problems.
### Rubber Stamping
Approving without genuine review erodes the value of the process.
### Being Adversarial
Review is collaborative, not competitive. The goal is better code, not scoring points.
### Scope Creep
Requesting changes unrelated to the PR's purpose. File separate issues for pre-existing problems.
### Blocking on Preferences
Your preferred approach isn't necessarily better. If the code works, follows conventions, and is maintainable, accept it even if you'd have written it differently.
## Supplementary Guides
For detailed patterns and examples, see:
- `guides/security-issues.md` — Injection attacks (SQL, shell, log, XSS, prompt), TOCTOU race conditions, secret exposure, authentication/authorisation flaws, cryptographic issues, deserialization, path traversal
- `guides/performance-concerns.md` — Algorithmic complexity (accidental quadratic), resource leaks, bad neighbour problems, database performance, network efficiency, memory management, concurrency issues
- `checklists/language-specific.md` — Rust, Python, TypeScript checklists
- `examples/code-smells.md` — Before/after examples of common smells
## Language-Specific Considerations
### Rust
- Ownership and borrowing: unnecessary clones, lifetime elision opportunities
- Error handling: appropriate use of `?`, `Result` vs `panic!`
- Unsafe code: is it necessary? Is the safety invariant documented?
- Clippy lints: are they addressed or explicitly allowed with justification?
### Python
- Type hints: present and accurate?
- Exception handling: bare `except:` is almost always wrong
- Resource management: `with` statements for files, connections
- Import hygiene: no wildcard imports, logical grouping
### TypeScript
- Type safety: avoiding `any`, proper null handling
- Async patterns: proper error handling in promises
- Module boundaries: avoiding circular imports
- Runtime checks: zod or similar for external data
## Prompt Template
See `templates/review-prompt.md` for a ready-to-use prompt incorporating these practices.
Diagnose and add "juice" — game feel, feedback, and tactile polish — to games, prototypes, and interactive software. Use this skill whenever the user is building, polishing, prototyping, or reviewing a game (especially action, arcade, platformer, shooter, or rhythm games), or when they ask about game feel, juice, screen shake, hit feedback, particles, easing, tweening, screen pause/hitstop, juicy effects, "making it feel good", or why their prototype feels limp, lifeless, dry, or cheap. Also trigger when reviewing UI prototypes that need tactile response, or when the user mentions Jonasson, Purho, Vlambeer, Nuclear Throne, screen shake, or Steve Swink's "Game Feel" book. Apply even to non-game interactive software when the user wants buttons, transitions, or interactions to feel responsive and satisfying.
Visual strategy, art direction, and design critique for websites. Use this skill whenever the user asks for visual direction, page design strategy, design critique, hierarchy planning, concept exploration, or art direction for any web page or site — including landing pages, service/transactional pages, dashboards, editorial layouts, portfolios, campaign pages, and design-system foundations. Also trigger when the user asks to evaluate an existing web design, generate concept territories, plan visual hierarchy, choose type/colour/image strategy, or review a design for accessibility and communication clarity. This skill produces design rationale, concept directions, hierarchy maps, system strategies, and review notes — not HTML/CSS code. If the user needs implementation, hand off to the frontend-design skill after the design direction is set.
Local-first Ansible testing for roles and modules within collections. Use whenever the user wants to add, run, scaffold, or debug tests for an Ansible collection, role, or module. Triggers include: "test my Ansible role", "add Molecule tests", "run ansible-test", "set up integration tests", "scaffold a test scenario", "run sanity checks", "write unit tests for a module", "test a collection locally". Always prefer this skill over ad hoc shell suggestions when Ansible testing is the subject. The skill covers the full testing stack: Molecule + Podman for roles, ansible-test for modules and collections (sanity, unit, integration). Python 3.12+, collections layout, and Podman are assumed throughout.
Configure and use Biome (biomejs) for TypeScript linting and formatting. Use when setting up Biome in a project, configuring lint rules, migrating from ESLint/Prettier, fixing lint errors, setting up CI pipelines with Biome, or configuring git hooks for code quality. Covers biome.json configuration, file inclusion/exclusion patterns, rule overrides, and integration with build tooling.
Generate, modify, or audit `.codescene/code-health-rules.json` files that control CodeScene's code health scan behaviour. Use this skill whenever the user wants to customize CodeScene rule weights, disable specific smells, adjust metric thresholds, scope rules to test vs application code, apply language-specific overrides, or add in-source `@codescene` directives. Also trigger when the user asks why a CodeScene rule is firing, or wants to suppress a smell across a repo or folder subtree.
Write and maintain self-contained ExecPlans (execution plans) that a novice can follow end-to-end; use when planning or implementing non-trivial repo changes.