fix-bug
БесплатноБез исполняемых скриптовНе проверенSystematic bug investigation, resolution, and documentation. Use when fixing bugs that need thorough analysis, test coverage, and a formal bugfix report…
от ArjenSchwarz★ 20 звёзд на GitHubОб этом скилле
Bug Fix Workflow
Fix bugs systematically while ensuring proper test coverage and documentation. Simple bugs are fixed directly; complex bugs get multiple competing implementations to find the best solution.
Transit Integration
If a T-[number] ticket is mentioned (e.g., T-42), track it throughout the workflow:
- Extract the display ID from the reference
- Automatically create a branch named
T-{number}/bugfix-{bug-name}(no user prompt needed) - Move the ticket to
in-progressstatus after branch creation. Add a comment: "Starting bugfix — investigating on branch T-{number}/bugfix-{bug-name}" - Move the ticket to
ready-for-reviewstatus after the PR is created. Add a comment: "Fix ready for review — PR #{pr-number}"
Use mcp__transit__update_task_status with the display ID to update status. Always include a comment when changing status.
If no Transit ticket is mentioned, skip all Transit-related steps.
Workflow
1. Bug Name
Determine a concise, descriptive bug name (kebab-case) for the report directory. Derive from the issue description or ask the user if unclear.
2. Branch Creation
When a Transit ticket is present: If the current branch already matches T-{number}/bugfix-* (e.g., in a worktree), skip branch creation. Otherwise, automatically create a branch named T-{number}/bugfix-{bug-name} and switch to it. Do not ask for permission. Move the ticket to in-progress status.
When no Transit ticket is present: Use AskUserQuestion to offer branch naming options:
bugfix/{bug-name}- Standard bugfix branch- Skip branch creation
3. Systematic Investigation
Invoke the systematic-debugger skill to perform structured root cause analysis:
- Phase 1: Initial Overview (problem statement)
- Phase 2: Systematic Inspection (identify defects)
- Phase 3: Root Cause Analysis (Five Whys)
- Phase 4: Solution & Verification (proposed fixes)
Capture findings for the bugfix report.
4. Create Regression Tests
Before implementing the fix, write tests that prove the bug exists:
- Write one or more failing tests that reproduce the bug
- Run the tests to confirm they fail as expected — this is the "red" in red/green TDD
- These tests become the acceptance criteria: the bug is fixed when they pass
The tests should:
- Be minimal and focused on the specific bug
- Include a descriptive name referencing the bug
- Document the expected vs actual behaviour in comments
Do not implement the fix yet. The tests must fail at this point.
5. Generate Initial Bugfix Report
Create specs/bugfixes/<bug-name>/report.md using the template in references/report-template.md. At this stage the "Resolution" section will be empty — it gets filled in after the fix is implemented.
6. Commit Investigation Checkpoint
Commit everything so far (failing tests + report + any investigation artifacts) using the /commit skill. This creates a clean baseline that competing implementations can branch from.
The commit message should indicate this is the investigation phase, e.g.: T-42: Add investigation report and failing regression tests for {bug-name}
7. Assess Difficulty
Evaluate the bug's complexity based on the investigation findings. Consider:
- Number of files affected — single file vs cross-cutting changes
- Root cause clarity — straightforward logic error vs subtle interaction
- Risk of side effects — isolated change vs changes near critical paths
- Multiple valid approaches — one obvious fix vs several plausible strategies
Simple bugs (single clear fix, low risk, few files): proceed to Step 8A. Complex bugs (multiple possible approaches, higher risk, cross-cutting, or subtle root cause): proceed to Step 8B.
Take the complex path when the investigation leaves several plausible fixes or a subtle root cause. It costs three agent runs, so a clear single-cause bug stays on the simple path.
8A. Simple Fix (Direct Implementation)
For straightforward bugs:
- Implement the fix
- Run the regression tests to confirm they now pass (the "green")
- Run the full test suite to ensure no breakage
- Run linters/validators as per project conventions
- Skip to Step 10.
8B. Complex Fix (Competing Implementations)
For complex bugs, spawn multiple agents that independently implement the fix. Each agent works in an isolated worktree branched from the current commit (which has the failing tests).
8B.1 Prepare Implementation Brief
Write a concise implementation brief that all agents receive. Include:
- The root cause from the investigation (Phase 3 findings)
- The proposed solution(s) from Phase 4
- Paths to the failing test files so agents can verify their fix
- The project's test/lint commands (from Makefile or project conventions)
- Any constraints or areas to avoid
8B.2 Spawn Competing Agents
Launch 3 agents in parallel, each in its own worktree. Use the exact tools specified below — do not substitute different tools or MCP agents
Установить fix-bug в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл fix-bug?
Systematic bug investigation, resolution, and documentation. Use when fixing bugs that need thorough analysis, test coverage, and a formal bugfix report. Applies systematic debugging methodology, creates regression tests, and generates a standardized report in specs/bugfixes/<bug-name>/. For complex bugs, spawns competing implementation agents (including alternative harnesses like Kiro) and selects the best solution. Triggers on requests like "fix this bug", "debug and document this issue", or when a bug needs both resolution and documentation.
Как установить скилл fix-bug?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fix-bug запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic