
adopt-better-result
Adopt better-result in an existing TypeScript codebase. Use for a repository-wide error-handling audit and proposal, or for implementing a named vertical slice with TaggedError and Result.
- Installs
- 548
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/dmmulroy/better-result --skill adopt-better-result- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads adopt-better-result automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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.
Recommend the best first slice and explain why it is bounded and valuable.
Complete when: every catalogued failure has a disposition, every boundary has a recorded codec decision, and one first slice is recommended.
4. Present the approval gate
Present the report and recommendation. The audit branch's only repository change is the report.
Complete when: the report is presented. An explicit approval of one named vertical slice starts the implementation branch; otherwise the run ends here.
Named-slice branch: implementation
1. Establish the slice and API facts
Read the repository instructions, validation commands, installed better-result API, relevant production code, and tests. Trace the named failure source through its immediate callers to its handling or transport boundary. Reuse an existing adoption report when present; otherwise retain the evidence for the implementation summary.
Complete when: the slice boundary, current behavior, failure variants, callers, side effects, and transport boundaries are accounted for, and the available API is verified.
2. Implement one vertical slice
Follow references/vertical-slice-migration.md, using references/tagged-errors.md for failure dispositions and references/result-boundaries.md for boundary contracts. Keep the implementation within the named propagation path.
Complete when: the path is consistently Result-based from failure source to its chosen handling boundary, with every error variant handled and every control-flow seam accounted for.
3. Verify and report
Run the repository's applicable format, lint, type-check, and relevant test commands. Update an existing adoption report with completed work, deviations, discoveries, and validation evidence; otherwise include them in the user-facing summary. End after recommending the next slice.
Complete when: all applicable checks pass, or every failure is reported with evidence, and the report or summary accurately describes the repository's current state.
FAQ
What does the adopt-better-result skill do?
Adopt better-result in an existing TypeScript codebase. Use for a repository-wide error-handling audit and proposal, or for implementing a named vertical slice with TaggedError and Result.
How do I install adopt-better-result?
Run npx skills add https://github.com/dmmulroy/better-result --skill adopt-better-result in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/adopt-better-result/ (personal) or .claude/skills/adopt-better-result/ (project).
Which AI agents can use adopt-better-result?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is adopt-better-result safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains adopt-better-result?
It is published by dmmulroy in dmmulroy/better-result. It has 548 recorded installs.
More from dmmulroy/better-result
better-result-adopt
dmmulroy/better-result
Adopt better-result in an existing TypeScript codebase. Use when replacing try/catch, Promise rejection handling, null sentinels, or thrown domain exceptions with typed Result workflows.
better-result-migrate-v2
dmmulroy/better-result
Open the skill to read its SKILL.md instructions.
migrate-better-result-3
dmmulroy/better-result
Open the skill to read its SKILL.md instructions.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.