Best for
- Use when the user wants to fix a bug, debug an issue, resolve an error, or investigate a failing test.
mgiovani/cc-arsenal/skills/fix-bug/SKILL.md
Fixes a bug through test-driven debugging, reproduces it with a failing test, locates the root cause with evidence (file:line), then applies the smallest fix that resolves it without refactoring unrelated code. Use when the user wants to fix a bug, debug an issue, resolve an error, or investigate a failing test. Not for building new functionality (use implement-feature) or restructuring working code with no bug involved (use refactor).
Decision brief
Fix the bug described by the user (a plain description, an issue ID, or a failing test name) using test-driven debugging: reproduce it, find the root cause with evidence, apply the smallest fix, verify, commit.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/mgiovani/cc-arsenal --skill "skills/fix-bug"Inspect the Agent Skill "fix-bug" from https://github.com/mgiovani/cc-arsenal/blob/410f2649860bb1892ee8c66721f57462eeefcf13/skills/fix-bug/SKILL.md at commit 410f2649860bb1892ee8c66721f57462eeefcf13. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Most bugs are a single file, single root cause, fixable and verifiable in one sitting. For those, run Phases 0–5 below yourself, in order, inline: no task chain, no subagent fan-out. That's the default; don't create tasks unless the case below applies.
Discover the project's test, lint, and type-check commands before touching anything: guessing wastes a cycle when the wrong command silently no-ops.
Goal: understand the bug, locate it in code, reproduce it reliably.
Goal: a minimal, focused fix that addresses the root cause without side effects.
1. Apply the fix with Edit: minimal, focused changes. 2. Run the specific failing test and confirm it now passes. If it doesn't, that means the root-cause theory was wrong or incomplete, go back to Phase 1, not to a bigger patch on top of the current one. 3. Run the full test su…
Permission review
The documentation asks the agent to read local files, directories, or repositories.
**Verify root cause**: locate the bug with grep/read evidence (file path, line number), not intuition.The documentation asks the agent to read local files, directories, or repositories.
**Find the root cause.** For a localized bug, just grep/read the relevant file yourself. Reserve parallel subagents for bugs spanning multiple files or with unclear scope:The documentation includes network, browsing, or remote request actions.
"Search Context7/web for documented solutions or known issues matchingThe documentation asks the agent to run terminal commands or scripts.
git add [files modified]The documentation asks the agent to run terminal commands or scripts.
git commit -m "fix: [concise description of what was fixed]Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 89/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 6 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Fix the bug described by the user (a plain description, an issue ID, or a failing test name) using test-driven debugging: reproduce it, find the root cause with evidence, apply the smallest fix, verify, commit.
A fix that "should work" but was never run against a failing test is a guess, not a fix:
Most bugs are a single file, single root cause, fixable and verifiable in one sitting. For those, run Phases 0–5 below yourself, in order, inline: no task chain, no subagent fan-out. That's the default; don't create tasks unless the case below applies.
Use a task chain instead when the bug spans multiple files/components, the root
cause is unclear enough to need a dedicated analysis phase, or the fix will span
multiple sessions and needs progress tracking across them. In that case, before
Phase 0, create six tasks (Discovery, Reproduce & Analyze, Plan, Implement, Verify,
Commit) with a strict sequential chain, each addBlockedBy the one before it:
TaskCreate: { subject: "Phase 0: Discover project workflow", activeForm: "Discovering project workflow" }
TaskCreate: { subject: "Phase 1: Reproduce and analyze bug", activeForm: "Analyzing bug" }
TaskCreate: { subject: "Phase 2: Plan fix", activeForm: "Planning fix" }
TaskCreate: { subject: "Phase 3: Implement fix", activeForm: "Implementing fix" }
TaskCreate: { subject: "Phase 4: Verify quality", activeForm: "Verifying fix quality" }
TaskCreate: { subject: "Phase 5: Final commit", activeForm: "Creating final commit" }
TaskUpdate: { taskId: "2", addBlockedBy: ["1"] }
TaskUpdate: { taskId: "3", addBlockedBy: ["2"] }
TaskUpdate: { taskId: "4", addBlockedBy: ["3"] }
TaskUpdate: { taskId: "5", addBlockedBy: ["4"] }
TaskUpdate: { taskId: "6", addBlockedBy: ["5"] }
TaskUpdate: { taskId: "1", status: "in_progress" }
Task lifecycle rule (applies to every phase below when a chain exists, not
repeated per phase): mark that phase's task in_progress the moment you start it,
and status: "completed" immediately before moving to the next phase, then run
TaskList to confirm the next task unblocked.
Portability: no Task/TaskCreate tools in this environment? Always use the
inline path above: the phases are the methodology, the task tooling is just how
Claude Code tracks and parallelizes them in the multi-file case.
Discover the project's test, lint, and type-check commands before touching anything: guessing wastes a cycle when the wrong command silently no-ops.
If the codebase is large or unfamiliar, offload this to an Explore subagent:
Task tool, Explore agent, model haiku:
"Discover the development workflow for this project:
1. Read CLAUDE.md/AGENTS.md if present — extract debugging/testing conventions.
2. Check task runners: Makefile, justfile, package.json scripts, pyproject.toml.
3. Identify the test command, and how to run a single test/file.
4. Identify the lint and type-check commands.
5. Identify the dev server command if this is a web app.
6. Note pre-commit hooks or other quality gates.
Return a structured summary of all available commands."
Otherwise just check these yourself with Read/Grep. Store what you find, it's used in every later phase.
Goal: understand the bug, locate it in code, reproduce it reliably.
Understand symptoms. If given an issue ID, read it (gh issue view, jira issue view, etc.). Identify expected vs. actual behavior and any error messages.
If the report is too vague to reproduce (no expected/actual behavior, no repro steps, no error message, e.g. "something is broken sometimes"): stop here. Call AskUserQuestion; if that tool isn't available, end your turn with the specific questions in your final message instead: reproduction steps, expected vs. actual behavior, environment/error messages, and go no further. Do not infer a root cause from a code read alone or invent your own repro scaffolding to stand in for a real report. Running in an automated, sandboxed, or non-interactive context is not a reason to guess instead of asking, it's a reason to put the questions in the final message rather than wait for a reply.
Locate or create a failing test. Grep for existing coverage. If none exists, write a minimal test that reproduces the bug, in the location and style the existing test suite uses.
Reproduce it: a hard gate, not prose. Run the reproduction test against the current (unfixed) code with the discovered test command, and show the actual failing output before touching the fix. If the report names a specific symptom (e.g. "double-charges on retry"), confirm the assertion for that symptom is what fails, a suite with some unrelated test failing while the reported-symptom assertion already passes is not a reproduction. If the test passes pre-fix, the reproduction is wrong: stop, don't proceed to Phase 2, and rewrite the test until it actually captures the reported bug. A test that never failed proves nothing about the fix you're about to write.
Find the root cause. For a localized bug, just grep/read the relevant file yourself. Reserve parallel subagents for bugs spanning multiple files or with unclear scope:
Agent 1 (Explore, haiku) — Bug Location:
"Find the exact bug location (file:line), read the buggy code and its
surrounding context, explain why it produces the wrong behavior, and
provide evidence (stack trace, variable values, control flow)."
Agent 2 (Explore, haiku) — Impact Analysis:
"Search the codebase for other code affected by the same issue, similar
patterns with the same bug, related tests that might also fail, and
callers of the buggy code."
Agent 3 (general-purpose, haiku, only if an external library is implicated):
"Search Context7/web for documented solutions or known issues matching
this bug in [LIBRARY_NAME]."
AskUserQuestion before writing a fix on an unconfirmed theory.Goal: a minimal, focused fix that addresses the root cause without side effects.
Design a fix that:
// LEAN-DEBT: <limitation>. Upgrade when <trigger>. rather than silently shipping the gap.Get approval for non-trivial fixes: if the fix touches >3 files, modifies a
public API, has performance implications, or is otherwise breaking, use
AskUserQuestion to present the plan before implementing.
Run all quality checks using the commands discovered in Phase 0, then confirm every line of this checklist: it's the single authoritative copy, used at completion time:
LEAN-DEBT marker (see Phase 2)If any item fails, fix it before proceeding, don't commit broken code, and don't mark the phase complete until every box is checked.
If the git-commit skill is available, use it. Otherwise commit manually:
git add [files modified]
git commit -m "fix: [concise description of what was fixed]
- [Root cause]
- [Solution approach]
- [Issue/ticket reference if applicable]
Closes #[ISSUE_NUMBER]"
Report to the user: bug description, root cause (file:line), the fix, files
modified, test results (previously-failing test, full suite, lint, type-check,
each pulled from the command output you actually ran, never invented), commit
info, and any LEAN-DEBT markers left behind.
--branch, --interactive, --test-only), browser
testing integration, and error-handling patterns (test-still-fails, ambiguous
report, can't reproduce, multiple root causes). Load when you need one of those
specifics; the phases above are sufficient for a standard fix.Alternatives
alirezarezvani/claude-skills
App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist
trailofbits/skills
Constant-time testing detects timing side channels in cryptographic code. Use when auditing crypto implementations for timing vulnerabilities.
dotnet/skills
Analyzes test suites in any language and tags each test with standardized traits (positive, negative, critical-path, boundary, smoke, regression, integration, performance, security). Use when the user wants to categorize, audit, or label tests with traits. Works across .NET (MSTest/xUnit/NUnit/TUnit), Python (pytest), TS/JS (Jest/Vitest), Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, and C++ — auto-editing when the framework has canonical tag syntax, otherwise report-only. Do not use for writ
PramodDutta/qaskills
Gate RAG pipelines in CI with versioned golden eval sets, per-metric thresholds, baseline drift detection, and a build that fails when retrieval or answer quality regresses.