audit-better-result-dependents

Audits better-result API changes against Prisma and Better T Stack npm dependents for breakage.

1.9k|43|Updated Jan 9, 2026
One-click install
npx skills add https://github.com/dmmulroy/better-result --skill audit-better-result-dependents
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audit-better-result-dependents
Source: https://github.com/dmmulroy/better-result/tree/main/.agents/skills/audit-better-result-dependents
Command: npx skills add https://github.com/dmmulroy/better-result --skill audit-better-result-dependents

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

When changing the better-result library's public API, types, or runtime behavior, maintainers risk silently breaking downstream packages like Prisma SDKs and Better T Stack templates. This Skill automates checking whether a proposed change or PR breaks those known dependents before merging.

Core Features & Use Cases

  • Automated dependent auditing: Runs a script that resolves the latest published versions of @prisma/compute-sdk, @prisma/streams-server, @prisma/streams-local, create-better-t-stack, and @better-t-stack/template-generator from the npm registry, then greps their source for usage patterns affected by your change.
  • Flexible source resolution: Checks out the published gitHead from GitHub when available, and falls back to npm pack for private or unavailable repositories.
  • Structured breakage assessment: Guides distinguishing runtime-breaking, type-breaking, and safe changes, with a reporting format suitable for PR bodies.
  • Use Case: Before merging a PR that changes TaggedError.is guard semantics, run the audit to confirm none of the Prisma or Better T Stack dependents rely on the old behavior.

Quick Start

Ask the assistant to audit whether your current better-result changes break Prisma and Better T Stack dependents, optionally naming the specific identifiers or patterns you modified.

Frequently Asked Questions about audit-better-result-dependents

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if a better-result change breaks downstream dependents?

Run the audit script with identifiers touched by your change, such as `node .agents/skills/audit-better-result-dependents/scripts/audit-dependents.mjs isTaggedError`. It greps the latest published source of known Prisma and Better T Stack dependents for matching usage patterns.

Which npm packages does the better-result dependent audit cover?

The audit always checks five dependents: `@prisma/compute-sdk`, `@prisma/streams-server`, `@prisma/streams-local`, `create-better-t-stack`, and `@better-t-stack/template-generator`. These are resolved to their latest versions via npm registry metadata.

What happens if a dependent's GitHub repository is private or unavailable?

The script falls back to `npm pack` and audits the published package source instead. For example, `@prisma/compute-sdk` may point to a private repo, so its npm tarball is downloaded and searched directly.

How do I distinguish runtime-breaking from type-breaking changes in dependents?

Runtime breakage occurs when a dependent passes values that no longer satisfy a changed guard or shape. Type breakage occurs when a dependent references narrowed types, overloads, or exported names that changed. Dependents only creating `TaggedError` instances are typically safe.

What tools are required to run the dependent audit script?

The script requires Node.js, git, npm, and ripgrep (`rg`). It uses the npm registry API to resolve versions, git to clone public repos at their published gitHead, and ripgrep to search dependent source code for risk patterns.