agentleFS
insapption-projectsinsapption-projects/claude-agent-team-starter/.claude/skills/fix-plan/SKILL.md

fix-plan

Skill1 starsChanged 8 months agoMITView on GitHub

Analyzes errors from the test-lint quality gate and produces a targeted fix plan grouped by root cause. Operates in read-only mode until approved. Requires lead approval before implementation. Step 8 of the dev-workflow.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the error report is not in context, run /test-lint again first

    line 24
  2. Distinctive:

    Scope creep warning: If fixing an error would require changes to files NOT touched in the original implementation, flag it:

    line 108

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

Skill: /fix-plan

Usage

/fix-plan

Invoke with no arguments. Uses the error report from the most recent /test-lint run as input.

Prerequisites

  • /test-lint must have produced a FAIL result in this session
  • If the error report is not in context, run /test-lint again first

Mode: READ-ONLY

Same constraints as /plan-feature — no files written until approved.


Analysis Process

1. Categorize All Errors

Group every error from the quality gate into categories:

ERROR CATEGORIZATION:
──────────────────────────────────────────────────────────────
A. Code Style (auto-fixable)         : {N} errors
   → Files: {list}

B. Type Errors                       : {N} errors
   → Files: {list}

C. Logic / Architecture Errors       : {N} errors
   → Files: {list}

D. Failing Tests — Implementation    : {N} failures
   (test expectation was wrong)
   → Tests: {list}

E. Failing Tests — Test Quality      : {N} failures
   (test itself has a bug)
   → Tests: {list}
──────────────────────────────────────────────────────────────
Total errors: {N}

2. Root Cause Analysis

For each non-trivial category (B, C, D), identify the ROOT CAUSE:

ROOT CAUSE ANALYSIS:
──────────────────────────────────────────────────────────────
[Category B — Type Error in ProductFilterService.php:42]
  Root cause: Method signature uses array but caller passes Collection.
  Origin    : Mismatch between planning assumption and actual model type.
  Fix scope : Narrow — change parameter type or add ->toArray()

[Category D — Test: ProductFilterTest::it_filters_by_category]
  Root cause: Test uses hardcoded ID=1, but seeder creates ID=2.
  Origin    : Fragile test setup, not a logic error.
  Fix scope : Update test factory to use the created model's ID.
──────────────────────────────────────────────────────────────

3. Fix Plan

List every change needed, minimal and targeted:

FIX PLAN:
──────────────────────────────────────────────────────────────
[A — Auto-fix]
✏️  Run pint --fix on all style errors (automated, no logic change)
   Files: {list}

[B — Type fix]
✏️  MODIFY  app/Services/ProductFilterService.php:42
   → Change parameter type from array to Collection|array (union type)

[D — Test fix]
✏️  MODIFY  tests/Feature/ProductFilterTest.php:38
   → Replace hardcoded ID with $product->id from factory result
──────────────────────────────────────────────────────────────
Total changes: {N} files

Scope creep warning: If fixing an error would require changes to files NOT touched in the original implementation, flag it:

⚠️  SCOPE ALERT: Fixing {error} requires modifying {file} which was
    NOT part of the original plan. This may indicate a deeper issue.
    Options:
    A) Narrow fix: adjust only the interface/call site
    B) Proper fix: update {file} (requires plan approval)
    Recommend: {A or B with justification}

4. Approval Request

──────────────────────────────────────────────────────────────
  FIX PLAN READY — AWAITING APPROVAL
──────────────────────────────────────────────────────────────
Errors found     : {N}
Files to fix     : {N}
Auto-fixable     : {N} (pint / eslint --fix)
Manual fixes     : {N}
Scope creep risk : yes / no

Respond with:
  ✅  approve     — proceed to /implement-fix
  ✏️   revise {N}  — clarify or change item N in the fix plan
  ❌  reject      — cancel and explain (may need to re-plan the feature)
──────────────────────────────────────────────────────────────

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.