agentleFS
moasqmoasq/ios-dev-agent/.agents/skills/fix-error/SKILL.md

fix-error

Skill4 starsChanged 6 months agoMITView on GitHub

Use when a build fails or there are unresolved errors. Reads .agents/errors/errors.md, investigates root cause, applies fix, verifies build, and logs the resolution.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

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

    Read .agents/errors/errors.md — find [UNRESOLVED] entries

    line 12
  2. Distinctive:

    If no unresolved entries, check the latest build output for errors

    line 13
  3. Very specific:

    Read the error ledger for past [RESOLVED] and [CONSOLIDATED] entries with similar patterns:

    line 20
  4. Distinctive:

    If a match exists, apply the known fix pattern — don't reinvestigate.

    line 25
  5. Distinctive:

    If no prior match:

    line 29
  6. Distinctive:

    Read the failing file at the reported line

    line 30
  7. Distinctive:

    Read imports, type definitions, related files

    line 31
  8. Distinctive:

    If multiple files need changes, make all changes before rebuilding

    line 39
  9. Distinctive:

    Run the build. If it fails again:

    line 43
  10. Very specific:

    After resolving, mention: "Run /consolidate-errors to feed this fix back into rules/skills."

    line 69

≈ “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

Fix Error

Investigate and resolve unresolved build errors from the error ledger.

Quick Start

  1. Read .agents/errors/errors.md — find [UNRESOLVED] entries
  2. If no unresolved entries, check the latest build output for errors
  3. For each error, follow the resolution workflow below

Resolution Workflow

1. Check History First

Read the error ledger for past [RESOLVED] and [CONSOLIDATED] entries with similar patterns:

  • Same file or module?
  • Same error type (type mismatch, concurrency, missing reference)?
  • Same crash signature?

If a match exists, apply the known fix pattern — don't reinvestigate.

2. Investigate

If no prior match:

  • Read the failing file at the reported line
  • Read imports, type definitions, related files
  • Classify the error by category
  • Identify root cause (not just the error message — the actual WHY)

3. Fix

  • Edit the failing file(s)
  • Fix the root cause, not the symptom
  • If multiple files need changes, make all changes before rebuilding

4. Verify

Run the build. If it fails again:

  • Is it the same error? (fix didn't work — try another approach)
  • Is it a new error? (fix introduced a regression — fix that too)
  • Max 3 attempts. If still failing, report findings and stop.

5. Update the Ledger

In .agents/errors/errors.md, change the entry from [UNRESOLVED] to [RESOLVED] and fill in:

## [RESOLVED] <timestamp> — <brief description>

- **Error:** `<error message>`
- **File:** `<file:line>`
- **Category:** `<category from classification>`
- **Symptom:** <what it looked like>
- **Root Cause:** <what actually caused it>
- **Misleading Signal:** <what made this confusing, if applicable>
- **Fix:** <what was changed and why>
- **Files Changed:** <list of modified files>
- **Key Diagnostic:** <the single most important clue>
- **Prevention Rule:** <one-sentence rule that would prevent this>

6. Suggest Consolidation

After resolving, mention: "Run /consolidate-errors to feed this fix back into rules/skills."

Error Categories

CategoryPatternCommon Root Cause
concurrency/async-renderEXC_BREAKPOINT + AsyncRendererUIKit code on wrong thread
concurrency/isolationActor-isolated property errorSwift 6 Sendable violation
type-mismatchCannot convert value of typeWrong type, missing conformance
missing-referenceUse of unresolved identifierMissing import, typo, deleted symbol
missing-typeCannot find type in scopeMissing import or undeclared type
ambiguous-typeAmbiguous use ofDuplicate type declarations
api-mismatchHas no memberDeprecated or wrong API
file-structureFile > 200 linesNeeds splitting
swiftdataModelContext thread crashWrong actor for context
themeHardcoded color/font/spacingAppTheme token not used

If You Can't Fix It

Report what you found:

## Error Investigation (Unresolved)
- **Error:** [description]
- **Investigated:** [what you checked]
- **Hypotheses:** [possible causes ranked by likelihood]
- **Blocked By:** [what prevented the fix]
- **Suggested Next Step:** [what a human should try]

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.