بنقرة واحدة
dev-review
Review code against language-specific best practices
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Review code against language-specific best practices
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Full R017 verification (5+3 rounds) before commit
Load a skill profile to switch active plugin set. Use when user wants to focus on a specific workflow (web-app/data-eng/harness-dev/minimal) and reduce skill enumeration block size per
6-stage structured development cycle with stage-based tool restrictions
Deploy applications to Vercel with auto-detection and preview URLs
Auto-detect project context and optimize harness — deactivate unused agents/skills, suggest missing experts, generate project profile
Monitor Claude Code releases and auto-generate GitHub issues for each new version
| name | dev-review |
| description | Review code against language-specific best practices |
| scope | core |
| argument-hint | <file-or-directory> [--lang <language>] |
| user-invocable | true |
Review code for best practices using language-specific expert agents.
| Scenario | Better Alternative |
|---|---|
| Formatting/style issues only | Run linter or formatter directly (prettier, gofmt, black) |
| Single syntax error | IDE/LSP diagnostics |
| Auto-generated code | Skip — generated code follows its own conventions |
| Pre-commit quick check | Git hooks with linter integration |
Pre-execution check: If the issue is purely formatting, run the appropriate formatter first.
Before executing the review workflow, the agent MUST run these checks:
Level: WARN Check: Scan target files for auto-generation markers
# Detection patterns (any match = WARN)
grep -rl "DO NOT EDIT" {target} 2>/dev/null
grep -rl "auto-generated" {target} 2>/dev/null
grep -rl "@generated" {target} 2>/dev/null
# File pattern detection
# *.gen.*, *.pb.go, */generated/*, */proto/*, *_generated.*, *.g.dart
Action: [Pre-flight] WARN: Auto-generated code detected in {file}. Generated code follows its own conventions — review may produce false positives. Continue? [Y/n]
Level: INFO Check: If reviewing changed files (not full codebase), check if changes are formatting-only
# If git diff is available for the target
git diff --stat {target} | grep -E '^\s+\d+ files? changed'
# Compare with whitespace-ignored diff
git diff -w {target}
# If -w diff is empty but regular diff has changes → formatting only
Action: [Pre-flight] INFO: Changes in {file} appear to be formatting-only. Consider running the appropriate formatter instead (prettier, gofmt, black).
Level: INFO Check: If target is a single file and the request mentions "error", "syntax", or "broken"
# Keyword detection in user request
keywords: error, syntax, broken, doesn't compile, won't build
# Single file check
target is exactly 1 file (not a directory)
Action: [Pre-flight] INFO: For single syntax errors, IDE/LSP diagnostics are faster. Proceeding with full review.
Level: INFO Check: Detect if a project-appropriate linter exists
# Check for linter configs in project root
ls .eslintrc* .prettierrc* biome.json .golangci.yml pyproject.toml .rubocop.yml 2>/dev/null
Action: [Pre-flight] INFO: Linter config found ({config}). For style-only issues, run the linter directly.
[Pre-flight] dev-review
├── Auto-generated code: PASS
├── Formatting-only changes: INFO — whitespace changes in src/util.ts
├── Single syntax error: PASS
└── Linter available: INFO — .eslintrc.json found
Result: PROCEED (0 GATE, 0 WARN, 2 INFO)
If any GATE: block and suggest alternative. If any WARN: show warning, ask user to confirm. If only PASS/INFO: proceed automatically.
| Name | Type | Required | Description |
|---|---|---|---|
| path | string | yes | File or directory to review |
--lang, -l Language (auto-detected if not specified)
Values: go, python, rust, kotlin, typescript, java
--focus, -f Focus area (style, performance, security, all)
--verbose, -v Detailed output
0. Run pre-flight guards (see ## Pre-flight Guards)
1. Detect language (or use --lang)
2. Select appropriate expert agent
3. Load language-specific skill
4. Analyze code against best practices
5. Generate review report
.claude/outputs/sessions/{YYYY-MM-DD}/dev-review-{HHmmss}.md
Under mode: "bypassPermissions", direct Write/Edit/Bash on .claude/** paths is permitted (CC v2.1.121+, #1101) — no /tmp/*.sh wrapping is needed.
To write dev-review results under .claude/outputs/sessions/:
.claude/outputs/sessions/$(date +%Y-%m-%d)/dev-review-$(date +%H%M%S).md with the Write tool (every Agent tool call includes mode: "bypassPermissions", R010).claude/outputs/ (e.g., cat, head, wc) is allowed for verificationReference: R006/R010 sensitive-path handling (CC v2.1.121+), #1101.
With metadata header:
```markdown
---
skill: dev-review
date: {ISO-8601 with timezone}
query: "{original user query}"
---
The review agent creates the directory and writes the artifact before returning results (R010 compliance).
crg-integration 스킬이 사용 가능한 경우 (MCP code-review-graph 연결 시), 리뷰 시작 전 먼저 호출하여 토큰 비용을 절감한다:
| Phase | CRG Tool | Purpose |
|---|---|---|
| Pre-review | get_impact_radius | 변경 영향 범위 사전 파악 (recall-우선) |
| Search | query_graph | AST 기반 호출자/피호출자 추적 |
| Diff analysis | get_minimal_context | 변경 코드의 최소 컨텍스트 |
| Semantic check | detect_changes | 두 시점 의미적 차이 |
CRG MCP 미연결 시 자동 fallback:
context >= 60% 시 CRG 호출 적극 권장. 8.2× 토큰 절감 (guides/token-efficiency/crg.md 벤치마크).
Refs: #1171 (CRG 통합), #1180 (본 cross-ref 추가)
| File Extension | Agent | Skill |
|---|---|---|
| .go | lang-golang-expert | go-best-practices |
| .py | lang-python-expert | python-best-practices |
| .rs | lang-rust-expert | rust-best-practices |
| .kt | lang-kotlin-expert | kotlin-best-practices |
| .ts, .tsx | lang-typescript-expert | typescript-best-practices |
| .java | be-springboot-expert | springboot-best-practices |
| .jsx, .js (React) | fe-vercel-agent | react-best-practices |
[dev:review src/main.go]
┌─ Agent: lang-golang-expert (sw-engineer)
├─ Skill: go-best-practices
└─ File: src/main.go
Review Results:
[Style] Line 15
Issue: Variable name should be camelCase
Found: user_name
Suggest: userName
[Error Handling] Line 42
Issue: Error not checked
Found: file.Close()
Suggest: if err := file.Close(); err != nil { ... }
[Performance] Line 78
Issue: Inefficient string concatenation in loop
Found: str += item
Suggest: Use strings.Builder
Summary:
Style: 1 issue
Error Handling: 1 issue
Performance: 1 issue
Total: 3 issues
Recommendation: Fix error handling issues first.