Slash Command260 repo starsupdated 16d ago
focused-fix
The focused-fix command executes a disciplined bugfix workflow that prioritizes minimal code changes and blast radius reduction. Use it when addressing a specific bug to ensure fixes remain tightly scoped, typically affecting one to two files with fewer than twenty lines of changes, while avoiding refactoring or scope creep and verifying that existing tests pass after implementation.
Install in Claude Code
Copymkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/borghei/Claude-Skills/HEAD/.claude/commands/focused-fix.md -o ~/.claude/commands/focused-fix.mdThen start a new Claude Code session; the slash command loads automatically.
Definition
focused-fix.md
Execute a focused bugfix workflow: 1. **Understand the bug** — read the bug description, error message, or failing test. Identify the exact symptom. 2. **Locate the root cause** — trace the error to its origin. Use grep, stack traces, and git blame. Do NOT start fixing until the root cause is confirmed. 3. **Scope the fix** — determine the absolute minimum change needed: - How many files must change? (target: 1-2) - How many lines? (target: < 20) - Does any public API change? (target: no) - Are there downstream dependencies? (verify none break) 4. **Implement the fix** — make only the scoped changes. Do not refactor surrounding code, add features, or "clean up" nearby code. 5. **Verify the fix:** - Confirm the original bug is resolved - Run existing tests to ensure no regressions - If no test covers the bug, write one minimal test for the specific case 6. **Document** — write a commit message that explains: what broke, why, and what the fix does. **Rules:** - No drive-by refactoring - No "while I'm here" improvements - If the fix requires > 3 files or > 50 lines, stop and reassess — it may need a different approach
More from this repository
changelog-managerSubagent
>-
code-reviewerSubagent
>-
doc-generatorSubagent
>-
git-workflowSubagent
>-
qa-engineerSubagent
>-
security-auditorSubagent
>-
a11y-auditSlash Command
Run an accessibility audit on the current project for WCAG compliance.
code-to-prdSlash Command
Reverse-engineer a Product Requirements Document from existing code.