agentleFS
bestdeejay-designbestdeejay-design/agent-skills/skills/code-review/SKILL.md

code-review

Skill5 starsChanged 4 months agoMITView on GitHub

Структурированный code review: читает git diff или путь к репозиторию/файлу, применяет чек-лист категорий (correctness, security, performance, style, tests, edge cases, a11y) и выдаёт замечания вида [severity] файл:строка с предлагаемым исправлением. Скилл только анализирует и комментирует, правки не вносит. Триггеры: 'code review', 'ревью кода', 'review PR', 'проверь код', 'pull request review', 'code quality', 'замечания по коду', 'найти баги', 'review commit', 'проверь изменения', 'review diff', 'ревью пул-реквеста'.

188 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use starter, media-processing and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ww-w-aiSkill

    starter

    Static web development guide for beginners. Covers HTML/CSS/JavaScript and Next.js App Router basics. Project initialization with "init starter". Triggers: static website, portfolio, landing page, HTML CSS, beginner, 정적 웹, 포트폴리오, 초보자, 静的サイト, 初心者, 静态网站, 初学者, sitio web estático, site statique, statische Website, sito web statico Do NOT use for: fullstack apps (use $dynamic), enterprise (use $enterprise).

    Also in 4 projects that use this

  • mrgoonieSkill

    media-processing

    Process multimedia files with FFmpeg (video/audio encoding, conversion, streaming, filtering, hardware acceleration) and ImageMagick (image manipulation, format conversion, batch processing, effects, composition). Use when converting media formats, encoding videos with specific codecs (H.264, H.265, VP9), resizing/cropping images, extracting audio from video, applying filters and effects, optimizing file sizes, creating streaming manifests (HLS/DASH), generating thumbnails, batch processing images, creating composite images, or implementing media processing pipelines. Supports 100+ formats, hardware acceleration (NVENC, QSV), and complex filtergraphs.

    Also in 5 projects that use this

  • loulanyueSkill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 15 projects that use this

  • mrgoonieSkill

    aesthetic

    Create aesthetically beautiful interfaces following proven design principles. Use when building UI/UX, analyzing designs from inspiration sites, generating design images with ai-multimodal, implementing visual hierarchy and color theory, adding micro-interactions, or creating design documentation. Includes workflows for capturing and analyzing inspiration screenshots with chrome-devtools and ai-multimodal, iterative design image generation until aesthetic standards are met, and comprehensive design system guidance covering BEAUTIFUL (aesthetic principles), RIGHT (functionality/accessibility), SATISFYING (micro-interactions), and PEAK (storytelling) stages. Integrates with chrome-devtools, ai-multimodal, media-processing, ui-styling, and web-frameworks skills.

    Also in 4 projects that use this

  • AWSSkill

    ask-matt

    Ask which skill or flow fits your situation. A router over the skills in this repo.

    Also in 32 projects that use this

  • AWSSkill

    resolving-merge-conflicts

    Use when you need to resolve an in-progress git merge/rebase conflict.

    Also in 48 projects that use this

  • +1 more from mrgoonie
  • +2 more from aws

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 175 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when:

    line 22
  2. Distinctive:

    Do NOT use when:

    line 29
  3. Very specific:

    Do not use for debugging a known runtime failure or generating tests.

    line 146

“Common” is measured: kept by at least 6 in 10 of the 175 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Code Review

Структурированный ревью PR/diff за один запуск: чек-лист, severity, файл:строка, исправление.

Загружай этот скилл когда нужно проверить код (diff, PR, commit) и получить структурированные замечания с приоритетами. Скилл читает изменения, применяет чек-лист из шести категорий и выдаёт готовый текст для комментария в PR.

🎯 When to use

Use this skill when:

  • Нужно ревью PR/commit/diff перед мержем
  • Просят «проверь код», «найди баги», «замечания по коду»
  • Нужен чек-лист code quality перед релизом
  • Нужно быстро прогнать diff по категориям: correctness, security, performance, style, tests, edge cases, a11y
  • Нужен структурированный комментарий к PR с severity и ссылками на файл:строку

Do NOT use when:

  • Нужно внести правки — скилл только анализирует и комментирует; исправления вносит агент отдельно по явному запросу
  • Нужен полный аудит всего репозитория, а не изменений — скилл работает по diff
  • Нужен security-аудит с PoC-доказательством уязвимости — используй специализированный security-скилл
  • Это первичное ревью архитектуры без кода — скилл анализирует код, не схемы

📦 What this skill does

Inputs

  • --repo PATH — git-репозиторий: берётся git diff HEAD (staged + unstaged)
  • --file PATH — обычный файл: ревьюится целиком, каждая строка считается добавленной
  • --diff PATH — файл, содержащий git diff
  • stdin — git diff (по умолчанию, git diff | review.py)

Outputs

  • Список замечаний: [severity] файл:строка — правило: проблема + предлагаемое исправление
  • Сводка по категориям и severity (critical/warning/nit)
  • Markdown-отчёт по шаблону templates/review-template.md — готов для комментария в PR

🔧 How to use

Шаг 1: получить diff

git diff HEAD > /tmp/pr.diff

Шаг 2: запустить ревью

python3 scripts/review.py --diff /tmp/pr.diff

Или напрямую из репозитория:

python3 scripts/review.py --repo /path/to/repo

Или через stdin:

git diff | python3 scripts/review.py

Шаг 3: отфильтровать и оформить

# только critical/warning — то, что блокирует мерж
python3 scripts/review.py --diff /tmp/pr.diff --severity critical,warning

# только security-категория
python3 scripts/review.py --diff /tmp/pr.diff --category security

# markdown-отчёт по шаблону для комментария в PR
python3 scripts/review.py --diff /tmp/pr.diff \
  --format markdown --template templates/review-template.md

# JSON-отчёт для автоматизации
python3 scripts/review.py --diff /tmp/pr.diff --json

📚 Examples

Example 1: ревью PR из репозитория

Input: python3 review.py --repo ./myapp Output:

[critical] src/db.py:18 — SEC-001: SQL-запрос собирается из f-строки — риск SQL-инъекции.
    код: sql = f"INSERT INTO users (name) VALUES ({name})"
    fix: используйте параметризованные запросы: cursor.execute(sql, (name,))
[warning] src/db.py:9 — CORR-001: сравнение с None в Yoda-форме.
    fix: пишите `x is None`

Example 2: ревью файла целиком

Input: python3 review.py --file src/worker.go Output:

[critical] worker.go:16 — SEC-009: запуск через `sh -c` с конкатенацией — риск command injection.
    fix: передавайте аргументы отдельными элементами без shell.

Example 3: markdown-отчёт для комментария в PR

Input: python3 review.py --diff pr.diff --format markdown --template templates/review-template.md Output: готовый Markdown с секциями Summary / Findings / Checklist, подстановкой {{REVIEW_TARGET}}, {{TOTAL}}, {{CRITICAL}}, {{WARNING}}, {{NIT}}, {{SUMMARY}}, {{FINDINGS}}, {{DATE}}.

⚠️ Constraints & gotchas

  • Скилл не вносит правки: он читает diff и выдаёт замечания. Исправления вносит агент только по явному запросу пользователя.
    • Эвристики: правила — регулярные выражения, возможны ложные срабатывания. Каждое замечание проверяй вручную перед публикацией.
    • SEC-007 (innerHTML/XSS) подавляется на строках, где применён escape-хелпер (esc(, escapeHtml(, sanitize( и т.п.) — такие находки ложные. Если экранирование происходит внутри вызываемой функции (например, renderCard()), проверь её вручную.
    • EDGE-004 (деление на переменную) не срабатывает внутри CSS url(...), data:-URI и URL со схемой (://) — / там не арифметика (например, http://.../svg).
  • Только добавленные строки: удалённые строки не ревьюятся, номера строк соответствуют новому файлу.
  • Без внешних зависимостей: только Python 3 stdlib; git нужен только для режима --repo.
  • Секреты: если найдены захардкоженные пароли/токены — не публикуй их в комментарии PR, сообщи приватно (DM/личный канал).
  • Severity не блокирует: отчёт — материал для ревьюера, а не автоматический gate.

🔗 Related

  • Pairs well with commit-message-writer (ревью до коммита) и github-repo-hygiene (гигиена репозитория после мержа).
  • Чек-лист правил: scripts/checklists.py — расширяй под свой стек (добавляй dict-правила).
  • Шаблон отчёта: templates/review-template.md.
  • Пример разбора PR: examples/example-pr.md.

Boundaries

  • Do not use for debugging a known runtime failure or generating tests; use systematic-debugger or test-generator.

Evidence and completion gate

Run the documented command against the user’s actual input. Report the command, exit status, files changed or produced, and relevant stdout/stderr. Separate blocked or pre-existing failures from failures introduced by the current work. Do not call the result complete when the script was only described or when an artifact was not reopened and checked.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.