Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add saffron-health/libretto --skill erroregit clone --depth 1 https://github.com/saffron-health/librettoWrote 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.
[](https://agentmods.dev/skills/saffron-health/libretto/errore)<a href="https://agentmods.dev/skills/saffron-health/libretto/errore"><img src="https://agentmods.dev/badge/skills/saffron-health/libretto/errore/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.
<a href="https://agentmods.dev/skills/saffron-health/libretto/errore"><img src="https://agentmods.dev/badge/skills/saffron-health/libretto/errore.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00192 | $0.06760 |
| Opus 5 | $0.00096 | $0.03380 |
| Sonnet 5 | $0.00038 | $0.01352 |
| Haiku 4.5 | $0.00019 | $0.00676 |
Grade A, and why
errore scanned grade A with 1 finding 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 11d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
const result = await fetch(url).catch((e) => new FetchError({ cause: e })) How it starts
The opening of the file, as written. The whole thing — 660 lines — stays where its author put it; the contents beside it link to each section on GitHub.
errore
Go-style error handling for TypeScript. Functions return errors instead of throwing them — but instead of Go's two-value tuple (val, err), you return a single Error | T union. Instead of checking err != nil, you check instanceof Error. TypeScript narrows the type automatically. No wrapper types, no Result monads, just unions and instanceof.
const user = await getUser(id)
if (user instanceof Error) return user // early return, like Go
console.log(user.name) // TypeScript knows: User
Rules
- Always
import * as errore from 'errore'— namespace import, never destructure - Never throw for expected failures — return errors as values
- Never return
unknown | Error— the union collapses tounknown, breaks narrowing. Common trap:res.json()returnsunknown, soreturn await res.json()makes the return typeMyError | unknown→unknown. Fix: cast withas→return (await res.json()) as User - Avoid
try-catchfor control flow — use.catch()for async boundaries,errore.tryfor sync boundaries - Use
createTaggedErrorfor domain errors — gives you_tag, typed properties,$variableinterpolation,cause,findCause,toJSON, and fingerprinting - Let TypeScript infer return types — only add explicit annotations when they improve readability (complex unions, public APIs) or when inference produces a wider type than intended
- Use
causeto wrap errors —new MyError({ ..., cause: originalError }) - Use
| nullfor optional values, not| undefined— three-way narrowing:instanceof Error,=== null, then value - Use
const+ expressions, neverlet+ try-catch — ternaries, IIFEs,instanceof Error - Always handle errors inside
ifbranches with early exits, keep the happy path at root — like Go'sif err != nil { return err }, check the error, exit (return/continue/break), and continue the success path at the top indentation level. This makes the happy path readable top-to-bottom with minimal nesting - Always include
Errorhandler inmatchError— required fallback for plain Error instances - Use
.catch()for async boundaries,errore.tryfor sync boundaries — only at the lowest call stack level where you interact with uncontrolled dependencies (third-party libs,JSON.parse,fetch, file I/O). Your own code should return errors as values, not throw. - Always wrap
.catch()in a tagged domain error —.catch((e) => new MyError({ cause: e })). The.catch()callback receivesany, but wrapping in a typed error gives the union a concrete type. Never use.catch((e) => e as Error)— always wrap. - Always pass
causein.catch()callbacks —.catch((e) => new MyError({ cause: e })), never.catch(() => new MyError()). Withoutcause, the original error is lost andisAbortErrorcan't walk the chain to detect aborts. Thecausepreserves the full error chain for debugging and abort detection. - Always prefer
errore.tryovererrore.tryFn— they are the same function, buterrore.tryis the canonical name - Use
errore.isAbortErrorto detect abort errors — never checkerror.name === 'AbortError'manually, because tagged abort errors have their tag as.name - Custom abort errors MUST extend
errore.AbortError— soisAbortErrordetects them in the cause chain even when wrapped by.catch() - Keep abort checks flat — check
isAbortError(result)first as its own early return, thenresult instanceof Erroras a separate early return. Never nestisAbortErrorinsideinstanceof Error:
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.
- 11d ago First seen · 660 lines · 192 tokens per session scan A 9df87154cf34
errore is a skill published in the GitHub repository saffron-health/libretto (889 stars, last pushed 21d ago), licensed MIT. It adds 192 tokens to every session and 6,760 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
widen-return-type
When delegating a task affected by this skill, include.
coding-standards
A set of general coding standards and practical patterns for TypeScript, JavaScript, React, and Node.js. It covers readable naming, simple designs, avoiding repetition, and delaying unnecessary features.
plankton-code-quality
Write-time code quality enforcement using Plankton — auto-formatting, linting, and Claude-powered fixes on every file edit via hooks.
tanstack-form-composition
Migrate a React @tanstack/react-form codebase from the prop-drilled useForm + erased-form-type pattern to the official createFormHook composition API (useAppForm / withForm / field.X). Use when a project threads a form object (often cast to an any-erased type like ReactFormExtendedApi ) through field-wrapper…
robotgo-flow
Use when building YAML-driven Windows RPA workflows in Go — step-by-step desktop automation with image template matching, interactive recording mode, hotkey triggers. RobotGo-Flow: YAML-based Windows RPA framework built on RobotGo.
knip-cleanup
Add knip to a TypeScript project and use it to remove dead exports, collapse pass-through barrels, and narrow every export to what another file actually imports. Trigger on "add knip", "set up knip", "find dead code", "remove unused exports", "clean up barrel files", "get rid of export ", "why is this exported".