code-review
하는 일
이 스킬은 코드를 꼼꼼히 검토하는 방법을 안내합니다. 보안, 정확성, 성능, 유지보수성을 체크리스트로 점검하려는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓에이전트에게 코드 검토를 요청하거나 버그를 확인하게 할 때.
- ✓코드베이스의 보안 문제를 감사하고 싶을 때.
- ✓보안을 먼저 보고 그다음 정확성과 성능을 다루는 체계적인 검토가 필요할 때.
스킬 링크
https://github.com/shareAI-lab/learn-claude-code/blob/main/skills/code-review/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 코드에서 버그와 보안 문제를 검토하고, 무엇부터 고쳐야 할지 알려 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 보안, 정확성, 성능, 유지보수성을 다루는 체크리스트를 따라갑니다. 의존성 문제를 확인하기 위해 npm audit이나 pip-audit 같은 감사 도구도 제안할 수 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Code Review Skill
You now have expertise in conducting comprehensive code reviews. Follow this structured approach:
Review Checklist
1. Security (Critical)
Check for:
- Injection vulnerabilities: SQL, command, XSS, template injection
- Authentication issues: Hardcoded credentials, weak auth
- Authorization flaws: Missing access controls, IDOR
- Data exposure: Sensitive data in logs, error messages
- Cryptography: Weak algorithms, improper key management
- Dependencies: Known vulnerabilities (check with
npm audit,pip-audit)
# Quick security scans
npm audit # Node.js
pip-audit # Python
cargo audit # Rust
grep -r "password\|secret\|api_key" --include="*.py" --include="*.js"
2. Correctness
Check for:
- Logic errors: Off-by-one, null handling, edge cases
- Race conditions: Concurrent access without synchronization
- Resource leaks: Unclosed files, connections, memory
- Error handling: Swallowed exceptions, missing error paths
- Type safety: Implicit conversions, any types
3. Performance
Check for:
- N+1 queries: Database calls in loops
- Memory issues: Large allocations, retained references
- Blocking operations: Sync I/O in async code
- Inefficient algorithms: O(n^2) when O(n) possible
- Missing caching: Repeated expensive computations
4. Maintainability
Check for:
- Naming: Clear, consistent, descriptive
- Complexity: Functions > 50 lines, deep nesting > 3 levels
- Duplication: Copy-pasted code blocks
- Dead code: Unused imports, unreachable branches
- Comments: Outdated, redundant, or missing where needed
5. Testing
Check for:
- Coverage: Critical paths tested
- Edge cases: Null, empty, boundary values
- Mocking: External dependencies isolated
- Assertions: Meaningful, specific checks
Review Output Format
## Code Review: [file/component name]
### Summary
[1-2 sentence overview]
### Critical Issues
1. **[Issue]** (line X): [Description]
- Impact: [What could go wrong]
- Fix: [Suggested solution]
### Improvements
1. **[Suggestion]** (line X): [Description]
### Positive Notes
- [What was done well]
### Verdict
[ ] Ready to merge
[ ] Needs minor changes
[ ] Needs major revision
Common Patterns to Flag
Python
# Bad: SQL injection
cursor.execute(f"SELECT * FROM users WHERE id = {user_id}")
# Good:
cursor.execute("SELECT * FROM users WHERE id = ?", (user_id,))
# Bad: Command injection
os.system(f"ls {user_input}")
# Good:
subprocess.run(["ls", user_input], check=True)
# Bad: Mutable default argument
def append(item, lst=[]): # Bug: shared mutable default
# Good:
def append(item, lst=None):
lst = lst or []
JavaScript/TypeScript
// Bad: Prototype pollution
Object.assign(target, userInput)
// Good:
Object.assign(target, sanitize(userInput))
// Bad: eval usage
eval(userCode)
// Good: Never use eval with user input
// Bad: Callback hell
getData(x => process(x, y => save(y, z => done(z))))
// Good:
const data = await getData();
const processed = await process(data);
await save(processed);
Review Commands
# Show recent changes
git diff HEAD~5 --stat
git log --oneline -10
# Find potential issues
grep -rn "TODO\|FIXME\|HACK\|XXX" .
grep -rn "password\|secret\|token" . --include="*.py"
# Check complexity (Python)
pip install radon && radon cc . -a
# Check dependencies
npm outdated # Node
pip list --outdated # Python
Review Workflow
- Understand context: Read PR description, linked issues
- Run the code: Build, test, run locally if possible
- Read top-down: Start with main entry points
- Check tests: Are changes tested? Do tests pass?
- Security scan: Run automated tools
- Manual review: Use checklist above
- Write feedback: Be specific, suggest fixes, be kind
자주 묻는 질문
검토는 무엇을 먼저 확인하나요?
보안이 가장 중요한 영역으로 나열되고, 그다음 정확성, 성능, 유지보수성 순입니다.
보안 도구를 실행하나요?
알려진 의존성 문제를 점검하기 위해 npm audit과 pip-audit 같은 도구를 제안합니다.
대신 코드를 고쳐 주나요?
이 스킬은 검토에서 문제를 찾아 설명하는 것이 목적이며, 변경을 직접 만드는 것을 설명하지 않습니다.
상세 정보
작성자의 원본 설명
Perform thorough code reviews with security, performance, and maintainability analysis. Use when user asks to review code, check for bugs, or audit a codebase.
인기도
- GitHub 스타
- 80k
- 순위
- #1716
- 라이선스
- MIT
- 업데이트
- 2026. 10. 27.
댓글
- …
이 저장소의 다른 스킬
agent-builder
80k에이전트에게 도구와 지식부터 반복하는 단계까지, 특정 업무를 위한 자체 AI 도우미를 설계하고 만드는 방법을 가르칩니다.
mcp-builder
80k에이전트에게 Claude에 새 도구, 데이터 소스, 프롬프트를 제공하고 외부 서비스와 연결하는 MCP 서버를 만드는 법을 가르칩니다.
에이전트가 PDF 파일을 읽고, 텍스트를 뽑아내고, 새 PDF를 만들고, 여러 문서를 하나의 파일로 합치도록 돕습니다.