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 Kevin-Liu-01/Agent-Machines --skill fail-closed-case-matchinggit clone --depth 1 https://github.com/Kevin-Liu-01/Agent-MachinesWrote 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/kevin-liu-01/agent-machines/fail-closed-case-matching)<a href="https://agentmods.dev/skills/kevin-liu-01/agent-machines/fail-closed-case-matching"><img src="https://agentmods.dev/badge/skills/kevin-liu-01/agent-machines/fail-closed-case-matching/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/kevin-liu-01/agent-machines/fail-closed-case-matching"><img src="https://agentmods.dev/badge/skills/kevin-liu-01/agent-machines/fail-closed-case-matching.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.00046 | $0.00884 |
| Opus 5 | $0.00023 | $0.00442 |
| Sonnet 5 | $0.00009 | $0.00177 |
| Haiku 4.5 | $0.00005 | $0.00088 |
Grade A, and why
fail-closed-case-matching 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 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.
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.
How it starts
The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Fail Closed, Case Match, Never Fall Back
The Rule
Every branch in conditional logic must be an explicit, named case. There are no fallbacks. There are no degraded modes. If the system cannot prove which case applies, it rejects the request.
Why
A fallback is a silent lie. It tells the caller "everything is fine" when the system actually failed to satisfy the original intent. That hides broken infrastructure, creates invisible state drift, and makes debugging harder because the failure never surfaces.
A case match is an explicit contract. Each branch has a name, a reason, and a test. If a new situation arises that does not match any case, the code fails loudly instead of silently routing to a weaker path.
What This Means In Practice
Do: name every branch
if fitsHotplug && fitsHost {
return Hotplug
}
return LiveMigration
Do not: use else as a catch-all degraded path
// BAD: silent fallback
if canHotplug {
hotplug()
} else {
sleepAndRestart() // "just in case"
}
The second branch is not a case match. It is a bucket for "everything else,"
which means any new failure mode silently routes to sleepAndRestart without
anyone noticing.
Do: treat the safe path as its own named case, not a fallback
ColdMigration (sleep, reconfigure, wake) is not a degraded fallback. It
is the path the system takes when a primary path encounters an error
mid-execution. Everything is pre-allocated before the swap, so the
interruption is bounded and deterministic.
It has its own tests, its own invariants, and its own reason code. It is not "what happens when we give up."
Do: return typed errors instead of routing to a weaker mode
// GOOD: fail closed
match action {
ResizeAction::Hotplug => hotplug(spec),
ResizeAction::LiveMigration => Err(ResizeError::NotImplemented),
ResizeAction::ColdMigration => Err(ResizeError::NotImplemented),
}
// BAD: silent fallback
if let Err(_) = hotplug(spec) {
cold_migrate(spec) // hides the hotplug failure
}
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 · 114 lines · 46 tokens per session scan A a2976604f916
fail-closed-case-matching is a skill published in the GitHub repository Kevin-Liu-01/Agent-Machines (29 stars, last pushed yesterday), licensed MIT. It adds 46 tokens to every session and 884 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
holix-cron
Schedule recurring agent tasks via Holix built-in gateway cron (not crontab or custom scripts).
21-day-self-interview
A 21-night guided self-reflection routine in which an agent asks three questions each night, remembers the answers, and reflects on them at key points.
tomtom
TomTom Maps MCP integration — search, routing, traffic, maps, POIs, and EV via hosted endpoint.
map-your-market
Given a product description, category keywords, or competitor names (any combination), searches Reddit, Hacker News, GitHub Issues, G2, and Google Trends for the real pains your market experiences, then synthesizes everything into a positioning framework showing who your ICP is, what they say out loud, and exactly how…
opik-diagnose
Surface the Opik traces worth a developer's attention, ranked by signal — Diagnostics issues first, then errors, failed tool calls, latency, regressions, and low online-eval scores. With the Opik MCP connected it lists the project's agentinsightsissue entities, offers to turn Diagnostics on when the project has it…
jikegongyuan-perspective
A writing guide based on GeekPark, a Chinese technology publication and entrepreneur community focused on AI, products, startups, and innovation.