systematic-debugging · autohandai — скилл для Claude Code
Скилл запрещает агенту угадывать правки наугад при сбоях тестов или пайплайнов. Он обязывает сначала воспроизвести ошибку, подтвердить первопричину и написать регрессионный тест.
npx skills add autohandai/code-cli --skill systematic-debugging -a claude-codeЧто делает systematic-debugging
Инструкция делит процесс отладки на четыре строгих этапа. Сначала модель изучает стектрейс и воспроизводит сбой через run_command. Затем она сверяет недавние изменения в git_diff или git_log и находит рабочий аналог в кодовой базе для точного сравнения поведения.
Код исправления запрещено предлагать до подтверждения причины на третьем этапе. Каждая гипотеза строится по шаблону «X вызывает Y из-за Z» и проверяется изолированно, одной переменной за раз. Перед внесением исправлений агент обязан написать падающий тест и отказаться от сопутствующего рефакторинга. После трёх неудачных правок скилл предписывает остановиться и пересмотреть архитектуру с разработчиком, так как это признак проблемы дизайна, а не простого бага.
Какие задачи решает
- локализовать причину падения тестов без слепого перебора правок
- изолировать сбой в CI через сравнение окружения и свежего диффа
- составить регрессионный тест перед внесением исправлений в код
- отследить искажение данных на границах модулей через точечное логирование
Примеры запросов агенту
- Тест auth.spec.ts падает в CI с таймаутом, локализуй причину по шагам через git_diff и run_command.
- После обновления библиотек ломается сборка, сформулируй гипотезу и проверь её минимальным изменением.
- Эндпоинт /api/orders отдаёт 500 при пустой корзине, напиши падающий регрессионный тест и предложи точечный фикс.
Как установить systematic-debugging
1Через Skills CLI (Vercel)
npx skills add autohandai/code-cli --skill systematic-debugging -a claude-code2Вручную: положить файлы
~/.claude/skills/systematic-debugging/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/systematic-debugging/
1Через Skills CLI (Vercel)
npx skills add autohandai/code-cli --skill systematic-debugging -a codex2Вручную: положить файлы
.agents/skills/systematic-debugging/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add autohandai/code-cli --skill systematic-debugging -a cursor2Вручную: положить файлы
.cursor/skills/systematic-debugging/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install autohandai/code-cli systematic-debugging2Вручную: положить файлы
.github/skills/systematic-debugging/SKILL.md1Через Skills CLI (Vercel)
npx skills add autohandai/code-cli --skill systematic-debugging -a gemini-cli2Командой платформы
gemini skills install https://github.com/autohandai/code-cli --path src/skills/builtin/systematic-debuggingВручную: положить файлы
.devin/skills/systematic-debugging/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add autohandai/code-cli --skill systematic-debugging -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о systematic-debugging
Как установить systematic-debugging в Claude Code?
Выполните команду npx skills add autohandai/code-cli --skill systematic-debugging -a claude-code. Конфигурация скилла будет сохранена в ~/.claude/skills/systematic-debugging/SKILL.md.
Что делает скилл systematic-debugging?
Он задаёт жёсткий протокол поиска багов: агент обязан воспроизвести ошибку, сравнить её с рабочим кодом, проверить одиночную гипотезу и написать регрессионный тест до внесения правок.
Что происходит, если баг не удаётся устранить с трёх попыток?
Инструкция запрещает продолжать перебор вариантов: агент обязан остановиться и обсудить архитектурные решения с пользователем.
Исходный текст
SKILL.md · Apache-2.0
--- name: systematic-debugging description: Find the root cause before proposing any fix. Use when something fails, throws, hangs, flakes, or behaves unexpectedly, including failing tests and CI. Auto-activates for bug reports. allowed-tools: read_file find_grep fff_find list_tree git_diff git_log git_status run_command search_with_context --- # Debug systematically A fix without a confirmed cause is a guess, and guesses cost more than they save. Work the four phases in order; do not propose code before Phase 3 confirms a cause. ## Phase 1 — Reproduce and read - Read the whole error: message, stack, exit code, the lines around it. The answer is often already there. - Reproduce on purpose. Run the failing command, test, or scenario yourself with `run_command`. If it cannot be reproduced, gather more evidence instead of guessing. - Note what changed: `git_log` and `git_diff` for the touched area, new dependencies, config, environment (CI vs local, OS, shell, terminal, load). - For multi-layer systems, add cheap instrumentation at each boundary and run once to see where the data goes wrong. Fix where it originates, not where it surfaces. ## Phase 2 — Compare with what works - Find the nearest working example in the same codebase and list every difference, however small. Do not assume a difference cannot matter. - Read the reference implementation completely before adapting a pattern. ## Phase 3 — One hypothesis, one test - Write the hypothesis down in one sentence: "X causes Y because Z." - Test it with the smallest possible change or probe. One variable at a time. - If it fails, form a new hypothesis. Do not stack fixes. After three failed fixes, stop and question the design with the user; that is an architecture problem, not a bug. ## Phase 4 — Fix with a regression test - Write the failing test first; it must fail for the reason you found. - Apply the single fix. No bundled refactors or "while I am here" edits. - Run the test, the neighbouring suites, lint, and the project's proof command. - Report what the cause was, what you changed, and what you verified. If the cause was environmental (load, disk, timing), say so with the evidence. ## Red flags that mean "back to Phase 1" "Quick fix for now", "just try changing X", "I do not fully understand but this might work", "one more attempt" after two failures.
© autohandai · Apache-2.0 · autohandai/code-cli
Похожие скиллы
Все скиллы по теме «Тесты и QA» →Сначала — systematic-debugging от других авторов.