Borrowing it
Nothing to install: this file belongs to wordbricks/onequery. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/wordbricks/onequery/main/.agents/skills/better-result-adopt/SKILL.mdgit clone --depth 1 https://github.com/wordbricks/onequeryWrote 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/wordbricks/onequery/better-result-adopt)<a href="https://agentmods.dev/skills/wordbricks/onequery/better-result-adopt"><img src="https://agentmods.dev/badge/skills/wordbricks/onequery/better-result-adopt/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/wordbricks/onequery/better-result-adopt"><img src="https://agentmods.dev/badge/skills/wordbricks/onequery/better-result-adopt.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00042 | $0.01230 |
| Opus 5.5 | $0.00017 | $0.00492 |
| Sonnet 5.5 | $0.00008 | $0.00246 |
| Haiku 4.5 | $0.00004 | $0.00123 |
Grade A, and why
better-result-adopt 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 5d 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 — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.
better-result Adopt
Adopt better-result incrementally in existing codebases without rewriting everything at once.
When to Use
Use this skill when the user wants to:
- migrate from try/catch to
Result.tryorResult.tryPromise - replace nullable return values with typed
Result<T, E> - define domain-specific
TaggedErrortypes - refactor nested error handling into
andThenchains orResult.gen - standardize error handling across a service or module
Reading Order
| Task | Files to Read |
|---|---|
| Adopt better-result in a module | This file |
| Define or review error types | references/tagged-errors.md |
| Inspect library implementation details | opensrc/ if present |
Prerequisites
Before editing code:
- Confirm
better-resultis already installed in the target project. - Check for an
opensrc/directory. If present, read the package source there for current patterns. - Identify the migration scope first: one file, one module, or one boundary layer.
Migration Strategy
1. Start at boundaries
Begin with I/O boundaries and exception-heavy code:
- HTTP clients
- database access
- file system operations
- parsing and validation
- framework adapters
Do not convert the whole codebase at once.
2. Classify existing failures
| Category | Examples | Target shape |
|---|---|---|
| Domain errors | not found, validation, auth | TaggedError + Result.err |
| Infrastructure errors | network, DB, file I/O | Result.tryPromise + mapped error |
| Programmer defects | bad assumptions, null deref | leave throwing; defects become Panic inside Result callbacks |
What ships with it
1 file 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.
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.
- 5d ago First seen · 154 lines · 42 tokens per session scan A f160219b95b5
better-result-adopt is a skill published in the GitHub repository wordbricks/onequery (17 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 42 tokens to every session and 1,230 once invoked, about $0.0002 per session on Opus 5.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-09-25.
Other skills, from other repositories
chat-sdk
Build multi-platform chat bots with Chat SDK (chat npm package). Use when developers want to (1) Build a Slack, Teams, Google Chat, Discord, Telegram, GitHub, Linear, or WhatsApp bot, (2) Use Chat SDK to handle mentions, direct messages, subscribed threads, reactions, slash commands, cards, modals, files, or AI…
NestJS Framework
Node.js/TypeScript backend framework with dependency injection and modular architecture.
codegen
Use for .NET code generation work with Roslyn, Microsoft.OpenApi, Razor templates, DTO/manager/controller generation, REST API generation, C# HttpClient generation, Angular/Axios TypeScript request clients, generated formatting, and deterministic output.
typescript
Skill "typescript" from dhaupin/vant, covering typescript, when to use, what to do, 1. types and 2. generics.
react-component-design
Designs or reviews React component APIs. Handles prop drilling decisions, composition patterns, controlled/uncontrolled contracts, and minimal public API surfaces for React 18+ TypeScript components. Invoked when creating new components, refactoring existing ones, or reviewing component contracts.
typescript-guide
Use when editing or reviewing TypeScript in Node.js ESM projects. Triggers on .ts files, ESM package.json, and prompts about async functions, type inference, strict mode, ESM imports, env handling, template literals, even when the user doesn't say 'TypeScript'.