alego: Skill for Claude Code

.agents/skills/alego-error-handling/SKILL.md

alego-error-handling is a skill for Claude Code, Codex from singula-ai/alego. It costs 30 tokens per session (439 once invoked), scanned A, a copy of dsh-error-handling, MIT.

A set of rules for designing and reviewing how software handles failures. It covers error types, recovery, retries, background work, cleanup, and messages shown to users.

In plain words
What is it for?
Use it when implementing or reviewing exceptions, retries, cancellation, background tasks, partial operations, and user-visible error reports.
Why use it?
It helps prevent code from treating a failed operation as successful or continuing with damaged state. It also makes clear who owns recovery and what remains safe after a failure.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is singula-ai/alego's own configuration. It tells Claude Code and Codex how to work on alego itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything alego configures →

Reuse

Borrowing it

Nothing to install: this file belongs to singula-ai/alego. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/singula-ai/alego/main/.agents/skills/alego-error-handling/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/singula-ai/alego

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for alego-error-handling

README.md
[![agentmods](https://agentmods.dev/badge/skills/singula-ai/alego/alego-error-handling/github.svg)](https://agentmods.dev/skills/singula-ai/alego/alego-error-handling)
Your own site
<a href="https://agentmods.dev/skills/singula-ai/alego/alego-error-handling"><img src="https://agentmods.dev/badge/skills/singula-ai/alego/alego-error-handling/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for alego-error-handling

Your own site · 80×15
<a href="https://agentmods.dev/skills/singula-ai/alego/alego-error-handling"><img src="https://agentmods.dev/badge/skills/singula-ai/alego/alego-error-handling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 439 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 98% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00030 $0.00439
Opus 5.5 $0.00012 $0.00176
Sonnet 5.5 $0.00006 $0.00088
Haiku 4.5 $0.00003 $0.00044

Measured 6d ago against content hash 5fd0e5a17927, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

alego-error-handling scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

98% identical to dsh-error-handling — 4 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/alego-error-handling/SKILL.md · 31 lines

How it starts

The opening of the file, as written. The whole thing — 31 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Alego Error Handling

Define failures, their owners, and what remains safe after failure.

Typed, structured failures

Expected failures need declared types, stable discriminants, and handling-relevant details. Reuse package error conventions, preserve causes, and separate machine identity from display text. Never route handling by parsing messages. Unexpected defects such as assertNever may remain plain Error; containment must never turn them into success.

Catch, recover, or stop

For each failure, define handling and reporting owners, containment, and guarantees in the owning API documentation: valid invariants, absent/partial/committed/unknown effects, and cleanup responsibility. Background work retains these obligations.

Catching limits exception propagation, not mutations. Only the affected state's owner can establish safe continuation. Otherwise stop dependent work, discard invalid state or instances, or escalate. Logging alone is not recovery. Retries require safe repetition, cancellation, and an explicit owner; finite operations need budgets, while continuing supervision needs lifecycle ownership and observable degradation.

Localized, actionable, visible reports

Every final report needs a readable summary, affected operation, and safe next action. Localize through the receiving application's locale mechanism where one exists; other diagnostics use their existing output language. Keep sensitive internal details out of user-facing text.

Untrusted state or unknown outcomes must be visible through UI or default-enabled, accessible logs: report the impact, uncertainty, system disposition, and safe next step. Persistent invalid state needs persistent visibility. Never claim success, rollback, or safe retry without guarantees. Reporting failures need an independent fallback.

Verify resulting state and visible outcomes, not merely that an exception was caught.

Foundations

Meyer's Object-Oriented Software Construction (1997): contracts and invariants; Sutter's Exceptional C++ (1999): exception safety guarantees; Armstrong's thesis (2003): isolation and supervision.

Read the full file on GitHub · 31 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 31 lines · 30 tokens per session scan A 5fd0e5a17927

Subscribe to this mod's changes

alego-error-handling is a skill published in the GitHub repository singula-ai/alego (109 stars, last pushed 3d ago), licensed MIT. It adds 30 tokens to every session and 439 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 98% identical to dsh-error-handling, differing in 4 lines, and is treated as a copy.

Related

Other skills, from other repositories

ctx

Codebase intelligence and evidence-driven governance with the indexed ctx CLI. Use when exploring an unfamiliar repository, locating symbols or callers, checking for existing implementations, estimating change impact, enforcing architecture rules, scoring a branch, finding hotspots or duplication, or analyzing…

agentis-tools/ctx · 60 tokens

ctx

Codebase intelligence and evidence-driven governance with the indexed ctx CLI. Use when exploring an unfamiliar repository, locating symbols or callers, checking for existing implementations, estimating change impact, enforcing architecture rules, scoring a branch, finding hotspots or duplication, or analyzing…

agentis-tools/ctx · 60 tokens

monitoring-observability

OpenTelemetry, structured logging, distributed tracing, alerting, and dashboards. Use when instrumenting services, designing logs/traces/metrics, defining SLOs and alerts, or debugging production behavior from telemetry.

travisjneuman/.claude · 48 tokens

aster-fix-workflow

Pipe aster review findings into aster fix to generate and apply patches safely, using review --json, fix --findings-json, dry-run inspection, --apply, and permission gating. Use when asked to auto-fix review findings, apply aster's suggested edits, or build a review-then-fix pipeline.

Zfinix/aster · 71 tokens

debug-systematic

Systematic 4-phase debugging methodology for complex, intermittent, or mysterious issues. Use when investigating bugs, race conditions, or unexplained failures.

travisjneuman/.claude · 33 tokens

lsp-navigation

Semantic code navigation and fast error checks with the lspdiagnostics, lspreferences, and lspdefinitions tools. Use instead of a full build to check whether an edit broke something, or to find real usages of a symbol.

Zfinix/aster · 53 tokens