fix-bug
БесплатноБез исполняемых скриптовНе проверенInvestigate and fix a bug: analysis, reproduction, a regression test seen red, the fix, then a like-for-like recheck. Use when the work is a bug, whatever its…
от torrust★ 539 звёзд на GitHubОб этом скилле
Fixing Bugs
Use this skill whenever the requested work is substantively a bug: observed behavior is broken,
incorrect, stale, misleading, unexpectedly failing, or regressed. Apply it even when the issue type,
GitHub label, branch name, or user wording does not say bug.
This skill is the canonical bug-fix workflow. Other artifacts should state when to load it and what sections or evidence are required, but should not duplicate the operational process.
Required Sequence
Complete these steps in order unless a step is infeasible. When a step is infeasible, record why, what was attempted, and the strongest substitute evidence before moving on.
- Analyze the defect. Read the issue, reproduction notes, nearby code, and relevant tests. Identify the code path that decides the broken behavior and write down the current local hypothesis.
- Reproduce against a real artifact. Run the application, CLI, test binary, script, or command
that demonstrates the bug as a user or operator would see it. Record the exact command,
toolchain/runtime, relevant output, and logs in issue-local
manual-verification-evidence.md. - Select the regression-test boundary. Choose the smallest deterministic maintained test that can fail for the defect and pass for the fix. Prefer a unit test at the causal seam. Use an integration or end-to-end test only when it is the clearer or only practical boundary, and record the rationale.
- Prove the regression test is red. Add the maintained automatic test before changing
production behavior when practical, run it against the broken implementation, and record the
failing command and output. If the fix already exists, use the
write-unit-testskill's mutate-then-restore method: reintroduce the bug without staging it, observe the test fail, and restore the production file. Try the nearest plausible bug variants when stale or cached state could make a weaker test pass. - Fix the code. Make the smallest production change that addresses the root cause. Keep the change scoped to the behavior under investigation.
- Verify green and recheck like-for-like. Rerun the regression test and any focused affected tests. Then rerun the original real-artifact reproduction, or record the infeasibility constraint and strongest substitute evidence if the original reproduction cannot be repeated.
A passing automated test is not a substitute for the final real-artifact recheck. The recheck proves that the artifact-level symptom observed at the start is gone.
Run the final recheck, and the after measurement when the issue plans one, after the last production change, including changes made to answer review findings. If production code changes after them, repeat both, and name in the evidence the commit whose build they ran on. In issue #2505 both were labelled final although later review fixes changed the code they measured, and a reviewer had to ask for them to be repeated.
Evidence Requirements
Record evidence in the issue folder so later reviewers can audit what happened without relying on chat history or retained agent state.
For every bug, create or update manual-verification-evidence.md from
docs/templates/MANUAL-VERIFICATION-EVIDENCE.md. Include:
- the original symptom and the current hypothesis;
- the real-artifact reproduction command or interaction, with actual output and relevant logs;
- the toolchain, runtime, configuration, database backend, container image, service URL, or other environment details that can affect behavior;
- the regression-test boundary selected and why it is the smallest deterministic maintained test;
- red regression-test output for every maintained regression test;
- green regression-test output after the fix;
- the final like-for-like manual recheck output; and
- when real-artifact reproduction is infeasible, or no maintained regression test is practical, the attempted commands, blocking constraint, and strongest substitute evidence.
Keep every artifact the evidence relies on in the issue folder, never only under a git-ignored
path such as .tmp/; the template's "Preserving Verification Artifacts" section says where.
Identify PR-branch code states by Conventional Commit subject, never by branch commit id: every
rebase onto develop rewrites the ids and orphans the cited objects, so a merged evidence file
would point at commits no clone of develop carries. Commit ids are durable only for commits
already on develop, tags, or external repositories.
Use issue-local notes, not memory, as the source of truth. Traceability and accountability are part of the project quality bar.
Regression-Test Boundary Rules
Prefer this order:
- Unit test at the causal decision seam: fast, deterministic, isolated, and directly explains the defect.
- Collaboration or integration test when the behavior is only observable through multiple project components or a collaborator-owned rul
Установить fix-bug в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл fix-bug?
Investigate and fix a bug: analysis, reproduction, a regression test seen red, the fix, then a like-for-like recheck. Use when the work is a bug, whatever its labels say.
Как установить скилл fix-bug?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fix-bug запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic