Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

code-review

БесплатноБез исполняемых скриптовНе проверен

AI code review for PR or local changes. 280+ checks across security, architecture, performance, testing, and code quality. Posts findings as GitHub PR…

anthroosот anthroos★ 46 звёзд на GitHub

Об этом скилле

Code Review

Comprehensive AI-powered code review for PRs and local changes — enterprise-grade alternative to CodeRabbit

When to use

  • "code review"
  • "review my PR"
  • "review PR #123"
  • "check my changes"
  • "what's wrong with my code"
  • "security review"
  • "full review"
  • "/review"
  • "/review-pr"

Dependencies

  • External: gh CLI (GitHub), git

Modes

1. Local review (uncommitted changes)

Reviews git diff — changes not yet committed.

2. Branch review (vs main/master)

Reviews all changes in current branch compared to main.

3. PR review (GitHub)

Fetches diff from GitHub PR and can post comments.

4. Focused review

User can request specific focus: security, performance, bugs, style, etc.


How to execute

Step 0: Check if review needed

Skip review if:

  • PR is draft (gh pr view --json isDraft)
  • PR is already closed/merged
  • Only documentation changes (.md, .txt, LICENSE)
  • Only config changes (.json, .yaml, .toml) without code impact
  • Trivial changes (<5 lines, whitespace only, version bumps)

Inform user and ask to confirm if they still want review.


Step 1: Determine mode

Ask user or detect automatically:

  • If PR number provided → PR review
  • If uncommitted changes exist → local review
  • If on feature branch → branch review
  • If specific focus requested → apply focus filter

Step 2: Get diff

Local:

git diff HEAD

Branch (vs main):

DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo "main")
git diff $DEFAULT_BRANCH...HEAD

PR:

gh pr diff <PR_NUMBER>

Step 3: Get context

For thorough review, read related files:

# List changed files
git diff --name-only HEAD

# Read each file fully for context
# Check package.json for dependencies
# Check tsconfig/eslint config for project standards

Step 3b: Filter pre-existing issues

Before reporting an issue, check if it was introduced in this PR:

# Check when the problematic line was last modified
git blame -L <start>,<end> <file> --porcelain | head -1

Skip issues that:

  • Existed before this PR (old blame hash)
  • Are in unchanged lines
  • Were introduced by a different author long ago

Only report issues introduced or modified in current changes.

This prevents noise from legacy code and focuses review on new changes.


Step 4: Comprehensive Analysis

Apply ALL relevant checks from the checklist below.

Step 5: Confidence Scoring

Rate each issue 0-100:

Score Confidence When to use
90-100 Certain Clear vulnerability (SQL injection with user input), obvious crash
70-89 High Likely bug, security risk, definite code smell
50-69 Medium Potential issue, needs context to confirm
25-49 Low Style preference, minor suggestion
0-24 Skip Probably false positive, pre-existing, or nitpick

Only report issues with confidence ≥70.

Mark as false positive and skip:

  • Pre-existing issues (caught by Step 3b)
  • Issues that linters will catch (eslint, prettier)
  • Pedantic nitpicks without real impact
  • Code that looks wrong but has valid reason (check comments)
  • Issues with explicit ignore comments (// eslint-disable, # noqa)

Step 6: Output result

Format:

## Code Review Summary

**Reviewed:** X files, Y lines changed
**Risk Level:** Critical / High / Medium / Low

### Critical Issues (must fix)
- [file:line] Description — Why it matters

### High Priority
- [file:line] Description

### Medium Priority
- [file:line] Description

### Low Priority / Suggestions
- [file:line] Description

### Good Practices
- What was done well

For GitHub PR — post comments:

# General comment on PR
gh pr comment <PR_NUMBER> --body "## AI Code Review
[Review content]"

# Line-by-line comments via API (for specific file/line feedback)
# Replace {owner}, {repo}, {pr} with actual values
gh api repos/{owner}/{repo}/pulls/{pr}/comments \
  --method POST \
  -f body="Issue description and fix suggestion" \
  -f path="src/file.ts" \
  -f line=42 \
  -f side="RIGHT" \
  -f commit_id="$(git rev-parse HEAD)"

COMPREHENSIVE REVIEW CHECKLIST

1. SECURITY (OWASP Top 10 + Extended)

1.1 Injection

  • SQL Injection — User input in SQL queries without parameterization
  • NoSQL Injection — Unsanitized input in MongoDB/similar queries
  • Command Injection — User input passed to shell commands (exec, spawn, system)
  • LDAP Injection — User input in LDAP queries
  • XPath Injection — User input in XML queries
  • Template Injection — User input in template engines (SSTI)
  • Header Injection — User input in HTTP headers (CRLF)
  • Log Injection — Unsanitized data written to logs

1.2 Broken Authentication

  • Weak password requirements — No complexity enforcement
  • **
Полный SKILL.md на GitHub

Установить code-review в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

.gitignoreCHANGELOG.mdCONTRIBUTING.mdLICENSEREADME.md

FAQ

Что делает скилл code-review?

AI code review for PR or local changes. 280+ checks across security, architecture, performance, testing, and code quality. Posts findings as GitHub PR comments with confidence scores.

Как установить скилл code-review?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл code-review запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить code-review с