Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
vercel-labs avatar

Add Diagnostic

  • 21 installs
  • 191 repo stars
  • Updated July 17, 2026
  • vercel-labs/nostics

add-diagnostic registers new nostics diagnostic codes with why and optional fix fields.

About

The add-diagnostic skill adds entries to a nostics diagnostic catalog using defineDiagnostics conventions. It greps for defineDiagnostics to locate the correct codes object, then assigns PREFIX_XNNNN codes where PREFIX is the uppercased project name, X is the area letter for build, runtime, config, or deprecation, and NNNN is the next free number without reusing published codes. Each entry requires a why field as string or typed function becoming Error.message, with optional fix guidance and docs URL or false to opt out. Runtime fields like cause and sources are passed at the call site, not in the definition. Reporting uses diagnostics.LIB_R0001 and throwing uses throw diagnostics.LIB_R0001 with cause. Full API details reference the parent nostics skill for reporters and formatters.

  • Locates defineDiagnostics catalog via grep.
  • Assigns PREFIX_XNNNN codes without reusing published IDs.
  • Defines why, fix, and docs fields per nostics schema.
  • Documents report and throw call-site patterns.
  • Integrates with nostics reporters and formatters.

Add Diagnostic by the numbers

  • 21 all-time installs (skills.sh)
  • +2 installs in the week ending Jul 27, 2026 (Skillselion tracking)
  • Ranked #361 of 550 CLI & Terminal skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

add-diagnostic capabilities & compatibility

Capabilities
code naming prefix_xnnnn convention · entry schema why fix docs · report and throw call patterns
Use cases
debugging · api development
From the docs

What add-diagnostic says it does

Add a new diagnostic code following the defineDiagnostics() conventions
SKILL.md
npx skills add https://github.com/vercel-labs/nostics --skill add-diagnostic

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs21
repo stars191
Last updatedJuly 17, 2026
Repositoryvercel-labs/nostics

How do I add a diagnostic code in nostics?

Add a new diagnostic code following nostics defineDiagnostics conventions with why, fix, and docs fields.

Who is it for?

Library authors extending nostics defineDiagnostics catalogs.

Skip if: Skip when only consuming existing diagnostics without authoring codes.

When should I use this skill?

User adds a new diagnostic following defineDiagnostics conventions.

What you get

New diagnostic entry callable via diagnostics.CODE(params).

Files

SKILL.mdMarkdownGitHub ↗

Add a New Diagnostic Code

1. Find the catalog. Grep for defineDiagnostics to locate the codes object the new entry belongs in. With several catalogs, pick by area. 2. Pick the code. PREFIX_XNNNN: PREFIX is the project name uppercased (NUXT, I18N); X is the area letter (B build, R runtime, C config, D deprecation); NNNN is the next free number. Read existing codes to choose. Never rename or reuse a published code. 3. Add the entry:

LIB_R0001: {
  why: (p: { hook: string }) => `${p.hook}() must run at the top of setup().`, // string or typed fn; becomes Error.message (required)
  fix: 'Move the call into setup() or a composable it calls.', // optional, but add whenever the fix is known
  docs: 'https://example.com/custom', // optional: overrides docsBase, or `false` to opt out
},
  • why is the only required field. Params from why and fix are intersected and required at the call site.
  • Runtime fields (cause, sources) are passed at the call site, never in the definition.

4. Call it: diagnostics.LIB_R0001({ hook }) to report, throw diagnostics.LIB_R0001({ hook, cause: err }) to raise. Both run the reporters.

Full API and reporter/formatter/plugin details: the nostics skill.

Related skills

FAQ

What does add-diagnostic do?

add-diagnostic registers new nostics diagnostic codes with why and optional fix fields.

When should I use add-diagnostic?

User adds a new diagnostic following defineDiagnostics conventions.

Is this skill safe to install?

Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.