debug — скилл для Claude Code: что делает и как установить
Скилл ведёт от воспроизведения ошибки до причины, исправления и теста на регрессию. Нужен, когда симптом понятен, а источник сбоя нет.
npx skills add anthropics/knowledge-work-plugins --skill debug -a claude-codeЧто делает debug
Скилл проводит отладку по шагам: сначала сравнивает ожидаемое и фактическое поведение, уточняет воспроизведение и область проблемы. Затем сужает поиск до компонента, сервиса или участка кода, проверяет недавние деплои, настройки, зависимости, логи и сообщения об ошибках.
После этого агент формулирует гипотезы, проверяет их и прослеживает путь выполнения до корневой причины. В результате он описывает исправление, возможные побочные эффекты и крайние случаи, а также предлагает тесты для защиты от регрессии. Отчёт включает воспроизведение, причину, исправление и профилактические меры.
Если подключены monitoring, source control или project tracker, скилл использует их для логов, метрик, недавних изменений и связанных задач. Для сбоя после деплоя это повод проверить доступ к monitoring и source control заранее.
Какие задачи решает
- воспроизвести ошибку по сообщению или stack trace
- сопоставить ожидаемое и фактическое поведение
- найти участок кода, который вызывает сбой
- проверить недавний деплой или изменение зависимости
- подготовить исправление и тест на регрессию
Примеры запросов агенту
- `/debug Пользователь получает ошибку после деплоя, приложи stack trace и найди причину`
- `/debug В staging всё работает, а в prod запросы завершаются ошибкой. Сравни поведение и последние изменения`
- `/debug После обновления зависимости сломалась обработка больших payload. Воспроизведи проблему и предложи тест`
Как установить debug
1Через Skills CLI (Vercel)
npx skills add anthropics/knowledge-work-plugins --skill debug -a claude-code2Вручную: положить файлы
~/.claude/skills/debug/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/debug/
1Через Skills CLI (Vercel)
npx skills add anthropics/knowledge-work-plugins --skill debug -a codex2Вручную: положить файлы
.agents/skills/debug/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add anthropics/knowledge-work-plugins --skill debug -a cursor2Вручную: положить файлы
.cursor/skills/debug/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install anthropics/knowledge-work-plugins debug2Вручную: положить файлы
.github/skills/debug/SKILL.md1Через Skills CLI (Vercel)
npx skills add anthropics/knowledge-work-plugins --skill debug -a gemini-cli2Командой платформы
gemini skills install https://github.com/anthropics/knowledge-work-plugins --path engineering/skills/debugВручную: положить файлы
.devin/skills/debug/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add anthropics/knowledge-work-plugins --skill debug -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
Из того же набора89
Весь набор →Похожие
Вопросы о debug
Что делает скилл debug?
Он ведёт структурированную отладку: помогает воспроизвести проблему, локализовать участок кода, проверить гипотезы, найти корневую причину и подготовить исправление с тестом на регрессию.
Какие данные нужны для работы debug?
Полезны точное сообщение об ошибке или stack trace, шаги воспроизведения, недавние изменения, логи, скриншоты и описание ожидаемого поведения. Подключённые monitoring, source control и project tracker расширяют проверку.
Исходный текст
SKILL.md · Apache-2.0
--- name: debug description: Structured debugging session — reproduce, isolate, diagnose, and fix. Trigger with an error message or stack trace, "this works in staging but not prod", "something broke after the deploy", or when behavior diverges from expected and the cause isn't obvious. argument-hint: "<error message or problem description>" --- # /debug > If you see unfamiliar placeholders or need to check which tools are connected, see [CONNECTORS.md](../../CONNECTORS.md). Run a structured debugging session to find and fix issues systematically. ## Usage ``` /debug $ARGUMENTS ``` ## How It Works ``` ┌─────────────────────────────────────────────────────────────────┐ │ DEBUG │ ├─────────────────────────────────────────────────────────────────┤ │ Step 1: REPRODUCE │ │ ✓ Understand the expected vs. actual behavior │ │ ✓ Identify exact reproduction steps │ │ ✓ Determine scope (when did it start? who is affected?) │ │ │ │ Step 2: ISOLATE │ │ ✓ Narrow down the component, service, or code path │ │ ✓ Check recent changes (deploys, config changes, dependencies) │ │ ✓ Review logs and error messages │ │ │ │ Step 3: DIAGNOSE │ │ ✓ Form hypotheses and test them │ │ ✓ Trace the code path │ │ ✓ Identify root cause (not just symptoms) │ │ │ │ Step 4: FIX │ │ ✓ Propose a fix with explanation │ │ ✓ Consider side effects and edge cases │ │ ✓ Suggest tests to prevent regression │ └─────────────────────────────────────────────────────────────────┘ ``` ## What I Need From You Tell me about the problem. Any of these help: - Error message or stack trace - Steps to reproduce - What changed recently - Logs or screenshots - Expected vs. actual behavior ## Output ```markdown ## Debug Report: [Issue Summary] ### Reproduction - **Expected**: [What should happen] - **Actual**: [What happens instead] - **Steps**: [How to reproduce] ### Root Cause [Explanation of why the bug occurs] ### Fix [Code changes or configuration fixes needed] ### Prevention - [Test to add] - [Guard to put in place] ``` ## If Connectors Available If **~~monitoring** is connected: - Pull logs, error rates, and metrics around the time of the issue - Show recent deploys and config changes that may correlate If **~~source control** is connected: - Identify recent commits and PRs that touched affected code paths - Check if the issue correlates with a specific change If **~~project tracker** is connected: - Search for related bug reports or known issues - Create a ticket for the fix once identified ## Tips 1. **Share error messages exactly** — Don't paraphrase. The exact text matters. 2. **Mention what changed** — Recent deploys, dependency updates, and config changes are top suspects. 3. **Include context** — "This works in staging but not prod" or "Only affects large payloads" narrows things fast.
© anthropics · Apache-2.0 · anthropics/knowledge-work-plugins