원클릭으로
code-reviewer
Structured code review using 6 dimensions. Works with or without the code-reviewer agent.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Structured code review using 6 dimensions. Works with or without the code-reviewer agent.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Open a PR for the current feature branch — validate, self-review, simplify, organize commits, push, create the PR, wait for CI and review, then address feedback. Use when implementation is complete and ready for review.
Write pytest tests using AAA pattern, project naming convention, and helper-based assertions (unwrap_as, unwrap_data, unwrap_unset). Delegates to the test-writer agent.
Review the current branch for correctness, security, architecture, and project conventions before opening a PR. Delegates to the code-reviewer agent and adds StatusPro-specific checks.
Create conventional commits with quality gates and validation
Generate or update docstrings, ADRs, READMEs, cookbook recipes, and user guides. Knows about MCP help-resource drift and ADR numbering scheme.
Respond to PR review comments systematically in thread context
| name | code-reviewer |
| description | Structured code review using 6 dimensions. Works with or without the code-reviewer agent. |
| allowed-tools | Read, Grep, Glob, Bash(git diff*), Bash(git log*) |
Perform structured code reviews across six dimensions: correctness, design, readability, performance, testing, and security.
Review code systematically to catch bugs, improve design, and enforce quality standards before merge.
git diff, file paths, or PR context)# Show recent changes
git diff HEAD~1 HEAD --stat
git diff HEAD~1 HEAD
# Or: review specific file
git diff -- path/to/file.js
For each dimension below, read the checklist in the DETAIL section and apply it:
For each finding, decide:
Provide:
Check semantic correctness, logic, and type safety.
Questions to ask:
else, incomplete switch)Red flags:
if !valid instead of if valid)Example feedback:
BLOCKING: In line 45, `user.email` is accessed without null check.
If user creation fails mid-transaction, email will be undefined.
SUGGESTION: Add early return on line 32:
if (!validateInput(data)) return null;
instead of wrapping entire function in if-block.
Check architecture, interfaces, and design patterns.
Questions to ask:
Red flags:
Example feedback:
BLOCKING: Adding `user.role` check in the API route breaks the
permission-at-boundary pattern. Auth should be enforced in middleware,
not scattered across handlers.
SUGGESTION: Extract email parsing into a standalone utility function
rather than inline regex. Makes it reusable and testable.
Check naming, clarity, and documentation.
Questions to ask:
Red flags:
x, y for coords)usr, proc, calc)Example feedback:
SUGGESTION: Rename `processData` to `validateAndTransformUserInput`.
Current name doesn't explain what kind of data or what kind of processing.
SUGGESTION: Break this 8-line conditional into a helper function:
if (user.status === 'active' && user.verified && !user.suspended) {
// ... 20 lines ...
}
→ helper: isUserEligible(user)
Check efficiency, algorithms, and resource usage.
Questions to ask:
Red flags:
Example feedback:
SUGGESTION: Move `JSON.parse(config)` outside the loop (line 12).
Currently parsing the same config every iteration.
SUGGESTION: Use Set instead of Array for user lookup (line 8).
Current O(n) lookup inside loop → O(n²) overall. Set gives O(1).
Check coverage, edge cases, and test quality.
Questions to ask:
Red flags:
Example feedback:
BLOCKING: No tests added for the new `parseEmail` function.
Add tests for: valid email, invalid format, empty string, null.
SUGGESTION: Test error case on line 5. What happens if API fails?
Currently only testing happy path.
Check vulnerabilities, auth, secrets, and injection risks.
Questions to ask:
Red flags:
Example feedback:
BLOCKING: User ID on line 18 is used directly in SQL query without
parameterization. Vulnerable to SQL injection.
→ Use parameterized query: db.query('SELECT * FROM users WHERE id = ?', [userId])
BLOCKING: API key hardcoded on line 5. This will leak if pushed to repo.
→ Move to environment variable: process.env.OPENAI_API_KEY
For PRs with many files or thousands of lines:
Example:
This PR is quite large. I've reviewed:
- Core auth changes (6/8 files) — LGTM
- Utility refactor (sampled 5 files) — Consistent pattern, approved
- Tests (spot-check) — Coverage looks good
Recommendation: For next round, consider splitting refactors by domain
(auth, API, database) so reviews can be focused.
For architectural decisions, designs that touch multiple systems, or complex patterns:
Example:
Design question: Why direct user-to-database model vs. service layer?
This works for current scale, but will make caching and multi-tenant
support hard later. Worth discussing if those are on the roadmap.
If you expect to cache: add a service layer now.
If you expect to stay monolithic: fine as-is.
When reviewing refactors or migrations:
Example:
BLOCKING: In the refactor from Map to Object, iteration order is lost.
If code depends on insertion order, this breaks behavior.
→ Verify all callers don't assume order, or use Map.
SUGGESTION: The new version is ~20% faster (good!), but readability
dropped. Consider adding a comment explaining the performance trade-off.
When reviewing changes to external code or dependencies:
Example:
BLOCKING: Package `left-pad` has a known supply chain attack history.
Use built-in padStart() instead.
SUGGESTION: Consider lighter dependency (2kb vs 50kb).
Similar functionality in `tiny-validator` or as 10-line utility function.
/pr-comments — Respond to PR review comments thread-by-threadcode-reviewer agent — Run 6D review automatically (provided by harness-kit plugin or project .claude/agents/code-reviewer.md)CLAUDE.md — Project-specific review standards