systematic-debugging · spencerpauly — скилл для Claude Code: что делает
Заставляет ИИ-агента искать причину бага по шагам вместо случайных правок кода. Пригодится, когда поломку трудно поймать или она проявляется только в продакшене.
npx skills add spencerpauly/awesome-cursor-skills --skill systematic-debugging -a claude-codeЧто делает systematic-debugging
Скилл задаёт строгую дисциплину поиска ошибок. Сначала агент обязан надёжно воспроизвести дефект, зафиксировав шаги воспроизведения и параметры окружения. Без этого этапа правки кода запрещены. Затем агент локализует сбой: отсекает части кодовой базы бинарным поиском или запускает git bisect, если функциональность работала в прошлых коммитах.
После изоляции формулируется проверяемая гипотеза. Вместо хаотичных правок агент добавляет точечный лог или точку останова, чтобы подтвердить догадку фактами. Финал — минимальный фикс и регрессионный тест. В скилл вшито строгое правило: если за 15 минут прогресса нет, нужно остановиться и локализовать проблему заново.
Какие задачи решает
- локализовать регрессию в истории коммитов с помощью
git bisect - сформулировать и проверить точечную гипотезу о сбое перед изменением кода
- изолировать плавающий дефект или состояние гонки
- воспроизвести ошибку окружения между локальной машиной и продакшеном
Примеры запросов агенту
- Помоги найти причину ошибки через systematic-debugging: запрос падает при сохранении профиля.
- Примени systematic-debugging и выясни через git bisect, какой коммит сломал авторизацию.
- Используй методику systematic-debugging, чтобы локализовать баг с undefined в компоненте.
Как установить systematic-debugging
1Через Skills CLI (Vercel)
npx skills add spencerpauly/awesome-cursor-skills --skill systematic-debugging -a claude-code2Вручную: положить файлы
~/.claude/skills/systematic-debugging/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/systematic-debugging/
1Через Skills CLI (Vercel)
npx skills add spencerpauly/awesome-cursor-skills --skill systematic-debugging -a codex2Вручную: положить файлы
.agents/skills/systematic-debugging/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add spencerpauly/awesome-cursor-skills --skill systematic-debugging -a cursor2Вручную: положить файлы
.cursor/skills/systematic-debugging/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install spencerpauly/awesome-cursor-skills systematic-debugging2Вручную: положить файлы
.github/skills/systematic-debugging/SKILL.md1Через Skills CLI (Vercel)
npx skills add spencerpauly/awesome-cursor-skills --skill systematic-debugging -a gemini-cli2Командой платформы
gemini skills install https://github.com/spencerpauly/awesome-cursor-skills --path resources/systematic-debuggingВручную: положить файлы
.devin/skills/systematic-debugging/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add spencerpauly/awesome-cursor-skills --skill systematic-debugging -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о systematic-debugging
Как установить systematic-debugging в Claude Code?
Выполните команду npx skills add spencerpauly/awesome-cursor-skills --skill systematic-debugging -a claude-code. Инструкция сохранится в каталоге навыков Claude Code.
Что делает скилл systematic-debugging?
Он направляет агента по методичному процессу: воспроизведение бага, изоляция дефектного слоя, проверка гипотезы через логи и минимальное исправление.
Что делать, если агент застрял на одном баге?
По правилам скилла, если за 15 минут продвижения нет, агент обязан сделать шаг назад и заново изолировать проблему, а не угадывать исправления.
Исходный текст
SKILL.md · CC0-1.0
--- name: systematic-debugging description: Structured debugging methodology — reproduce, isolate, hypothesize, verify. Covers git bisect, binary search, logging, and minimal reproduction. user-invocable: true --- # Systematic Debugging Debug methodically instead of randomly changing code. ## The Process ### 1. Reproduce Before anything else, reproduce the bug reliably: - Get the exact steps to trigger the issue - Note the expected vs actual behavior - Confirm it happens consistently (not intermittent) - Record the environment (OS, Node version, browser, etc.) If you can't reproduce it, you can't fix it. Ask for more details. ### 2. Isolate Narrow down where the bug lives: **Binary search the codebase:** - Comment out half the system → does the bug persist? - If yes, the bug is in the remaining half → repeat - If no, the bug is in the commented-out half → repeat **Git bisect:** ```bash git bisect start git bisect bad # current commit is broken git bisect good <sha> # this commit was working # Git checks out the midpoint — test it git bisect good # or git bisect bad # Repeat until it finds the first bad commit git bisect reset # when done ``` **Isolate by layer:** - Is it frontend or backend? (Check network tab) - Is it the database? (Query directly) - Is it the API? (curl the endpoint) - Is it the component? (Render it in isolation) ### 3. Hypothesize Form a specific, testable hypothesis: - "The bug is caused by X because Y" - Not "something is wrong with the data" - Good: "The `userId` is null because the auth middleware doesn't run on this route" ### 4. Test the Hypothesis Write the smallest possible test that proves/disproves your hypothesis: - Add a `console.log` or breakpoint at the suspected location - Check the value of the suspected variable - If your hypothesis is wrong, go back to step 3 with new information - If it's right, you've found the bug ### 5. Fix and Verify - Apply the minimal fix - Verify the original reproduction steps no longer trigger the bug - Check for regressions — did the fix break anything else? - Write a test that would have caught this bug ## Debugging Tools | Scenario | Tool | |----------|------| | "It worked before" | `git bisect` | | "I don't know where this runs" | Add logging at entry/exit of suspect functions | | "The data looks wrong" | Inspect at each transformation step | | "It only fails in production" | Compare env vars, check logs, try to reproduce with prod data locally | | "It's intermittent" | Look for race conditions, timing issues, or uninitialized state | | "The error message is useless" | Search the codebase for where that error is thrown | ## Common Bug Patterns - **Off-by-one**: Array indices, pagination, date ranges - **Null/undefined**: Missing optional chaining, uninitialized state - **Race condition**: Async operations completing in unexpected order - **Stale closure**: React useEffect/useCallback capturing old values - **Type coercion**: `==` vs `===`, string vs number comparisons - **Missing await**: Forgetting `await` on async functions - **Environment mismatch**: Works locally, fails in CI/prod due to different env vars or versions ## Rules - Never guess — always verify with evidence - Fix the root cause, not the symptom - If you've spent 15 minutes without progress, step back and re-isolate - Document what you tried so you don't repeat failed approaches
© spencerpauly · CC0-1.0 · spencerpauly/awesome-cursor-skills
Похожие скиллы
Всё по теме «Тесты и QA» →Сначала — systematic-debugging от других авторов.