agentleFS
moasqmoasq/ios-dev-agent/.agents/skills/consolidate-errors/SKILL.md

consolidate-errors

Skill4 starsChanged 6 months agoMITView on GitHub

Use when build, runtime, or test errors have been resolved and the project needs rules, skills, or scripts updated so the same failure is less likely to recur.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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:

    Run this after one or more errors have been resolved (marked [RESOLVED] in the error ledger).

    line 12
  2. Distinctive:

    Search existing rules and skills for coverage:

    line 26
  3. Distinctive:

    Read the target file fully before editing

    line 47
  4. Distinctive:

    Never remove existing content

    line 49

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

Consolidate Errors

Analyze resolved errors and update rules/skills to prevent recurrence.

When to Use

Run this after one or more errors have been resolved (marked [RESOLVED] in the error ledger). This skill reads the resolutions, checks what existing rules/skills should have prevented the error, and patches the gap.

Workflow

1. Read Resolved Errors

Read .agents/errors/errors.md

Find entries marked [RESOLVED] (not yet [CONSOLIDATED]).

2. For Each Error, Diagnose the Knowledge Gap

Search existing rules and skills for coverage:

Grep .agents/rules/ for keywords from the error
Grep .agents/skills/ for keywords from the error

Determine which case applies:

CaseSituationAction
ARule already covers this exact patternNo change — mark [CONSOLIDATED] with "coverage sufficient"
BRule exists but misses this variantAdd the variant to the existing rule
CSkill covers the topic but not this patternAdd to skill body or create a reference/ file
DSkill exists but description doesn't triggerUpdate skill description to include error keywords
ENo coverage anywhereAdd to /debugging skill's known crash patterns
FRules/skills contradict each otherFlag for human review — DO NOT auto-fix

3. Apply Updates

For each change:

  • Read the target file fully before editing
  • Make the minimal change — add a warning, extend a table, update keywords
  • Never remove existing content
  • Trace the change: <!-- Error ledger: YYYY-MM-DD description -->

4. Update the Ledger

Change [RESOLVED] to [CONSOLIDATED] and add:

  • Consolidated To: file path(s) that were updated
  • Change Type: Case A/B/C/D/E/F

5. Report

## Consolidation Report

### Processed: [count] resolved errors

| Error | Case | Action | File Updated |
|---|---|---|---|
| [description] | [A-F] | [what was done] | [path or "none"] |

### Coverage Health
- Total errors in ledger: [count]
- Consolidated: [count]
- Unresolved: [count]
- Recurring patterns: [any category appearing 3+ times]

Examples of Good Consolidation

Case B — Rule variant added: Error: UIKit dynamic color provider crashed on AsyncRenderer. Rule design-system.md already bans hardcoded colors, but didn't warn about UIColor closures. → Added: "NEVER use UIColor { traits in } dynamic providers for theme colors — they crash on AsyncRenderer thread."

Case D — Skill description updated: Error: ForEach identity crash, but /lists skill wasn't auto-loaded. → Updated lists skill description: added "ForEach crash" and "index out of bounds" keywords.

Case C — Reference added to skill: Error: New SwiftData migration crash pattern. → Added skills/storage/reference/migration-patterns.md documenting the crash and fix.

Case A — No change needed: Error: Hardcoded .padding(20) caught by build review. Rule design-system.md already explicitly bans this exact pattern. → Marked [CONSOLIDATED] — coverage was sufficient, developer just missed it.

Rules

  • Never create new rule files — update existing ones
  • Never remove content — only add or clarify
  • Minimal changes — one line is better than a paragraph
  • Flag contradictions — Case F goes to human, always
  • Trace changes — every edit links back to the error

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.