Agent skill

Focused Fix

by alirezarezvani in alirezarezvani/claude-skills

A skill your agent uses when the user asks to fix, debug, or make a specific feature/module/area work end-to-end.

MITAuto-check: notesDevelopment

Install Focused Fix

skills CLI
$ npx skills add alirezarezvani/claude-skills --skill focused-fix -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install alirezarezvani/claude-skills focused-fix --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/alirezarezvani/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/engineering/skills/focused-fix .claude/skills/focused-fix && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
focused-fix
GitHub stars
28k
Token cost
~3.4k tokens
SKILL.md length
1,446 words
Files
1
Skills in repo
342
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when the user asks to fix, debug, or make a specific feature/module/area work end-to-end.

  • Works in 5 steps: SCOPE — Map the Feature Boundary → TRACE — Map All Dependencies (Inside AND… → DIAGNOSE — Find Every Issue → …
  • The user asks to fix
  • SKILL.md covers When to Use, The Iron Law, Protocol — STRICTLY follow… and Red Flags — STOP and Return to…, plus 4 more sections
  • Calls git; needs JWT_SECRET

What it does

Focused Fix is an agent skill from alirezarezvani/claude-skills. Use when the user asks to fix, debug, or make a specific feature/module/area work end-to-end. Triggers: 'make X work', 'fix the Y feature', 'the Z module is broken', 'focus on [area]'. Not for quick single-bug fixes — this is for systematic deep-dive repair across all files and dependencies.

Its SKILL.md is about 3.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Debugging. The repository describes itself as: 380 Claude Code skills & agent skills & plugins (30+ Agents, 70+ custom commands, 380+ skills, customizable references, scripts)for Claude Code, Codex, Gemini CLI, Cursor, and 8… The licence is MIT.

When your agent uses it

  • The user asks to fix
  • Make a specific feature/module/area work end-to-end

Example prompts

  • “make X work”
  • “fix the Y feature”
  • “the Z module is broken”
  • “/focused-fix”

Requirements

  • A credential in JWT_SECRET

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. SCOPE — Map the Feature Boundary
  2. TRACE — Map All Dependencies (Inside AND Outside)
  3. DIAGNOSE — Find Every Issue
  4. FIX — Repair Everything Systematically
  5. VERIFY — Confirm Everything Works

What it can do on your machine

Read from SKILL.md and the folder at commit 19392f7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • JWT_SECRET

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Focused Fix loads about 3.4k tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 1,446 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~76
When it runs · the whole SKILL.md, loaded when a task matches
~3.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:137
    red environment variables are set (check .env)

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from alirezarezvani/claude-skills at commit 19392f7, republished under its MIT licence (© alirezarezvani). 1,446 words, ~3,414 tokens.

Download SKILL.mdSave it as .claude/skills/focused-fix/SKILL.md (or your agent's skills folder).
name
focused-fix
description
Use when the user asks to fix, debug, or make a specific feature/module/area work end-to-end. Triggers: 'make X work', 'fix the Y feature', 'the Z module is broken', 'focus on [area]'. Not for quick single-bug fixes — this is for systematic deep-dive repair across all files and dependencies.

Focused Fix — Deep-Dive Feature Repair

When to Use

Activate when the user asks to fix, debug, or make a specific feature/module/area work. Key triggers:

  • "make X work"
  • "fix the Y feature"
  • "the Z module is broken"
  • "focus on [area]"
  • "this feature needs to work properly"

This is NOT for quick single-bug fixes (use systematic-debugging for that). This is for when an entire feature or module needs systematic repair — tracing every dependency, reading logs, checking tests, mapping the full dependency graph.

dot
digraph when_to_use {
    "User reports feature broken" [shape=diamond];
    "Single bug or symptom?" [shape=diamond];
    "Use systematic-debugging" [shape=box];
    "Entire feature/module needs repair?" [shape=diamond];
    "Use focused-fix" [shape=box];
    "Something else" [shape=box];

    "User reports feature broken" -> "Single bug or symptom?";
    "Single bug or symptom?" -> "Use systematic-debugging" [label="yes"];
    "Single bug or symptom?" -> "Entire feature/module needs repair?" [label="no"];
    "Entire feature/module needs repair?" -> "Use focused-fix" [label="yes"];
    "Entire feature/module needs repair?" -> "Something else" [label="no"];
}

The Iron Law

NO FIXES WITHOUT COMPLETING SCOPE → TRACE → DIAGNOSE FIRST

If you haven't finished Phase 3, you cannot propose fixes. Period.

Violating the letter of these phases is violating the spirit of focused repair.

Protocol — STRICTLY follow these 5 phases IN ORDER

dot
digraph phases {
    rankdir=LR;
    SCOPE [shape=box, label="Phase 1\nSCOPE"];
    TRACE [shape=box, label="Phase 2\nTRACE"];
    DIAGNOSE [shape=box, label="Phase 3\nDIAGNOSE"];
    FIX [shape=box, label="Phase 4\nFIX"];
    VERIFY [shape=box, label="Phase 5\nVERIFY"];

    SCOPE -> TRACE -> DIAGNOSE -> FIX -> VERIFY;
    FIX -> DIAGNOSE [label="fix broke\nsomething else"];
    FIX -> ESCALATE [label="3+ fixes\ncreate new issues"];
    ESCALATE [shape=doubleoctagon, label="STOP\nQuestion Architecture\nDiscuss with User"];
}
Phase 1: SCOPE — Map the Feature Boundary

Before touching any code, understand the full scope of the feature.

  1. Ask the user: "Which feature/folder should I focus on?" if not already clear
  2. Identify the PRIMARY folder/files for this feature
  3. Map EVERY file in that folder — read each one, understand its purpose
  4. Create a feature manifest:
FEATURE SCOPE:
  Primary path: src/features/auth/
  Entry points: [files that are imported by other parts of the app]
  Internal files: [files only used within this feature]
  Total files: N
  Total lines: N
Phase 2: TRACE — Map All Dependencies (Inside AND Outside)

Trace every connection this feature has to the rest of the codebase.

INBOUND (what this feature imports):

  1. For every import statement in every file in the feature folder:
    • Trace it to its source
    • Verify the source file exists
    • Verify the imported entity (function, type, component) exists and is exported
    • Check if the types/signatures match what the feature expects
  2. Check for:
    • Environment variables used (grep for process.env, import.meta.env, os.environ, etc.)
    • Config files referenced
    • Database models/schemas used
    • API endpoints called
    • Third-party packages imported

OUTBOUND (what imports this feature):

  1. Search the entire codebase for imports from this feature folder
  2. For each consumer:
    • Verify they're importing entities that actually exist
    • Check if they're using the correct API/interface
    • Note if any consumers are using deprecated patterns

Output format:

DEPENDENCY MAP:
  Inbound (this feature depends on):
    src/lib/db.ts → used in auth/repository.ts (getUserById, createUser)
    src/lib/jwt.ts → used in auth/service.ts (signToken, verifyToken)
    @prisma/client → used in auth/repository.ts
    process.env.JWT_SECRET → used in auth/service.ts
    process.env.DATABASE_URL → used via prisma

  Outbound (depends on this feature):
    src/app/api/login/route.ts → imports { login } from auth/service
    src/app/api/register/route.ts → imports { register } from auth/service
    src/middleware.ts → imports { verifyToken } from auth/service

  Env vars required: JWT_SECRET, DATABASE_URL
  Config files: prisma/schema.prisma (User model)
Phase 3: DIAGNOSE — Find Every Issue

Systematically check for problems. Run ALL of these checks:

CODE QUALITY:

  • Every import resolves to a real file/export
  • No circular dependencies within the feature
  • Types are consistent across boundaries (no any at interfaces)
  • Error handling exists for all async operations
  • No TODO/FIXME/HACK comments indicating known issues

RUNTIME:

  • All required environment variables are set (check .env)
  • Database migrations are up to date (if applicable)
  • API endpoints return expected shapes
  • No hardcoded values that should be configurable

TESTS:

  • Run ALL tests related to this feature: find them by searching for imports from the feature folder
  • Record every failure with full error output
  • Check test coverage — are there untested code paths?

LOGS & ERRORS:

  • Search for any log files, error reports, or Sentry-style error tracking
  • Check git log for recent changes to this feature: git log --oneline -20 -- <feature-path>
  • Check if any recent commits might have broken something: git log --oneline -5 --all -- <files that this feature depends on>

CONFIGURATION:

  • Verify all config files this feature depends on are valid
  • Check for mismatches between development and production configs
  • Verify third-party service credentials are valid (if testable)

ROOT-CAUSE CONFIRMATION: For each CRITICAL issue found, confirm root cause before adding it to the fix list:

  • State clearly: "I think X is the root cause because Y"
  • Trace the data/control flow backward to verify — don't trust surface-level symptoms
  • If the issue spans multiple components, add diagnostic logging at each boundary to identify which layer fails
  • REQUIRED SUB-SKILL: For complex bugs found during diagnosis, apply superpowers:systematic-debugging Phase 1 (Root Cause Investigation) to confirm before proceeding

RISK LABELING: Assign each issue a risk label:

RiskCriteria
HIGHPublic API surface / breaking interface contract / DB schema / auth or security logic / widely imported module (>3 callers) / git hotspot
MEDInternal module with tests / shared utility / config with runtime impact / internal callers of changed functions
LOWLeaf module / isolated file / test-only change / single-purpose helper with no callers

Output format:

DIAGNOSIS REPORT:
  Issues found: N

  CRITICAL:
    1. [HIGH] [file:line] — description of issue. Root cause: [confirmed explanation]
    2. [HIGH] [file:line] — description of issue. Root cause: [confirmed explanation]

  WARNINGS:
    1. [MED] [file:line] — description of issue
    2. [LOW] [file:line] — description of issue

  TESTS:
    Ran: N tests
    Passed: N
    Failed: N
    [list each failure with one-line summary]
Phase 4: FIX — Repair Everything Systematically

Fix issues in this EXACT order:

  1. DEPENDENCIES FIRST — fix broken imports, missing packages, wrong versions
  2. TYPES SECOND — fix type mismatches at feature boundaries
  3. LOGIC THIRD — fix actual business logic bugs
  4. TESTS FOURTH — fix or create tests for each fix
  5. INTEGRATION LAST — verify the feature works end-to-end with its consumers

Rules:

  • Fix ONE issue at a time
  • After each fix, run the related test to confirm it works
  • If a fix breaks something else, STOP and re-evaluate (go back to DIAGNOSE)
  • Keep a running log of every change made
  • Never change code outside the feature folder without explicitly stating why
  • Fix HIGH-risk issues before MED, MED before LOW

ESCALATION RULE — 3-Strike Architecture Check: If 3+ fixes in this phase create NEW issues (not pre-existing ones), STOP immediately.

This pattern indicates an architectural problem, not a bug collection:

  • Each fix reveals new shared state / coupling / problem in a different place
  • Fixes require "massive refactoring" to implement
  • Each fix creates new symptoms elsewhere

Action: Stop fixing. Tell the user: "3+ fixes have cascaded into new issues. This suggests the feature's architecture may need rethinking, not patching. Here's what I've found: [summary]. Should we continue fixing symptoms or discuss restructuring?"

Do NOT attempt fix #4 without this discussion.

Output after each fix:

FIX #1:
  File: auth/service.ts:45
  Issue: signToken called with wrong argument order
  Change: swapped (expiresIn, payload) to (payload, expiresIn)
  Test: auth.test.ts → PASSES
Show full SKILL.md (595 more words)Show less
Phase 5: VERIFY — Confirm Everything Works

After all fixes are applied:

  1. Run ALL tests in the feature folder — every single one must pass
  2. Run ALL tests in files that IMPORT from this feature — must pass
  3. Run the full test suite if available — check for regressions
  4. If the feature has a UI, describe how to manually verify it
  5. Summarize all changes made

Final output:

FOCUSED FIX COMPLETE:
  Feature: auth
  Files changed: 4
  Total fixes: 7
  Tests: 23/23 passing
  Regressions: 0

  Changes:
    1. auth/service.ts — fixed token signing argument order
    2. auth/repository.ts — added null check for user lookup
    3. auth/middleware.ts — fixed async error handling
    4. auth/types.ts — aligned UserResponse type with actual DB schema

  Consumers verified:
    - src/app/api/login/route.ts ✅
    - src/app/api/register/route.ts ✅
    - src/middleware.ts ✅

Red Flags — STOP and Return to Current Phase

If you catch yourself thinking any of these, you are skipping phases:

  • "I can see the bug, let me just fix it" → STOP. You haven't traced dependencies yet.
  • "Scoping is overkill, it's obviously just this file" → STOP. That's always wrong for feature-level fixes.
  • "I'll map dependencies after I fix the obvious stuff" → STOP. You'll miss root causes.
  • "The user said fix X, so I only need to look at X" → STOP. Features have dependencies.
  • "Tests are passing so I'm done" → STOP. Did you run consumer tests too?
  • "I don't need to check env vars for this" → STOP. Config issues masquerade as code bugs.
  • "One more fix should do it" (after 2+ cascading failures) → STOP. Escalate.
  • "I'll skip the diagnosis report, the fixes are obvious" → STOP. Write it down.

ALL of these mean: Return to the phase you're supposed to be in.

Common Rationalizations

ExcuseReality
"The feature is small, I don't need all 5 phases"Small features have dependencies too. Phases 1-2 take minutes for small features — do them.
"I already know this codebase"Knowledge decays. Trace the actual imports, don't rely on memory.
"The user wants speed, not process"Skipping phases causes rework. Systematic is faster than thrashing.
"Only one file is broken"If only one file were broken, the user would say "fix this bug", not "make the feature work."
"I fixed the tests, so it works"Tests can pass while consumers are broken. Verify Phase 5 fully.
"The dependency map is too big to trace"Then the feature is too big to fix without tracing. That's exactly why you need it.
"Root cause is obvious, I don't need to confirm""Obvious" root causes are wrong 40% of the time. Confirm with evidence.
"3 cascading failures is normal for a big fix"3 cascading failures means you're patching symptoms of an architectural problem.

Anti-Patterns — NEVER do these

Anti-PatternWhy It's Wrong
Starting to fix code before mapping all dependenciesYou'll miss root causes and create whack-a-mole fixes
Fixing only the file the user mentionedRelated files likely have issues too
Ignoring environment variables and configurationMany "code bugs" are actually config issues
Skipping the test run phaseYou can't verify fixes without running tests
Making changes outside the feature folder without explaining whyUnexpected side effects confuse the user
Fixing symptoms in consumer files instead of root cause in featureBand-aids that break when the next consumer appears
Declaring "done" without running verification testsUntested fixes are unverified fixes
Changing the public API without updating all consumersBreaks everything that depends on the feature
  • superpowers:systematic-debugging — Use within Phase 3 for root-cause tracing of individual complex bugs
  • superpowers:verification-before-completion — Use within Phase 5 before claiming the feature is fixed
  • scope — If you need to understand blast radius before starting, run scope first then focused-fix

Quick Reference

PhaseKey ActionOutput
SCOPERead every file, map entry pointsFeature manifest
TRACEMap inbound + outbound dependenciesDependency map
DIAGNOSECheck code, runtime, tests, logs, configDiagnosis report
FIXFix in order: deps → types → logic → tests → integrationFix log per issue
VERIFYRun all tests, check consumers, summarizeCompletion report

© alirezarezvani, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in engineering/skills/focused-fix of alirezarezvani/claude-skills.

Open the folder on GitHubat commit 19392f7

Compare with similar skills

Focused Fix next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Focused Fix compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Focused Fix this skillalirezarezvani/claude-skills28k—~3.4kAutomated safety check: NotesMIT
Trellis Session Insightmindfold-ai/Trellis15k4 repos~1.7kAutomated safety check: PassAGPL-3.0
Native Data FetchingCherryHQ/cherry-studio-app4k6 repos~2.9kAutomated safety check: NotesMIT
Debugging Executionsn8n-io/n8n207k—~2.6kAutomated safety check: PassCustom licence
Aoti Debugpytorch/pytorch104k1 repos~1.7kAutomated safety check: PassCustom licence
Herdr Throwaway Reproductionherdrdev/herdr43k—~2.4kAutomated safety check: PassApache-2.0

Similar skills

  • Trellis Session Insight

    mindfold-ai/Trellis

    Reach into past AI conversation history through the trellis mem CLI.

    15k GitHub starsUsed in 4 repos~1.7k tokens
    DevelopmentAuto-check passed
  • Native Data Fetching

    CherryHQ/cherry-studio-app

    A skill your agent uses when implementing or debugging ANY network request, API call, or data fetching.

    4k GitHub starsUsed in 6 repos~2.9k tokens
    DevelopmentAuto-check: notes
  • Official

    Debug failed or wrong-output workflow executions using executions tools.

    207k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Aoti Debug

    pytorch/pytorch

    Debug AOTInductor (AOTI) errors and crashes. An agent skill from pytorch/pytorch.

    104k GitHub starsUsed in 1 repo~1.7k tokens
    DevelopmentAuto-check passed
  • Runs a disposable, uniquely named Herdr session inside an existing one so runtime, pane, terminal or API bugs can be reproduced without touching the main session.

    43k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Systematic Debugging

    ultralisp/ultralisp

    A skill your agent uses when encountering any bug, test failure, or unexpected behavior, before proposing fixes

    258 GitHub starsUsed in 51 repos~2.4k tokens
    DevelopmentAuto-check passed

More from alirezarezvani/claude-skills

All 342 skills in this repo
  • Agile Product Owner

    alirezarezvani/claude-skills

    Writes INVEST-checked user stories with acceptance criteria, splits epics, plans sprints from velocity and ranks the backlog with a weighted score.

    28k GitHub starsUsed in 3 repos~3.2k tokens
    Auto-check passed
  • Product Strategist

    alirezarezvani/claude-skills

    OKR cascade toolkit for product leaders: generates aligned company-to-team OKRs from five strategy types and scores how well they line up.

    28k GitHub starsUsed in 2 repos~1.8k tokens
    Auto-check passed
  • App Store Optimization

    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.

    28k GitHub starsUsed in 1 repo~4.2k tokens
    Auto-check passed
  • AWS Solution Architect

    alirezarezvani/claude-skills

    Design AWS architectures for startups using serverless patterns and IaC templates.

    28k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Campaign Analytics

    alirezarezvani/claude-skills

    Calculates attribution, funnel and ROI figures for marketing campaigns with three Python scripts that need only the standard library.

    28k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Code to PRD

    alirezarezvani/claude-skills

    Reverse-engineers a frontend, backend or fullstack codebase into a product requirements document with per-page docs, an enum dictionary and an API inventory.

    28k GitHub starsUsed in 1 repo~4.9k tokens
    Auto-check passed

Categories

Questions about Focused Fix

What does Focused Fix do?

A skill your agent uses when the user asks to fix, debug, or make a specific feature/module/area work end-to-end. Focused Fix is an agent skill from alirezarezvani/claude-skills. Use when the user asks to fix, debug, or make a specific feature/module/area work end-to-end.

When should I use Focused Fix?

Focused Fix fits situations like: the user asks to fix; make a specific feature/module/area work end-to-end.

How do I install Focused Fix in Claude Code?

Run `npx skills add alirezarezvani/claude-skills --skill focused-fix -a claude-code`. Or copy the skill folder (engineering/skills/focused-fix in alirezarezvani/claude-skills) into .claude/skills/focused-fix in your project. Claude Code loads it when a task matches its description.

How do I install Focused Fix in Codex?

Run `npx skills add alirezarezvani/claude-skills --skill focused-fix -a codex`. Or copy the skill folder (engineering/skills/focused-fix in alirezarezvani/claude-skills) into .agents/skills/focused-fix in your project. Codex loads it when a task matches its description.

Can I use Focused Fix in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alirezarezvani/claude-skills --skill focused-fix -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/focused-fix, .gemini/skills/focused-fix, .github/skills/focused-fix and .opencode/skills/focused-fix in your project.

What does Focused Fix need to run?

Going by SKILL.md and its folder, Focused Fix needs the command-line tools its instructions call (git) and credentials named JWT_SECRET. Our summary lists: A credential in JWT_SECRET.

Does Focused Fix access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Focused Fix safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Focused Fix use?

Focused Fix is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Focused Fix use?

About 3.4k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Focused Fix?

Skills that share tags, products or a category with Focused Fix: Trellis Session Insight (mindfold-ai/Trellis, 15k stars), Native Data Fetching (CherryHQ/cherry-studio-app, 4k stars), Debugging Executions (n8n-io/n8n, 207k stars) and Aoti Debug (pytorch/pytorch, 104k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Focused Fix?

alirezarezvani (a GitHub user) maintains it in alirezarezvani/claude-skills, which has 27,829 GitHub stars. The repository holds 342 skills in this directory. The repository was last updated on August 30, 2026.

Source: alirezarezvani/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.