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 agentmods add instructions/dmmulroy/better-result/agents-mdgit clone --depth 1 https://github.com/dmmulroy/better-resultWrote 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/instructions/dmmulroy/better-result/agents-md)<a href="https://agentmods.dev/instructions/dmmulroy/better-result/agents-md"><img src="https://agentmods.dev/badge/instructions/dmmulroy/better-result/agents-md.svg" alt="Measured on agentmods" height="20"></a>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 | $0.01362 | $0.01362 |
| Opus 5 | $0.00681 | $0.00681 |
| Sonnet 5 | $0.00272 | $0.00272 |
| Haiku 4.5 | $0.00136 | $0.00136 |
Grade A, and why
better-result AGENTS.md 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 4d 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 — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.
better-result
Generated: 2026-01-19 | Commit: fb308ef | Branch: main
OVERVIEW
Lightweight TypeScript Result type with generator-based composition. Functional error handling via Ok/Err discriminated union with yield* syntax for railway-oriented programming.
STRUCTURE
better-result/
├── src/
│ ├── index.ts # Public API barrel export
│ ├── result.ts # Core Result type, Ok/Err classes, combinators
│ ├── error.ts # TaggedError base class, UnhandledException, Panic
│ ├── dual.ts # data-first/data-last function helper
│ ├── result.test.ts # Result tests (~1600 lines)
│ └── error.test.ts # TaggedError tests (~250 lines)
├── skills/ # Portable SKILL.md agent skills
│ └── adopt-better-result/
├── dist/ # Compiled output (committed for npm)
└── opensrc/ # Fetched dependency source for AI context
WHERE TO LOOK
| Task | Location | Notes |
|---|---|---|
| Add Result method | src/result.ts |
Add to both Ok and Err classes |
| Add static combinator | src/result.ts:782 |
Result namespace object |
| New error type | src/error.ts |
Extend TaggedError, add _tag |
| Change exports | src/index.ts |
Barrel file |
| Add tests | src/*.test.ts |
Colocated, Vitest runner |
| Update agent skills | skills/*/SKILL.md |
Keep name: matching the directory name |
| Add skill references | skills/*/references/*.md |
Prefer linked references over giant skills |
CODE MAP
| Symbol | Type | Location | Role |
|---|---|---|---|
Ok<A, E> |
class | result.ts:32 | Success variant, E is phantom |
Err<T, E> |
class | result.ts:203 | Error variant, T is phantom |
Result<T, E> |
type | result.ts:361 | Union: Ok<T,E> | Err<T,E> |
Result namespace |
obj | result.ts:782 | Static combinators |
Result.gen |
fn | result.ts:594 | Generator-based composition |
Result.try |
fn | result.ts:400 | Wrap sync throwing fn |
Result.tryPromise |
fn | result.ts:448 | Wrap async throwing fn + retry |
TaggedError |
fn | error.ts:35 | Factory for discriminated errors |
UnhandledException |
class | error.ts:186 | Wrapper for uncaught exceptions |
Panic |
class | error.ts:215 | Unrecoverable error (throws) |
dual |
fn | dual.ts:20 | Creates pipeable functions |
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.
- 4d ago First seen · 125 lines · 1,362 tokens per session scan A ce280cddcfe5
better-result AGENTS.md is an instructions file published in the GitHub repository dmmulroy/better-result (1,948 stars, last pushed 11d ago), licensed MIT. It adds 1,362 tokens to every session, about $0.0068 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 instructions, from other repositories
evlog AGENTS.md
AGENTS.md instructions for HugoRCD/evlog, covering evlog, commands, monorepo structure, conventions and code style: no slop.
vibe-check-mcp-server AGENTS.md
AGENTS.md instructions for PV-Bhat/vibe-check-mcp-server, covering agent quickstart, setup, testing and integration tips.
airbroke AGENTS.md
Instructions for icoretech/airbroke, covering project knowledge base, structure, where to look, code map and conventions.
opencode-dejavu AGENTS.md
Instructions for WhiteBite/opencode-dejavu, covering project knowledge base, structure, where to look, code map and conventions.
evlog CLAUDE.md
Claude Code instructions for HugoRCD/evlog, a project described as: Digging through logs is not observability. It's hope — wide events, structured errors, TypeScript-first, every runtime.
airbroke CLAUDE.md
Instructions for icoretech/airbroke, a project described as: 🔥 Lightweight, Airbrake/Sentry-compatible, PostgreSQL-based Open Source Error Catcher.