Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
borghei avatar

Focused Fix

  • 59 installs
  • 451 repo stars
  • Updated July 21, 2026
  • borghei/claude-skills

Focused Fix is a Claude skill that scopes a bugfix to the smallest possible change set using a change-scope analyzer, preventing refactors and scope creep.

About

Focused Fix is a Claude skill that enforces a minimal-change approach to bug fixing. It uses a change_scope_analyzer.py script to identify the smallest set of files that resolve an issue, then validates that the actual diff stays within that scope. A developer uses it when triaging a bug, scoping a hotfix, or keeping a bugfix PR from creeping into refactors.

  • Enforces minimal-change bug fixing to prevent scope creep
  • change_scope_analyzer.py identifies the smallest set of files to touch
  • Anti-pattern table catches 'while I'm here' refactors in bugfix PRs

Focused Fix by the numbers

  • 59 all-time installs (skills.sh)
  • Ranked #294 of 596 Debugging skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

focused-fix capabilities & compatibility

Free; runs a local Python script, no API keys.

Capabilities
code review · focused fix
Use cases
debugging · code review
Pricing
Free
From the docs

What focused-fix says it does

The **Focused Fix** skill enforces a disciplined minimal-change approach to bug fixing.
SKILL.md
python scripts/change_scope_analyzer.py --bug "Login fails when email has + character" --path ./src
SKILL.md
Make ONLY the changes needed to fix the bug
SKILL.md
npx skills add https://github.com/borghei/claude-skills --skill focused-fix

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs59
repo stars451
Last updatedJuly 21, 2026
Repositoryborghei/claude-skills

What it does

Scope a bugfix to the minimal set of files and keep the diff small enough for low-risk review.

Who is it for?

Triaging a bug into the minimal files to touch, scoping a release-blocking hotfix, or stopping a bugfix PR from bloating into refactors.

Skip if: Large refactors, feature work, or dependency upgrades bundled with the fix.

When should I use this skill?

The user asks to fix a bug with minimal changes, scope a minimal repair, or find the minimal set of files to change.

What you get

A minimal, reviewable diff limited to the files that actually fix the bug, plus a regression test.

  • Minimal file-change scope report from change_scope_analyzer.py
  • Focused PR with a regression test

By the numbers

  • 1 bundled script (change_scope_analyzer.py)
  • 6-step focused bugfix workflow with per-step validation

Files

SKILL.mdMarkdownGitHub ↗

Focused Fix

Category: Engineering
Domain: Debugging & Maintenance

Overview

The Focused Fix skill enforces a disciplined minimal-change approach to bug fixing. Instead of refactoring or improving code during a bugfix, it identifies the smallest possible change set that resolves the issue. This reduces risk, simplifies code review, and prevents scope creep.

Use when

  • The user asks to "fix a bug with minimal changes", "do a focused bugfix", or "scope a minimal repair"
  • A bug report needs triage to identify the smallest set of files to touch
  • A PR is at risk of scope creep (unrelated refactors, style changes, "nearby" fixes)
  • A hotfix or release-blocker needs a low-risk, reviewable change set
  • The user asks "what is the minimal change to fix X?" or "which files do I need to touch for this bug?"

Quick Start

# Analyze a bug description to identify minimal change scope
python scripts/change_scope_analyzer.py --bug "Login fails when email has + character" --path ./src

# Analyze with JSON output
python scripts/change_scope_analyzer.py --bug "API returns 500 on empty array input" --path ./src --format json

# Analyze with specific file extensions
python scripts/change_scope_analyzer.py --bug "CSS overflow on mobile" --path ./src --extensions .css .scss .html

Tools Overview

ToolPurposeKey Flags
change_scope_analyzer.pyIdentify minimal files to change for a bugfix--bug, --path, --extensions, --format

change_scope_analyzer.py

Analyzes a bug description against a codebase to identify:

  • Files most likely related to the bug (keyword matching, import tracing)
  • Estimated change scope (number of files, lines)
  • Risk assessment for the change
  • Recommended fix approach (minimal vs. structural)

Workflows

Focused Bugfix Workflow

1. Write a clear bug description — reproduction steps, expected vs actual behavior

  • Validate: the description names the observable failure, not a guess at the cause

2. Run `change_scope_analyzer.py` to identify scope

  • Validate: analyzer output lists concrete files and an estimated line count

3. Review the recommended files and approach

  • Validate: recommended approach is "minimal" — if it says "structural", stop and scope a refactor PR separately

4. Make ONLY the changes needed to fix the bug

  • Validate: git diff --stat matches (or is smaller than) the analyzer's recommendation

5. Verify no unrelated changes leaked in

  • Validate: git diff shows no formatting-only changes, no unrelated imports, no "while I'm here" edits

6. Submit PR with focused change set

  • Validate: commit message states the exact bug fixed, and a regression test is included

Scope Validation

1. After making changes, re-run analyzer 2. Compare actual changes against recommended scope 3. Flag any out-of-scope modifications for separate PRs

  • Validate: any file touched that was not in the analyzer recommendation has a one-line justification or is reverted

Reference Documentation

  • Focused Fix Methodology - Principles, anti-patterns, and decision framework

Common Patterns

Do

  • Fix the exact bug reported
  • Add a regression test for the fix
  • Document why the fix works in the commit message
  • Keep the diff as small as possible

Don't

  • Refactor surrounding code during a bugfix
  • Fix "nearby" issues in the same PR
  • Change formatting or style in touched files
  • Add features disguised as bugfixes

Anti-patterns

Anti-patternFailure modeFix
"While I'm here" refactors in the bugfix PRBlast radius explodes; review time multiplies; unrelated regressions masked by the real fixOpen a separate PR for the refactor, tagged as refactor: not fix:
Reformatting or auto-save style changes in touched filesDiff becomes unreadable; real fix hidden in 200 lines of whitespaceRevert style changes before committing; configure the editor to format-on-save only for new files
Fixing the symptom in the wrong layerBug returns in a new form; accumulates workaround debtTrace to the root layer — analyzer's keyword-match output is a hint, not an answer
Skipping the regression test "because the fix is obvious"Bug silently returns on a refactor 6 months laterEvery fix: commit adds at least one failing-then-passing test
Treating change_scope_analyzer.py output as authoritativeAnalyzer is keyword/import-based, not semantic — misses dynamic dispatch, reflection, config-driven pathsUse it as a starting set; grep for callers and tests before committing to the scope
Bundling the fix with a dependency upgradeTwo risk profiles in one PR; if rollback is needed, both are lostLand the upgrade separately, then the fix against the upgraded baseline

Related skills

FAQ

What does change_scope_analyzer.py output?

It lists files most likely related to the bug via keyword matching and import tracing, an estimated change scope, a risk assessment, and a recommended fix approach (minimal vs structural).

Should I trust the analyzer's file list as authoritative?

No; it is keyword and import based, not semantic, so it misses dynamic dispatch and config-driven paths. Use it as a starting set and grep for callers and tests first.

Debuggingtesting

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.