add-diagnostic
Add a new diagnostic code following the defineDiagnostics() conventions from nostics
How do I install this agent skill?
npx skills add https://github.com/vercel-labs/nostics --skill add-diagnosticIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill provides instructions for adding diagnostic codes to a software project. It uses standard development tools and follows established coding patterns. No security considerations were identified.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Add a diagnostic code
-
Find the catalog: grep
defineDiagnostics. If there are many, pick by area. -
Pick the code:
PREFIX_XNNNN.PREFIXis the project name in uppercase (NUXT,I18N).Xis the area:Bbuild,Rruntime,Cconfig,Ddeprecation.NNNNis the next free number. Never rename or reuse a published code. -
Add the entry:
LIB_R0001: { why: (p: { hook: string }) => `${p.hook}() must run at the top of setup().`, // required fix: 'Move the call into setup() or a composable it calls.', // add when the fix is known docs: 'https://example.com/custom', // optional: overrides docsBase, `false` opts out },whysays what is wrong,fixsays what to do: do not repeat text between them. Params ofwhyandfixare merged and required at the call site.causeandsourcesgo at the call site, not in the definition. -
Call it:
diagnostics.LIB_R0001({ hook })reports,throw diagnostics.LIB_R0001({ hook, cause: err })reports and raises. To check a caught error:diagnostics.LIB_R0001.is(err).
More details: the nostics skill.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/vercel-labs/nostics/add-diagnostic">View add-diagnostic on skillZs</a>