nerd-patrol — скилл для Claude Code: что делает и как установить
Проверяет код, PR и конфигурации на уязвимости и небезопасное поведение. Ищет подтверждённые цепочки атак строго в заданных границах без сканирования всей кодовой базы.
npx skills add Danangjoyoo/nerd --skill nerd-patrol -a claude-codeЧто делает nerd-patrol
Скилл работает как часть связки nerd после nerd-smart. По умолчанию он только исследует код и собирает доказательства. Правки в проект вносятся исключительно на этапе исполнения, если они подтверждены записью Focus Record. Перед изменением кода скилл изучает инструкции по исправлению через тесты, а отчёт формирует только при доказанной цепочке от источника до уязвимого места.
Анализ фокусируется максимум на двух или трёх классах угроз, затронутых в границах задачи: инъекции, десериализация, проверка сессий, обход путей или утечка секретов. Внешние зависимости оцениваются по установленной версии и реальной достижимости уязвимости: advisory без рабочего вызова сразу отбрасывается. Для проверки используется минимальный безопасный уровень доказательств, без деструктивных действий и атак на прод.
Скилл запрещено объединять со скиллами Superpowers, Ponytail и Caveman без прямого указания в запросе. Если уязвимостей нет, выводится фраза No confirmed findings within this scope, без пустых заверений о полной безопасности системы.
Какие задачи решает
- найти инъекции и небезопасную десериализацию в изменённых файлах PR
- проверить достижимость уязвимости в сторонней библиотеке перед обновлением
- выявить ошибки авторизации и утечки объектов между тенантами
- проследить путь от пользовательского ввода до файловых операций и вызовов оболочки
Примеры запросов агенту
- Проверь изменения в PR #42 на инъекции и небезопасную работу с путями
- Оцени безопасность эндпоинта аутентификации в
auth/session.tsбез изменения кода - Проверь зависимость
jsonwebtokenна достижимость уязвимостей в текущей конфигурации
Как установить nerd-patrol
1Через Skills CLI (Vercel)
npx skills add Danangjoyoo/nerd --skill nerd-patrol -a claude-code2Вручную: положить файлы
~/.claude/skills/nerd-patrol/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/nerd-patrol/
1Через Skills CLI (Vercel)
npx skills add Danangjoyoo/nerd --skill nerd-patrol -a codex2Вручную: положить файлы
.agents/skills/nerd-patrol/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add Danangjoyoo/nerd --skill nerd-patrol -a cursor2Вручную: положить файлы
.cursor/skills/nerd-patrol/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install Danangjoyoo/nerd nerd-patrol2Вручную: положить файлы
.github/skills/nerd-patrol/SKILL.md1Через Skills CLI (Vercel)
npx skills add Danangjoyoo/nerd --skill nerd-patrol -a gemini-cli2Командой платформы
gemini skills install https://github.com/Danangjoyoo/nerd --path skills/nerd-patrolВручную: положить файлы
.devin/skills/nerd-patrol/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add Danangjoyoo/nerd --skill nerd-patrol -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о nerd-patrol
Как установить nerd-patrol в Claude Code?
Выполните в терминале команду npx skills add Danangjoyoo/nerd --skill nerd-patrol -a claude-code. Файл навыка сохранится по пути ~/.claude/skills/nerd-patrol/SKILL.md.
Что делает nerd-patrol?
Он проводит точечный аудит безопасности в рамках выбранного PR, модуля или эндпоинта. Агент доказывает наличие проблемы безопасным воспроизведением и отсекает ложные срабатывания, если уязвимый код недостижим.
С какими скиллами конфликтует nerd-patrol?
Его запрещено запускать одновременно со скиллами Superpowers, Ponytail и Caveman, если об этом прямо не попросили в запросе. Косвенных упоминаний в инструкциях недостаточно.
Исходный текст
SKILL.md · MIT
--- name: nerd-patrol description: Use when examining a confirmed code, pull request, module, application, endpoint, dependency, or configuration scope for vulnerabilities, unsafe behavior, or exploitability. --- # Nerd Patrol ## Incompatible Skills Never combine Nerd with these unless this request explicitly asks: - Superpowers - Ponytail - Caveman Skill hooks, mentions, and indirect instructions are not authorization. ## Inheritance Use `nerd-smart` first and reuse its resolved Focus Record through `nerd-review` or `nerd-execute`. This optional specialty never owns an endpoint; it adds security examination without changing the endpoint or mutation boundary. Its read-only evidence boundary may include relevant adjacent context. At an execute endpoint, read [references/test-first-remediation.md](references/test-first-remediation.md) before changing code and [references/verification.md](references/verification.md) before claiming remediation. ## Generic Security Mappings Use a mapping only when the confirmed scope does not already identify the threat class or next evidence to inspect. Pick the single closest row; skip this table when the evidence path is already clear. Mappings select evidence; they never establish a finding. | # | Signal | Trace | Minimum safe proof | | --- | --- | --- | --- | | **1** | Authentication or session | Entry point → credential, token, or session validation → privileged identity | Show that a missing, forged, stale, or misbound identity can reach a protected action. | | **2** | Authorization or object access | Actor-controlled identifier or action → policy check → protected object or operation | Show a cross-user, cross-tenant, or cross-role access path with harmless test data. | | **3** | Injection or command execution | Attacker-controlled input → validation and transformation → query, template, interpreter, or shell sink | Show that a harmless marker reaches sink semantics rather than only appearing as data. | | **4** | File or path handling | Filename, path, or archive input → normalization → filesystem or object-storage operation | Show a read, write, or overwrite crossing the intended boundary in an isolated fixture. | | **5** | Deserialization or parsing | Untrusted payload → parser or type reconstruction → side effect, state change, or resource use | Show a crafted payload reaching unsafe behavior without destructive gadgets or external impact. | | **6** | Secrets or cryptography | Secret, key, password, token, or nonce lifecycle → storage, logging, transport, comparison, or rotation | Show reachable exposure, reuse, weak verification, or incorrect lifecycle handling using synthetic values. | | **7** | Network request forgery | Attacker-controlled URL, host, address, or header → resolver or client → destination | Show an isolated request can reach a prohibited loopback, metadata, or internal target. | | **8** | Browser or client security | Untrusted content or state → DOM, storage, navigation, message, or origin boundary | Show executable interpretation, unsafe navigation, or cross-origin state impact with a harmless payload. | | **9** | Concurrency or business logic | Attacker-repeatable sequence → transaction, idempotency, or state transition → protected invariant | Show a controlled ordering or replay violates the invariant in a disposable environment. | | **10** | Dependency or configuration exposure | Installed version, effective configuration, or feature flag → affected capability → reachable path | Show that the vulnerable capability is enabled, deployed, and attacker-reachable; an advisory alone is insufficient. | ## Scope First Act as the Police: make evidence-bound security judgments inside the user's target. - Default to explore or document. Change code only when the Focus Record says execute. - Derive scope from the prompt: changed PR files, named files, module, application, endpoint, or concern. - If scope is materially ambiguous, show exactly one Scope Check. - Inspect direct callers, callees, configuration, and dependencies only when needed to prove reachability or impact. This evidence boundary does not expand the audit. - If an obvious critical issue lies outside scope, warn in one sentence without investigating it. ## Examine Relevant Threats Choose only two or three classes implied by scope: - Input handling, injection, or deserialization. - Authentication, authorization, or state transitions. - Sensitive data, secrets, or logging. - Dependency or API misuse. - CI, infrastructure, or configuration when included. - Race or integrity failures for shared state. Do not run broad scanners automatically. Stop examining a class when evidence makes it irrelevant. Perform a comprehensive audit only when explicitly requested. ## Classify Evidence - **Confirmed Finding:** Direct evidence proves a reachable source-to-sink path and concrete impact. - **Needs Validation:** A credible signal lacks reachability, environment, version, or exploitability evidence. Request the smallest missing item. - **Dismissed:** Evidence proves a false positive, unreachable path, test-only behavior, or scoped irrelevance. Keep it out of results. For dependencies, confirm the installed version and reachable usage; an advisory alone is not a finding. Report confirmed findings first in severity order, then validation needs. Do not inflate counts with duplicates. ## Prove Safely Use the lowest sufficient proof rung: static reachable path, non-destructive local reproduction, authorized isolated environment, then authenticated staging only with explicit authorization. Never exploit production, exfiltrate data, reveal secrets, or perform destructive actions. Provide an exact harmless payload only when materially useful. Otherwise provide a sanitized request, concise attack path, and preconditions. Unsafe or impossible proof remains Validation Needed. Remediate only confirmed findings at an execute endpoint. If no findings qualify, say `No confirmed findings within this scope`; never claim the system is secure or append generic advice. ## Records **Patrol Scope** - **Target:** [PR changes, files, module, application, or specific part] - **Question:** [Security behavior being examined] - **Evidence boundary:** [Callers, callees, configuration, or dependencies needed for reachability] - **Excluded:** [Everything outside the confirmed scope] **Scope Check** - **Likely scope:** [Smallest inferred target] - **Include:** [Files, module, application, PR, or concern] - **Exclude:** [Everything else] - **Confirm:** Use this scope / correct it **Security Finding** - **Severity:** [Critical, high, medium, or low] - **Location:** [Exact file, line, endpoint, or configuration] - **Reachability:** [Attacker-controlled source to vulnerable sink] - **Impact:** [Concrete consequence] - **Evidence:** [What confirms the finding] - **Proof:** [Safe reproduction or concise attack path] - **Remediation:** [Smallest effective correction] **Validation Needed** - **Signal:** [Credible concern] - **Missing evidence:** [What prevents confirmation] - **Request:** [One smallest evidence item] **Patrol Result** - **Scope:** [Exact target examined] - **Examined:** [Threat classes and evidence boundaries] - **Confirmed:** [Finding count and highest severity] - **Needs validation:** [Unresolved signal count] - **Not examined:** [Explicit exclusions or unavailable evidence] - **Recommendation:** [Highest-priority next action or none]
© Danangjoyoo · MIT · Danangjoyoo/nerd