agentleFS
crgarcia12crgarcia12/Liliput/.github/skills/error-handling/SKILL.md

error-handling

Skill4 starsChanged 4 months agoISCView on GitHub

Handle failures during spec2cloud execution. Covers sub-agent failures, stuck loops, corrupted state, and test infrastructure failures. Use when encountering errors, retrying failed tasks, or recovering from corrupted state.

80 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use convention-learner, caching and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • codewithmukeshSkill

    convention-learner

    Detects and enforces project-specific coding conventions by analyzing existing codebase patterns. Learns naming conventions, folder structure, test organization, and coding style from the existing code. Load when: "conventions", "coding standards", "project patterns", "enforce style", "detect patterns", "learn conventions", "code consistency".

    Also in 3 projects that use this

  • wpankSkill

    caching

    Caching strategies, invalidation, eviction policies, HTTP caching, distributed caching, and anti-patterns. Use when designing cache layers, choosing eviction policies, debugging stale data, or optimizing read-heavy workloads.

    Also in 6 projects that use this

  • diego-tobalinaSkill

    logging

    Logging best practices for Java (SLF4J/Logback) and Node.js (Winston/Pino). Use for structured logging, log levels, and avoiding sensitive data exposure.

    Also in 12 projects that use this

  • codewithmukeshSkill

    opentelemetry

    OpenTelemetry observability for .NET 10 applications. Covers traces, metrics, and logs using the OpenTelemetry SDK with OTLP export. Includes custom ActivitySource, IMeterFactory metrics, resource configuration, and Aspire Dashboard integration. Load this skill when setting up distributed tracing, custom metrics, OTLP export, or when the user mentions "OpenTelemetry", "OTLP", "traces", "spans", "Activity", "ActivitySource", "metrics", "IMeterFactory", "Meter", "Counter", "Histogram", "Gauge", "telemetry", "observability", "distributed tracing", "OTEL", or "Aspire Dashboard".

    Also in 3 projects that use this

  • MovGP0Skill

    modern-csharp

    Modern C# style guidance for Bendex and MicroSea code changes, including primary constructors, expression-bodied members, var usage, target-typed new, lambdas, and pattern matching.

    Also in 3 projects that use this

  • MicrosoftSkill

    resilience

    Apply resilience patterns (retry, backoff, circuit breaking) when writing or reviewing code that makes outbound HTTP/REST calls, database operations, or any I/O that can experience transient failures. Use this skill when: (1) writing new code that calls external services or APIs, (2) reviewing code that uses fetch, HTTP clients, or service-to-service calls, (3) adding queue consumers or workers that interact with remote systems, (4) debugging intermittent failures in production.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 63 edited versions we read keep these.

  • 7

    Distinctive

    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 a sub-agent fails (crashes, produces invalid output, tests don't pass):

    line 10
  2. Distinctive:

    If you detect you're making no progress (same test failing repeatedly, same error recurring):

    line 18
  3. Distinctive:

    Keep going: Do not stop autonomously.

    line 19
  4. Very specific:

    If state.json is corrupted or contains invalid data:

    line 26
  5. Very specific:

    Check which spec files exist (specs/prd.md, specs/frd-*.md, specs/features/*.feature)

    line 29
  6. Distinctive:

    Check which tests exist and whether they pass

    line 30
  7. Distinctive:

    Check which code exists

    line 31
  8. Distinctive:

    If tests fail to compile or the test runner itself fails (not test assertion failures):

    line 38
  9. Distinctive:

    If the test infrastructure cannot be fixed, log the blocker and continue attempting

    line 42

“Common” is measured: kept by at least 6 in 10 of the 63 edited versions of this file we could read. “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

Error Handling

Sub-Agent Failure

If a sub-agent fails (crashes, produces invalid output, tests don't pass):

  1. Log the failure in audit.log with the error details
  2. Retry the same task — the sub-agent gets another attempt
  3. On retry, include the previous error as context so the sub-agent can adjust
  4. There is no retry limit — loops run indefinitely

Stuck in a Loop

If you detect you're making no progress (same test failing repeatedly, same error recurring):

  1. Keep going. Do not stop autonomously.
  2. The human is watching. Human Ctrl+C is the escape hatch.
  3. Try different approaches on each iteration — don't repeat the exact same fix
  4. Log every attempt so the human can diagnose the pattern

Corrupted or Missing State

If state.json is corrupted or contains invalid data:

  1. Log the corruption in audit.log
  2. Re-assess the project state from the repo itself:
    • Check which spec files exist (specs/prd.md, specs/frd-*.md, specs/features/*.feature)
    • Check which tests exist and whether they pass
    • Check which code exists
    • Check deployment status
  3. Reconstruct state.json from the observed repo state
  4. Continue from the determined phase

Test Infrastructure Failures

If tests fail to compile or the test runner itself fails (not test assertion failures):

  1. Log the infrastructure failure
  2. Attempt to fix the test infrastructure (missing dependencies, config issues)
  3. Re-run tests
  4. If the test infrastructure cannot be fixed, log the blocker and continue attempting

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.