/nostics:add-diagnosticfrom nostics
Adds a new diagnostic code following defineDiagnostics() conventions from nostics. Helps maintain consistent error codes across a project.
Ships in nostics. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
defineDiagnostics to locate the codes object the new entry belongs in. With several catalogs, pick by area.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.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.cause, sources) are passed at the call site, never in the definition.diagnostics.LIB_R0001({ hook }) to report, throw diagnostics.LIB_R0001({ hook, cause: err }) to raise. Both run the reporters. To check a caught error: if (diagnostics.LIB_R0001.is(err)) (narrows err.data).Full API and reporter/formatter/plugin details: the nostics skill.
What SKILL.md sets; muted values are Claude Code's defaults
2 skills in this plugin
npx claudepluginhub pleaseai/claude-code-plugins --plugin nosticsOther plugins' skills for the same job