Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill code-review명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | code-review |
| description | > Use when this capability is needed. |
Run a structured review of branch changes covering security, language strictness, performance, and conventions.
# Default base branch is main. User can override: /code-review --base staging
BASE=${1:-main}
git fetch origin "$BASE" --quiet 2>/dev/null || true
MERGE_BASE=$(git merge-base "origin/$BASE" HEAD)
BRANCH=$(git rev-parse --abbrev-ref HEAD)
# Changed files and stats
git diff --name-status "$MERGE_BASE"..HEAD
git diff --stat "$MERGE_BASE"..HEAD
git log --oneline "$MERGE_BASE"..HEAD
Use $MERGE_BASE..HEAD for ALL diffs. Never use origin/main..HEAD directly -- it includes changes from other merged branches.
Map file extensions to rule sets:
| Extension | Rule set | Skill |
|---|---|---|
.ts, .tsx | TypeScript | typescript-strict |
.rs | Rust | rust-strict |
.swift | Swift | swift-strict |
.go | Go | go-strict |
.js, .mjs, .cjs | JavaScript | javascript-strict |
Only apply rules for languages present in the diff.
Run in this order. For each finding, record file, line number, description, and rule ID.
Scan the diff output (not the full repo) for:
sk-, ghp_, AKIA, -----BEGIN PRIVATE KEY)eval(), innerHTML, unsanitized template literals.env, *.pem, credentials.json committedApply the top rules for each detected language (see Quick Reference Tables below). Read the changed lines and flag violations.
Look for these anti-patterns in the diff:
.filter() inside .map(), includes() inside loop)writeFileSync, std::fs::write under async).await or disk I/O (Rust)type(scope): subject formatconsole.log/print/println! debugging left in code## Code Review: [branch-name]
**Base**: [base-branch] | **Files changed**: N | **Commits**: N
### CRITICAL (must fix before merge)
- [file:line] Finding description (RULE-ID)
### HIGH (should fix)
- [file:line] Finding description (RULE-ID)
### MEDIUM (consider fixing)
- [file:line] Finding description (RULE-ID)
### LOW (nitpick)
- [file:line] Finding description (RULE-ID)
### Passed checks
- No secrets detected in diff
- Error handling present
- Input validated at boundaries
- Async operations properly awaited
- Resources cleaned up
- Commit messages follow conventions
Omit empty severity sections. Always show "Passed checks" to confirm what was verified.
| ID | Rule | What to flag |
|---|---|---|
| TS-01 | No any | any type annotation without justification comment |
| TS-02 | No as assertions | as Type without preceding type guard |
| TS-04 | No @ts-ignore | Use @ts-expect-error with explanation instead |
| TS-12 | Narrow catch errors | catch (err) without instanceof Error check |
| TS-13 | No silent catch | Empty catch {} or catch without logging |
| ID | Rule | What to flag |
|---|---|---|
| -- | No .unwrap() | .unwrap() in non-test code without // BUG IF: comment |
| -- | No .expect() | .expect() outside static init (LazyLock, OnceLock) |
| -- | SAFETY comments | unsafe block without // SAFETY: comment |
| -- | Lock across await | RwLock/Mutex guard held across .await |
| -- | Bounded caches | HashMap used as cache without capacity limit |
| ID | Rule | What to flag |
|---|---|---|
| SW-01 | No force unwrap | ! on optionals in production code |
| SW-03 | No silent try? | try? on critical operations (file creation, auth, data save) |
| SW-09 | @MainActor on VMs | ViewModel missing @MainActor annotation |
| SW-12 | Task cancellation | Task { } without [weak self] or cancellation check |
| SW-15 | [weak self] | Async closures with strong self capture |
| ID | Rule | What to flag |
|---|---|---|
| GO-01 | Wrap errors | return err without fmt.Errorf("context: %w", err) |
| GO-02 | Check errors | Ignored error return value |
| GO-03 | Drain body | resp.Body.Close() without io.Copy(io.Discard, ...) on error paths |
| GO-07 | RWMutex | Write lock where read lock suffices, or missing double-check |
| GO-17 | No hardcoded secrets | const apiKey = "..." or similar |
| ID | Rule | What to flag |
|---|---|---|
| JS-01 | No var | var declaration anywhere |
| JS-03 | No silent catch | Empty catch block or catch without action |
| JS-05 | Bounded retries | Recursive retry without max attempt limit |
| JS-08 | Async file I/O | writeFileSync, readFileSync in server code |
| JS-17 | No eval() | eval() or new Function() with dynamic input |
Quick-scan checklist applied to ALL languages:
console.log/print/println!/NSLog debugging leftany type escape/code-review --base staging
/code-review --base develop
Override the default main base branch.
/code-review --files src/auth.ts src/middleware.ts
Limits the review to listed files. Use git diff $MERGE_BASE..HEAD -- <file> per file.
# Fetch PR metadata and diff
gh pr view <NUMBER> --json title,body,headRefName,baseRefName,files
gh pr diff <NUMBER>
Use gh pr diff output as the diff source instead of git diff.
/code-review --range abc123..def456
Uses the provided range instead of computing merge-base.
Source: 0xMassi/claude-skills — distributed by TomeVault.