agentleFS
loonylabs-devloonylabs-dev/claude-setup/skills/analyze-fix-cheap/SKILL.md

analyze-fix-cheap

Skill0 starsChanged 3 months agoMITView on GitHub

Efficiently analyze and fix problems with targeted search, single-point proposal, and quality-gated implementation (80/20 approach).

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 15 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈15

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the user writes in German, respond in German.

    line 17
  2. Distinctive:

    If on master or main: Create a branch automatically

    line 35
  3. Distinctive:

    QUALITY GATE: Do not proceed on master/main until branch is created.

    line 48
  4. Distinctive:

    Do NOT launch broad exploration agents: Use low-token tools first:

    line 56
  5. Distinctive:

    Read Context: Read *only* the specific file(s) identified by search.

    line 59
  6. Distinctive:

    Trace: Only follow imports/calls if strictly necessary to understand the bug.

    line 60
  7. Distinctive:

    Only: run git log/diff if the user implies a regression (e.g., "stopped working", "was fine yesterday").

    line 64
  8. Very specific:

    Only generate alternatives (Variante A/B/C) if the solution is high-risk or involves a major architectural trade-off.

    line 81
  9. Distinctive:

    QUALITY GATE: Wait for explicit user confirmation ("GO", "weiter", etc.).

    line 101
  10. Distinctive:

    Avoid running the full test suite if possible (saves output tokens).

    line 116
  11. Distinctive:

    If no test exists: Create a minimal reproduction test case *only* if manual verification is complex/unreliable.

    line 119
  12. Distinctive:

    Fix & Retry: If tests fail, fix them and retry until green.

    line 120
  13. Distinctive:

    Keep the final report ultra-short.

    line 128
  14. Very specific:

    Avoid Explore agent or generic ls -R.

    line 169
  15. Distinctive:

    Do not waste tokens generating "Variante B" and "Variante C" unless the "Standard Way" is blocked.

    line 174
  16. Distinctive:

    Do not read file contents until you have confirmed the file path is relevant.

    line 177
  17. Distinctive:

    Keep your responses to the user concise.

    line 180

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Efficient Analyze & Fix Workflow (80/20)

Goal: Rapid diagnosis and fix with minimal token usage. Prioritize targeted search over broad exploration and single best-practice solutions over multiple variants.

Scope: This skill is the right one when the fault site and the symptom are both clear. If the cause is unknown, several suspects are in play, or a regression is suspected, take /analyze-fix instead — there you buy exploration and solution variants with tokens.


LANGUAGE RULE

Always respond in the same language the user used in their request. If the user writes in German, respond in German. If in English, respond in English. This applies to all outputs, reports, and conversation.


Trigger: User describes a problem, error, or bug.


PHASE 0: BRANCH CHECK

0.1 Verify Branch

Before anything else, check the current git branch.

git branch --show-current
  • If on master or main: Create a branch automatically
  • Branch naming: fix/{{problem-slug}} (lowercase, kebab-case)

Action: Automatically create the branch without asking:

git checkout -b fix/{{problem-slug}}

Then inform the user:

"Branch created: fix/{{problem-slug}}"

QUALITY GATE: Do not proceed on master/main until branch is created.


PHASE 1: TARGETED DIAGNOSIS (Sniper Approach)

1.1 Targeted Search

Do NOT launch broad exploration agents. Use low-token tools first:

  1. Keyword Search: grep -r "error_message_or_symbol" . to pinpoint location.
  2. Read Context: Read only the specific file(s) identified by search.
  3. Trace: Only follow imports/calls if strictly necessary to understand the bug.

1.2 Conditional History Check

Only run git log/diff if the user implies a regression (e.g., "stopped working", "was fine yesterday"). Otherwise, skip this step to save tokens.

1.3 Root Cause Definition

Define the problem concisely:

  • Location: File + Line.
  • Why: The mechanism causing the error.

PHASE 2: UNIFIED PROPOSAL GATE

2.1 Present Diagnosis & Solution

Combine analysis and solution proposal to save a turn. Propose the SINGLE best solution immediately.

Only generate alternatives (Variante A/B/C) if the solution is high-risk or involves a major architectural trade-off.

Output Template:

**DIAGNOSE**
[Concise Root Cause - 1-2 sentences]
**Affected File:** `path/to/file`

**PROPOSAL (Best Practice)**
[Description of the fix]

**Plan:**
1. [Implementation step]
2. [Verification step]

---
Wait for your GO to continue. (Or ask for "alternatives" if unsure)

QUALITY GATE: Wait for explicit user confirmation ("GO", "weiter", etc.).


PHASE 3: IMPLEMENTATION

3.1 Execute Solution

Implement the fix autonomously:

  • Style: Mimic surrounding code style exactly.
  • Scope: Edit only what is necessary.
  • No Chatter: Perform file edits without asking for intermediate feedback.

3.2 Targeted Verification

Avoid running the full test suite if possible (saves output tokens).

  1. Run specific test: npm test -- <relevant-test-file>
  2. If no test exists: Create a minimal reproduction test case only if manual verification is complex/unreliable.
  3. Fix & Retry: If tests fail, fix them and retry until green.

PHASE 4: COMPLETION

4.1 Brief Report

Keep the final report ultra-short.

**FIX COMPLETE**

**Summary:** [One sentence on what was fixed]
**File:** `path/to/file`
**Verification:** [Test passed / Manual check]

**Ready for Review.**

QUICK REFERENCE

PHASE 0: BRANCH CHECK
└── Auto-create branch if on master

PHASE 1: TARGETED DIAGNOSIS
├── Grep/Search (No broad exploration agents)
└── Define Root Cause

PHASE 2: PROPOSAL GATE
├── Propose Single Best Solution
└── [GATE] Wait for user GO

PHASE 3: IMPLEMENTATION
├── Execute Fix
└── Run Targeted Tests (npm test -- <file>)

PHASE 4: COMPLETION
└── Brief Summary

COST EFFICIENCY GUIDELINES

1. "Sniper" vs "Shotgun":

  • Avoid Explore agent or generic ls -R.
  • Assume you can find the file with grep or by guessing the path based on conventions.

2. One Solution:

  • In 80% of cases, the "Standard Way" is the right way.
  • Do not waste tokens generating "Variante B" and "Variante C" unless the "Standard Way" is blocked.

3. Lazy Reading:

  • Do not read file contents until you have confirmed the file path is relevant.

4. Lean Output:

  • Keep your responses to the user concise. Long explanations consume output tokens.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.