From c3
Systematic bug fixing with TDD approach. Use when fixing bugs, debugging issues, or investigating problems. Accepts bug descriptions in any format, coordinates analyst/reviewer agents, creates tests before fixes, produces analysis reports.
How this skill is triggered — by the user, by Claude, or both
Slash command
/c3:bug-fixingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A systematic, test-driven workflow for fixing software bugs with agent coordination.
A systematic, test-driven workflow for fixing software bugs with agent coordination.
| Capability | Description |
|---|---|
| Bug Intake | Accept text, issue references, or structured bug reports |
| Analysis | Root cause investigation with functional analyst review |
| TDD Approach | Failing test first, then fix implementation |
| Verification | Run make check; report the fix back to the caller for review + PR |
| Documentation | Bug analysis reports with issue comments |
Use this skill when:
Parse bug description → Detect project context → Extract details → Assign ID
Input Formats:
Project Detection:
| Detect | Method |
|---|---|
| Language | pyproject.toml, package.json, Cargo.toml |
| Framework | Config files (Django, React, Vue) |
| Test framework | pytest.ini, jest.config.js, vitest.config.ts |
| Conventions | .prettierrc, pylintrc, ruff.toml |
Invoke functional-analyst agent to:
Create bug analysis report:
docs/bug-analysis/{bug-id}.mdAnalyst outcomes:
| Outcome | Action |
|---|---|
| Confirmed (no UI) | Proceed to Phase 3 |
| Confirmed (with UI) | Proceed, note UI review needed |
| Rejected | Document reason, close bug |
Apply systematic debugging framework:
| Step | Action |
|---|---|
| Isolate | Reproduce consistently, identify boundaries |
| Gather Info | Log strategically, compare working vs broken |
| Hypothesize | Specific testable hypotheses, one variable at a time |
| Validate | Run tests, document findings |
RCA Techniques:
Critical: Create failing test BEFORE implementing fix.
Determine test type:
| Bug Type | Test Type |
|---|---|
| Logic/validation | Unit test |
| Integration/API | Integration test |
| User flow | E2E test |
Create test that demonstrates bug:
# Example: Test expects current (incorrect) behavior
def test_login_button_disabled():
result = login_button.is_enabled()
assert result == False # Passes, proving bug exists
Run test to confirm reproduction
make check (test + typecheck + lint + format) — must pass before reporting doneDo NOT commit, create a branch, open a PR, or run review here. This skill
diagnoses and fixes; the caller runs the review cycle (c3:project-review) and
creates the PR (via c3:release-manager in project mode). See Phase 7.
Do NOT close the issue. Issue closure is handled post-merge by
c3:project-post-merge (via release-manager), after the owner merges the PR.
This skill does NOT run the review cycle or create the PR. Report back to the
caller (project-manage, or the main session) so it can run c3:project-review
and create the PR.
Determine scope from what the bug touched:
| Scope | When |
|---|---|
| Backend | logic, API, data model, no UI |
| Frontend | UI/UX changes |
| Full stack | both |
| + security | auth, PII, input handling, external API, files, config |
Report:
## Bug Fix Ready for Review
**Issue:** #{number}
**Bug ID:** {bug-id}
**Summary:** {one-line}
**Root Cause:** {technical cause}
**Test Added:** {test file}:{test name}
**make check:** ✅ passing
**Files Modified:** {list}
**Scope:** {backend | frontend | full | docs} (+ security?)
**Bug Analysis Report:** docs/bug-analysis/{bug-id}.md
**Commit Message:** fix: {summary} (#{number})
Ready for c3:project-review, then PR.
The caller then:
c3:project-review (scoped to this bug) — functional, domain, quality, docs, make check.c3:release-manager in project mode).Rejection Handling (when the caller returns feedback from c3:project-review):
| Scenario | Max Iterations | Escalation |
|---|---|---|
| Review rejects fix | 2 rounds | Caller escalates to owner |
| make check fails | 3 attempts | Ask user |
| Cannot reproduce | 1 request | Close bug |
PR creation, CI follow-up, and marking ready for review are handled by the
caller (c3:project-manage via c3:release-manager), after c3:project-review
approves the fix — mirroring the feature workflow. This skill stops at Phase 7.
See patterns/bug-analysis-template.md for the full template.
Key sections:
See patterns/test-creation-patterns.md for platform-specific guidance.
Common bug categories:
| Platform | Common Causes | Debug Focus |
|---|---|---|
| Frontend | Async race conditions, stale state | Timeline, state changes |
| Backend | N+1 queries, connection exhaustion | Query patterns, logs |
| Mobile | Device/OS variations, memory leaks | Environment, profiling |
| Database | Missing indexes, stale statistics | Query plans, metrics |
This skill does NOT handle:
| Issue | Solution |
|---|---|
| Cannot reproduce | Request more info, check environment differences |
| Tests keep failing | Analyze if fix incomplete or test incorrect |
| Multiple fix proposals | Analyst recommends, user decides |
| Review rejects fix (via c3:project-review) | Caller returns feedback; iterate (max 2 rounds) |
make check)These review the fix, invoked by c3:project-review (the caller runs it), not by this skill:
patterns/bug-analysis-template.md - Bug analysis report templatepatterns/test-creation-patterns.md - Platform-specific test patternspatterns/rca-techniques.md - Root cause analysis techniquesnpx claudepluginhub christophevg/marketplace --plugin c3Creates, edits, and verifies skills using a test-driven development approach with pressure scenarios and subagents.