add-diagnostic
Skill251 starsChanged 57 days agoMITView on GitHub
Add a new diagnostic code following the defineDiagnostics() conventions from nostics
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- jd-solanki/krutrimboxedited, first seen Sep 27, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- jd-solanki/krutrimbox★ 198% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- playground/AGENTS.mdAGENTS.md
- playground/CLAUDE.mdCLAUDE.md
- nosticsSkill
The file
Files
Add a New Diagnostic Code
- Find the catalog. Grep for
defineDiagnosticsto locate thecodesobject the new entry belongs in. With several catalogs, pick by area. - Pick the code.
PREFIX_XNNNN:PREFIXis the project name uppercased (NUXT,I18N);Xis the area letter (Bbuild,Rruntime,Cconfig,Ddeprecation);NNNNis the next free number. Read existing codes to choose. 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().`, // 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
},whyis the only required field. Params fromwhyandfixare intersected and required at the call site.- Runtime fields (
cause,sources) are passed at the call site, never in the definition.
- Call it:
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))(narrowserr.data).
Full API and reporter/formatter/plugin details: the nostics skill.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

