onequery: Skill for Claude Code

.agents/skills/better-result-adopt/SKILL.md

better-result-adopt is a skill for Claude Code, Codex from wordbricks/onequery. It costs 42 tokens per session (1,230 once invoked), scanned A, original, Apache-2.0.

A migration guide for adopting better-result in an existing TypeScript codebase. It replaces thrown errors, rejected promises, and missing-value returns with typed results that make success and failure explicit.

In plain words
What is it for?
Use it when changing HTTP clients, database access, file operations, parsing, or validation to typed result-based error handling.
Why use it?
Error handling spread across exceptions and special return values can be inconsistent and difficult to follow. This supports moving one module or boundary at a time instead of rewriting the whole codebase.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is wordbricks/onequery's own configuration. It tells Claude Code and Codex how to work on onequery itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything onequery configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/wordbricks/onequery/main/.agents/skills/better-result-adopt/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/wordbricks/onequery

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/wordbricks/onequery/better-result-adopt/github.svg)](https://agentmods.dev/skills/wordbricks/onequery/better-result-adopt)
Your own site
<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.

agentmods 80×15 button for better-result-adopt

Your own site · 80×15
<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>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,230 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.
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.00042 $0.01230
Opus 5.5 $0.00017 $0.00492
Sonnet 5.5 $0.00008 $0.00246
Haiku 4.5 $0.00004 $0.00123

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

Security

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.

.agents/skills/better-result-adopt/SKILL.md · 154 lines

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.try or Result.tryPromise
  • replace nullable return values with typed Result<T, E>
  • define domain-specific TaggedError types
  • refactor nested error handling into andThen chains or Result.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:

  1. Confirm better-result is already installed in the target project.
  2. Check for an opensrc/ directory. If present, read the package source there for current patterns.
  3. 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

Read the full file on GitHub · 154 lines

Files

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.

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. 5d ago First seen · 154 lines · 42 tokens per session scan A f160219b95b5

Subscribe to this mod's changes

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.

Related

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…

vercel-labs/open-agents · 191 tokens

NestJS Framework

Node.js/TypeScript backend framework with dependency injection and modular architecture.

FortiumPartners/ensemble · 17 tokens

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.

AterDev/Perigon.CLI · 53 tokens

typescript

Skill "typescript" from dhaupin/vant, covering typescript, when to use, what to do, 1. types and 2. generics.

dhaupin/vant · 6 tokens

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.

soulcodex/agentic · 56 tokens

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'.

xonovex/platform · 63 tokens