agentleFS
ShmayroShmayro/singularity-claude/skills/repairing/SKILL.md

repairing

Skill28 starsChanged 9 months agoMITView on GitHub

Use when a singularity-managed skill is failing, scoring below threshold, or producing incorrect outputs that need automated correction via /singularity-repair

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    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:

    Read the skill's score history:

    line 20
  2. Distinctive:

    Don't rewrite from scratch — surgical fixes only

    line 61
  3. Distinctive:

    Add a "## Repair History" section at the bottom documenting what changed and why

    line 63
  4. Very specific:

    Read current version from ~/.claude/singularity/scores/<skill-name>.json

    line 69
  5. Very specific:

    Run singularity-claude:scoring on the test output.

    line 79
  6. Distinctive:

    If repair failed (new version scores equal or worse):

    line 87

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

Auto-Repair a Failing Skill

Diagnose why a skill is underperforming and rewrite it to fix identified weaknesses. This is the core of the recursive evolution loop.

When to Use

  • Skill average score < 50 (auto-repair threshold)
  • Scoring skill suggested repair
  • User noticed skill producing wrong or incomplete output

Workflow

Step 1: Diagnose

Read the skill's score history:

"${CLAUDE_PLUGIN_ROOT}/scripts/score-manager.sh" list <skill-name>

Read recent telemetry:

"${CLAUDE_PLUGIN_ROOT}/scripts/telemetry-writer.sh" list <skill-name> --last 5

Identify patterns:

  • Which rubric dimensions score lowest consistently?
  • What edge cases caused failures?
  • Are errors recurring?

Step 2: Read Current Skill

Load the skill's SKILL.md:

~/.claude/skills/<skill-name>/SKILL.md

Also read any supporting files in references/.

Step 3: Identify Repair Targets

Map low-scoring dimensions to specific skill content:

Low DimensionLikely CauseRepair Focus
CorrectnessWrong instructions or logicRewrite core workflow steps
CompletenessMissing requirementsAdd missing steps or checks
Edge CasesNo error handling guidanceAdd edge case handling section
EfficiencyVerbose or roundaboutStreamline workflow, remove unnecessary steps
ReusabilityHardcoded or too specificParameterize, add flexibility

Step 4: Rewrite

Edit the SKILL.md to address identified weaknesses. Preserve what works (high-scoring dimensions) and focus changes on the lowest-scoring areas.

Rules:

  • Don't rewrite from scratch — surgical fixes only
  • Preserve the existing structure and naming
  • Add a "## Repair History" section at the bottom documenting what changed and why

Step 5: Bump Version

The skill is now a new version. Update:

  1. Score file — add new version entry:
    • Read current version from ~/.claude/singularity/scores/<skill-name>.json
    • Increment patch: v1.0.0 → v1.0.1 (or minor if significant changes: v1.0.0 → v1.1.0)
  2. Registry — update currentVersion

Step 6: Test

Invoke the repaired skill with a scenario that previously failed or scored low.

Step 7: Score

Run singularity-claude:scoring on the test output.

Step 8: Compare

New > Old avgKeep new version
New <= Old avgRevert: restore previous SKILL.md from git history and keep old version as current

If repair failed (new version scores equal or worse):

  • Log the failed repair attempt in telemetry
  • Suggest user intervention: "Auto-repair didn't improve the skill. Consider manual editing or /singularity-review for deeper analysis."

Step 9: Log Telemetry

"${CLAUDE_PLUGIN_ROOT}/scripts/telemetry-writer.sh" log <skill-name> \
  --trigger "auto-repair" \
  --summary "Repaired: <what changed>. Score: <old-avg> → <new-score>"

Report

After repair, show:

Repair Summary for <skill-name>:
  Previous version: v1.0.0 (avg: 42/100)
  New version: v1.0.1
  Changes: <bullet list of what was fixed>
  Test score: <score>/100
  Status: <Improved ✓ / Failed ✗ — reverted>

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.