adopt-better-result

adopt-better-result is a skill for Claude Code, Codex from dmmulroy/better-result. It costs 43 tokens per session (833 once invoked), scanned A, original, MIT.

A guide for adopting better-result, a TypeScript library pattern for returning either a successful value or a structured error.

In plain words
What is it for?
It supports repository-wide error-handling audits and named implementation slices using tagged errors and result values.
Why use it?
It helps find inconsistent error handling across a codebase and plan or implement changes in a controlled part of the application.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

not rated 2.0krepo +8 18d ago A scan Socket: passSnyk: passSkillSpector: pass 43 tokens original MIT

Good fit It supports repository-wide error-handling audits and named implementation slices using tagged errors and result values.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dmmulroy/better-result/adopt-better-result
About the project

better-result is a TypeScript library that represents either a successful value or an expected failure as a typed Result, allowing multi-step workflows to stop when an operation fails. TypeScript developers use it to make recoverable errors explicit while keeping unexpected exceptions as thrown defects. The catalogue skills and instruction support working with the library.

dmmulroy/better-result · 1,957 stars · on GitHub

Install

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.

Any agent
npx skills add dmmulroy/better-result --skill adopt-better-result
Clone the repo
git clone --depth 1 https://github.com/dmmulroy/better-result

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 adopt-better-result

README.md
[![agentmods](https://agentmods.dev/badge/skills/dmmulroy/better-result/adopt-better-result/github.svg)](https://agentmods.dev/skills/dmmulroy/better-result/adopt-better-result)
Your own site
<a href="https://agentmods.dev/skills/dmmulroy/better-result/adopt-better-result"><img src="https://agentmods.dev/badge/skills/dmmulroy/better-result/adopt-better-result/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 adopt-better-result

Your own site · 80×15
<a href="https://agentmods.dev/skills/dmmulroy/better-result/adopt-better-result"><img src="https://agentmods.dev/badge/skills/dmmulroy/better-result/adopt-better-result.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 833 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
  • Socket pass 1 Aug 2026
  • Snyk pass 1 Aug 2026
How audits are shown
Origin original No closer match found 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.00043 $0.00833
Opus 5 $0.00022 $0.00417
Sonnet 5 $0.00009 $0.00167
Haiku 4.5 $0.00004 $0.00083

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

Security

Grade A, and why

adopt-better-result 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 10d 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.

skills/adopt-better-result/SKILL.md · 68 lines

How it starts

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

Adopt better-result

Start with evidence, then work at the scale named by the user.

Choose the branch

  • Audit branch: Use when the user requests a repository-wide audit or proposal, or has not named an implementation slice. Complete the audit branch before changing production code.
  • Named-slice branch: Use when the user explicitly requests implementation of a function, module, boundary, or previously proposed slice. Limit evidence collection to that slice and its propagation path.

An approved slice from the audit branch continues through the named-slice branch.

Audit branch: repository-wide proposal

1. Establish the repository and API facts

Read the repository instructions, package manifests, source layout, test commands, and architecture documentation. Determine whether better-result is installed and which version/API is available. Prefer installed types and source over remembered APIs.

Map every production-code area before studying individual failures. Exclude generated and vendored code from the audit; inspect tests for intended behavior.

Complete when: every production-code area is listed, the validation commands are known, and the available better-result API has been verified.

2. Audit every production-code area

Follow references/repository-audit.md. Trace search evidence into end-to-end failure paths, keep grouped sites accountable with counts, and record obscured paths as unknown.

Write the audit to the repository's established documentation or planning location, falling back to docs/better-result-adoption.md.

Complete when: the report satisfies the coverage and completion requirements in repository-audit.md.

3. Design the target model

Apply the failure taxonomy in references/tagged-errors.md and make each boundary decision with references/result-boundaries.md. Add the proposed dispositions, user-facing mappings, boundary decisions, and ranked vertical migration slices to the report.

Read the full file on GitHub · 68 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 10d ago First seen · 68 lines · 43 tokens per session scan A f41d2d371dbc

Subscribe to this mod's changes

adopt-better-result is a skill published in the GitHub repository dmmulroy/better-result (1,957 stars, last pushed 18d ago), licensed MIT. It adds 43 tokens to every session and 833 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.