agentleFS
Ormus-SolutionsOrmus-Solutions/ormus-agent-ops/skills/agent-triage/SKILL.md

agent-triage

Skill0 starsChanged 7 months agoMITView on GitHub

Classify failed tasks from an autonomous coding agent, recommend disposition (retry / dead-letter / fix-and-retry / wontfix), and offer bulk action. Replaces reading hundreds of failure logs by hand.

  • Sends data out

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 · 1

    1. HermeticOrmus/ormus-agent-ops★ 0100% same

    Edited · 0

    None found.

    Wrote their own version · 1

    1. 2lab-ai/llmux★ 9same 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 repository6 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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:

    After presenting, offer bulk operations.

    line 84
  2. Very specific:

    When in doubt, classify as unknown and recommend /agent-inspect.

    line 108
  3. Very specific:

    Default window is 24h. For longer windows (/agent-triage 7d), sweep is heavier — paginate accordingly.

    line 112
  4. Distinctive:

    Don't auto-classify based on task slug or project name — read the actual error.

    line 113

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

/agent-triage — Smart Failure Triage

Failed tasks fall into a small number of buckets. Classify, then act.

Prerequisites

VarPurpose
AGENT_API_URLBase URL of the agent's HTTP API
AGENT_API_TOKENBearer token

Endpoints used:

  • GET /api/tasks?status=failed&since=<window> — list failed tasks
  • GET /api/tasks/:id/log — full log for one task
  • POST /api/tasks/:id/requeue — requeue
  • POST /api/tasks/:id/dead-letter — dead-letter

Workflow

Phase 1: Pull failures

curl -s -H "Authorization: Bearer $AGENT_API_TOKEN" \
  "$AGENT_API_URL/api/tasks?status=failed&since=24h"

Phase 2: Classify each failure

For each failed task, fetch its log/last error and assign one classification:

ClassPatternRecommended action
infraAPI rate limit, credit exhausted, network timeout, 5xx from upstreamrequeue — not the task's fault
auth401/403 from upstream, expired token, missing credentialfix-and-retry — operator must rotate or refresh
codeCompile error, test failure, lint failure that the agent could fixrequeue with prompt amendment, or dead-letter if 3+ retries already
promptAgent looped, hit max iterations without converging, hallucinated nonexistent filefix-and-retry — operator amends the prompt
envMissing dep, wrong Node version, path doesn't exist on workerfix-and-retry — operator fixes the env
wontfixTask is no longer needed, superseded by another, or scope was wrongdead-letter
unknownDoesn't match any pattern aboveinspect — drill in with /agent-inspect <task-id>

Phase 3: Present grouped summary

TRIAGE — <N failures> in last 24h
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

INFRA           <count>  → bulk requeue
  • <task-id> <slug>  — <one-line cause>
  • <task-id> <slug>  — <one-line cause>

AUTH            <count>  → fix credentials, then requeue
  • <task-id> <slug>  — <missing/expired creds>

CODE            <count>  → requeue with amendment OR dead-letter
  • <task-id> <slug>  — <error type>  — <attempt N/3>

PROMPT          <count>  → operator amends prompt
  • <task-id> <slug>  — <pattern: looped / hallucinated / max-iter>

ENV             <count>  → fix worker env, then requeue
  • <task-id> <slug>  — <missing dep / wrong version>

WONTFIX         <count>  → dead-letter
  • <task-id> <slug>  — <reason>

UNKNOWN         <count>  → /agent-inspect each
  • <task-id> <slug>

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PROPOSED ACTIONS
  Bulk requeue:    <N> tasks (infra)
  Bulk dead-letter: <N> tasks (wontfix)
  Operator action:  <N> tasks (auth/prompt/env)
  Inspect deeper:   <N> tasks (unknown)

Phase 4: Bulk action

After presenting, offer bulk operations. Do NOT execute without explicit user approval.

# Bulk requeue infra failures (after user confirms)
for tid in $INFRA_TASK_IDS; do
  curl -s -X POST -H "Authorization: Bearer $AGENT_API_TOKEN" \
    "$AGENT_API_URL/api/tasks/$tid/requeue"
done

Heuristics for log → classification

Common patterns to grep in logs:

PatternClass
rate.limit|429|credit.balance.exhausted|insufficient.creditsinfra
401|403|invalid.api.key|expired.token|unauthorauth
Module not found|Cannot find package|node_modulesenv
iteration.limit|max.iterations|loop.detected|too many turnsprompt
ENOENT|file.not.found|path.does.not.existenv (probably)
tsc.*error|test.*failed|lintcode
superseded|cancelled.by.user|scope.changedwontfix

When in doubt, classify as unknown and recommend /agent-inspect.

Notes

  • Default window is 24h. For longer windows (/agent-triage 7d), sweep is heavier — paginate accordingly.
  • Don't auto-classify based on task slug or project name — read the actual error.
  • A single task may match multiple patterns. Pick the most specific (auth beats code, env beats prompt).
  • Never bulk-act without showing the user the count + class breakdown first. A misclassification that bulk-requeues 50 prompt failures will create 50 more failures.

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.