agentleFS
Wh0FF24Wh0FF24/whoff-agents/skills/dead-letter/SKILL.md

dead-letter

Skill2 starsChanged 8 months agoMITView on GitHub

Capture a failed or blocked task before it disappears. Categorizes the failure mode, extracts what was learned, and generates either a retry packet with the root cause fixed or an escalation message with specific decision points. Use whenever an agent returns a blocker, error, or partial result.

  • Reads credentials

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. BigCactusLabs/dead-letter★ 8same name
    2. harshsinghmp/muse-skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Preserve partial output: If the agent wrote 60% of the files, list exactly which ones exist and which don't.

    line 73
  2. Distinctive:

    Retry vs escalate is a hard decision: If the fix is mechanical (add a key, provide a file), generate a retry packet.

    line 74
  3. Distinctive:

    Deadline is load-bearing: If the failed task unblocks another agent or a scheduled job, write when.

    line 77
  4. Distinctive:

    After an overnight batch job — run against every agent session that didn't produce expected output

    line 96
  5. Distinctive:

    Before reporting a failure to the orchestrator — capture it in a dead letter first so the report includes the full failure context

    line 97

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

Dead Letter Skill

You are processing a failed task — one that returned an error, a blocker, a partial result, or a "couldn't proceed" message. Your job is to make sure nothing is lost, the failure mode is named, and the next action is unambiguous.

Failed tasks are information. The agent that failed learned something — what it tried, what broke, what it couldn't resolve. If that context isn't captured before the session ends, the next agent starts from zero and hits the same wall.

What You Will Do

  1. Read the failed task output — the full message, error, or partial result from the agent that couldn't complete.
  2. Classify the failure mode:
CodeModeDefinition
BLOCKED-CREDMissing credentialNeeds API key, token, or auth the agent doesn't have
BLOCKED-PERMPermission gateAction requires human approval or elevated access
BLOCKED-DATAMissing dataNeeds a file, DB record, or external state that doesn't exist yet
BLOCKED-AMBIGAmbiguous objectiveTask was underspecified and agent couldn't resolve the ambiguity
BLOCKED-RATERate limitedAPI, platform, or service rejected the request temporarily
FAILED-LOGICLogic errorAgent produced output but it was wrong, incomplete, or broken
FAILED-TOOLTool failureA dependency (CLI, library, MCP, subprocess) failed
FAILED-SCOPEOut of scopeTask requires capability the assigned agent doesn't have
PARTIALPartial completionSome steps done, some not — specific breakpoint identified
  1. Write the dead letter record to .claude/dead-letter-<timestamp>.md:
# Dead Letter — <ISO timestamp>

## Task
[Original task, one sentence]

## Failure Mode
[CODE]: [one-line description]

## What was attempted
- [Step 1 tried]
- [Step 2 tried]
- [Where it broke and why]

## What was learned
- [Fact that wasn't in the original brief]
- [Constraint discovered during execution]
- [Any partial output or intermediate state that exists]

## Retry packet (if retryable)
**Fix required before retry:** [specific thing to change]
**Retry prompt:**
> [Revised task with root cause addressed]

## Escalation (if not retryable)
**Route to:** [Agent or human who can unblock]
**Decision needed:** [Specific question that must be answered]
**Deadline:** [When this blocks downstream work]

## Files written (partial output to preserve)
- `path/to/file` — [what's in it, what's missing]
  1. Output the failure mode code + summary inline so you see it immediately without opening the file.

Rules

  • Name the failure mode first. "Something went wrong" is not a failure mode. BLOCKED-CRED: missing STRIPE_API_KEY is.
  • Preserve partial output. If the agent wrote 60% of the files, list exactly which ones exist and which don't. Don't treat partial as total failure.
  • Retry vs escalate is a hard decision. If the fix is mechanical (add a key, provide a file), generate a retry packet. If it requires a judgment call (change strategy, approve spend, re-scope), escalate.
  • Escalation routes to a specific agent. "Escalate to Atlas" is better than "escalate to management." Name the code: ATL, PRO, WIL, etc.
  • Every escalation has a decision question. Not "FYI this failed" but "Should we use Stripe or PayPal for this integration? Blocked on this."
  • Deadline is load-bearing. If the failed task unblocks another agent or a scheduled job, write when.

Failure Mode Quick Reference

BLOCKED-CRED  → add credential, retry same task
BLOCKED-PERM  → route to WIL with specific approval request
BLOCKED-DATA  → identify who generates the missing data, route there
BLOCKED-AMBIG → rewrite task with explicit constraints, retry
BLOCKED-RATE  → add delay, retry with backoff
FAILED-LOGIC  → add validation step, route to code-reviewer agent
FAILED-TOOL   → fix dependency, document in runbook
FAILED-SCOPE  → re-route to capable agent, update routing table
PARTIAL       → checkpoint what's done, hand off breakpoint to new agent

When to Use

  • Any time an agent returns "I can't proceed", "blocked on", "error:", or a partial result
  • After an overnight batch job — run against every agent session that didn't produce expected output
  • Before reporting a failure to the orchestrator — capture it in a dead letter first so the report includes the full failure context
  • Any time a task is abandoned mid-session and needs to be picked up later

Why This Exists

Failed tasks disappear. The agent session ends, the context is cleared, and the next agent that picks up the work re-discovers the same blocker from scratch. This is the multi-agent equivalent of not writing down an error message before closing the terminal.

The dead letter record turns failure into a durable asset: what was tried, what was learned, and exactly what the next agent needs to succeed where the last one didn't.

This skill is free. The full Atlas Starter Kit ($97) includes 12 more production skills — including the complete PAX protocol, systematic debugging frameworks, and the agent-handoff system that prevents most of these failures in the first place.

→ Get the full kit → Free skills repo

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.