[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M754A53KW017SZDH4V2MVZAE":3,"skill-same:01M754A53KW017SZDH4V2MVZAE":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M754A53KW017SZDH4V2MVZAE","nostics",null,"Structured diagnostic code library for JavaScript\u002FTypeScript. Turns errors and other conditions into typed, machine-readable `Diagnostic` instances with stable codes, docs URLs, and actionable fields. Use this skill whenever the project imports `nostics`, or works with `defineDiagnostics`\u002F`defineProdDiagnostics`, the `Diagnostic` class, diagnostic code registries, or structured error handling. Also covers reporters (`createConsoleReporter`, `createFetchReporter` from nostics\u002Freporters\u002Ffetch, `createFileReporter` from nostics\u002Freporters\u002Fnode, `createDevReporter` from nostics\u002Freporters\u002Fdev), formatters (`formatDiagnostic`, `ansiFormatter`, `jsonFormatter`), and Vite plugins (`nosticsStrip` from @nostics\u002Funplugin\u002Fstrip-transform, `nosticsCollector` from @nostics\u002Funplugin\u002Fdev-server-collector). Also use when migrating a library's existing `console.warn`\u002F`console.error`\u002F`warn()` helpers or thrown `Error`s to diagnostics: follow `references\u002Fmigration.md`.","jd-solanki\u002Fairig","jd-solanki","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F47495003?v=4","01M7548DX06078PZNSC2VBP69E","JD Solanki","01M7548FAW74WC9TD1H7NEKKBC",2,"MIT","https:\u002F\u002Fgithub.com\u002Fjd-solanki\u002Fairig\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fnostics\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: nostics\ndescription: \"Structured diagnostic code library for JavaScript\u002FTypeScript. Turns errors and other conditions into typed, machine-readable `Diagnostic` instances with stable codes, docs URLs, and actionable fields. Use this skill whenever the project imports `nostics`, or works with `defineDiagnostics`\u002F`defineProdDiagnostics`, the `Diagnostic` class, diagnostic code registries, or structured error handling. Also covers reporters (`createConsoleReporter`, `createFetchReporter` from nostics\u002Freporters\u002Ffetch, `createFileReporter` from nostics\u002Freporters\u002Fnode, `createDevReporter` from nostics\u002Freporters\u002Fdev), formatters (`formatDiagnostic`, `ansiFormatter`, `jsonFormatter`), and Vite plugins (`nosticsStrip` from @nostics\u002Funplugin\u002Fstrip-transform, `nosticsCollector` from @nostics\u002Funplugin\u002Fdev-server-collector). Also use when migrating a library's existing `console.warn`\u002F`console.error`\u002F`warn()` helpers or thrown `Error`s to diagnostics: follow `references\u002Fmigration.md`.\"\nlicense: MIT\n---\n\n# nostics\n\nEvery error condition becomes a typed `Diagnostic` (extends `Error`) with a stable code, docs URL, and actionable `fix`. Serializable via `toJSON()`.\n\n`Diagnostic`: `name` (the code), `message`\u002F`why` (interpolated text), `fix?`, `docs?`, `sources?` (`'file:line:column'`), `cause?`, `toJSON()`. Throw it, catch it with `instanceof Diagnostic`, send `toJSON()` across process boundaries.\n\n## defineDiagnostics\n\nReturns one callable handle per code. Calling a handle builds a fresh `Diagnostic`, fires every reporter in order, and returns it. `throw` the return value to raise (reporters still run, so a thrown diagnostic also reports).\n\n```ts\nimport { createConsoleReporter, defineDiagnostics } from 'nostics'\n\nconst diagnostics = \u002F*#__PURE__*\u002F defineDiagnostics({\n  docsBase: (code) => `https:\u002F\u002Fnuxt.com\u002Fe\u002F${code.replace('NUXT_', '').toLowerCase()}`,\n  reporters: [\u002F*#__PURE__*\u002F createConsoleReporter()],\n  codes: {\n    NUXT_B1001: {\n      why: 'Could not compile template.',\n      fix: 'Check the template for syntax errors.',\n    },\n    NUXT_B2011: {\n      why: (p: { src: string }) => `Invalid plugin \"${p.src}\". src option is required.`,\n      fix: 'Pass a string path or an object with a `src` to `addPlugin()`.',\n    },\n    NUXT_W9001: { why: 'message', docs: false }, \u002F\u002F per-code: string overrides docsBase, false opts out\n  },\n})\n```\n\n- **`docsBase`** `string | (code) => string | undefined`: string appends `\u002F${code.toLowerCase()}`; function returns the full URL (or `undefined` to omit).\n- **`codes`**: each definition needs `why` (`string | (params) => string`, the only required field, becomes `Error.message`); optional `fix` (`string | (params) => string`) and `docs` (`string | false`).\n- **`reporters`**: fired on every call; optional. Their `options` types are intersected; required reporter options become required at the call site. Omit it (or pass `[]`) for a catalog whose codes are only ever `throw`n: the thrown `Diagnostic` already carries the message, so a console reporter would print it once and surface it again from the uncaught error, a visible duplicate. Keep report-only warnings and fatal throws in separate catalogs when one needs a reporter and the other does not.\n- **Param inference**: params from `why` and `fix` are intersected and required at the call site. If `why` needs `{ src }` and `fix` needs `{ date }`, the call requires `{ src, date }`.\n\n## Call sites\n\n```ts\ndiagnostics.NUXT_B1001() \u002F\u002F no params: report only\ndiagnostics.NUXT_B2011({ src: '\u002Fplugins\u002Fbad.ts' }) \u002F\u002F params first\ndiagnostics.NUXT_B2011({\n  src,\n  cause: originalError,\n  sources: ['nuxt.config.ts:42:3'],\n}) \u002F\u002F runtime fields merge in\ndiagnostics.NUXT_B2011({ src }, { method: 'error' }) \u002F\u002F reporter options second\nthrow diagnostics.NUXT_B2011({ src }) \u002F\u002F raise\n```\n\n`cause`\u002F`sources` go in the params object; `sources` matters most for build\u002Fconfig diagnostics where the JS stack points inside the library. Catch with `if (err instanceof Diagnostic)` then read `.name`, `.message`, `.fix`, `.docs`.\n\n## Reporters\n\n`(diagnostic: Diagnostic, options?: Opts) => void`. Declaring a required `options` type makes the second call-site argument required and typed.\n\n| Reporter                          | Import                    | Description                                                                                                                                                                            |\n| --------------------------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `createConsoleReporter(options?)` | `nostics`                 | `console[method](formatter(d))`. `method` defaults `'warn'` (`'log'\\|'warn'\\|'error'`), `formatter` defaults `formatDiagnostic`; both via options, `method` also overridable per call. |\n| `createFetchReporter(url)`        | `nostics\u002Freporters\u002Ffetch` | POSTs diagnostic JSON to the URL; failures swallowed.                                                                                                                                  |\n| `createFileReporter(options?)`    | `nostics\u002Freporters\u002Fnode`  | Appends NDJSON to a local file (default `.nostics.log`).                                                                                                                               |\n| `createDevReporter()`             | `nostics\u002Freporters\u002Fdev`   | Sends `toJSON()` to the Vite dev server via `import.meta.hot.send()`.                                                                                                                  |\n\n```ts\nimport type { DiagnosticReporter } from 'nostics'\nconst sentryReporter: DiagnosticReporter = (d) =>\n  sentry.captureMessage(d.message, { tags: { code: d.name } })\nconst audited: DiagnosticReporter\u003C{ priority: number }> = (d, o) =>\n  audit.log({ name: d.name, priority: o.priority })\n\u002F\u002F → audited makes diagnostics.X({...}, { priority: 1 }) required and type-checked.\n```\n\n## Formatters\n\n| Formatter               | Import                    | Description                                                                                                |\n| ----------------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------- |\n| `formatDiagnostic`      | `nostics`                 | Plain unicode-decorated string (built-in reporters use it).                                                |\n| `ansiFormatter(colors)` | `nostics\u002Fformatters\u002Fansi` | Colorized; accepts a `Colors` interface (`red`\u002F`yellow`\u002F`cyan`\u002F`gray`\u002F`bold`\u002F`dim`, each `(s) => string`). |\n| `jsonFormatter`         | `nostics\u002Fformatters\u002Fjson` | `JSON.stringify(diagnostic)` via `toJSON()`.                                                               |\n\n`formatDiagnostic` output, detail order fixed `fix` → `sources` → `see`, missing fields omitted:\n\n```\n[NUXT_B2011] Invalid plugin `\u002Fplugins\u002Fbad.ts`. src option is required.\n├▶ fix: Pass a string path or an object with a `src` to `addPlugin()`.\n├▶ sources: nuxt.config.ts:42:3\n╰▶ see: https:\u002F\u002Fnuxt.com\u002Fe\u002Fb2011\n```\n\n## Vite plugins (`@nostics\u002Funplugin`, dev dependency)\n\n`@nostics\u002Funplugin\u002Fstrip-transform` (library authors, build optimization) and `@nostics\u002Funplugin\u002Fdev-server-collector` (app developers, dev-time collection). Both unplugin-based: `.vite()`, `.webpack()`, `.rollup()`, etc.\n\n- **`nosticsStrip`** marks `defineDiagnostics()` `\u002F*#__PURE__*\u002F` and wraps bare diagnostic expression statements with a `NODE_ENV` guard so they tree-shake out of production. Option `packageName?` (default `'nostics'`). Throws\u002Freturns\u002Fassignments stay (they are behavior). For tracking: relative imports, export the catalog directly, no factory wrappers or deep barrels.\n  - The plugin is optional. The same production output happens with no build transform if the catalog is annotated by hand: put `\u002F*#__PURE__*\u002F` before `defineDiagnostics(` and before each reporter factory call inside it (as in every example here), and dev-guard each report-only call site (`process.env.NODE_ENV !== 'production' && diagnostics.CODE(p)`). Always write the annotations in source; reach for the plugin when report-only call sites are unguarded and you want stripping without touching them.\n- **`nosticsCollector`** listens for `createDevReporter()` diagnostics over the Vite WebSocket and writes them as NDJSON via `createFileReporter`. Vite-only. Options `logFile?` (default `.nostics.log`), `debug?` (default `!!process.env.DEBUG`).\n\n```ts\n\u002F\u002F vite.config.ts\nimport { nosticsStrip } from '@nostics\u002Funplugin\u002Fstrip-transform'\nimport { nosticsCollector } from '@nostics\u002Funplugin\u002Fdev-server-collector'\nexport default defineConfig({\n  plugins: [nosticsStrip.vite(), nosticsCollector.vite()],\n})\n\n\u002F\u002F src\u002Fdiagnostics.ts — pair the collector with createDevReporter()\nimport { createConsoleReporter, defineDiagnostics } from 'nostics'\nimport { createDevReporter } from 'nostics\u002Freporters\u002Fdev'\nexport const diagnostics = \u002F*#__PURE__*\u002F defineDiagnostics({\n  reporters: [\u002F*#__PURE__*\u002F createConsoleReporter(), \u002F*#__PURE__*\u002F createDevReporter()],\n  codes: {\n    \u002F* ... *\u002F\n  },\n})\n```\n\n## Production builds\n\n- **Report-only** diagnostics (bare `diagnostics.X()`) should disappear: `nosticsStrip` or hand annotations drop them, then the unused catalog tree-shakes.\n- **Surviving** diagnostics (`throw`\u002F`return`\u002Fassigned\u002Fargument) stay, and each keeps the _whole_ catalog reachable, so every `why`\u002F`fix` ships. Not every library throws in production: if yours only reports, stripping is enough, stop here.\n\nWhen a library _does_ `throw` in production, pick `defineProdDiagnostics` at definition time with a `NODE_ENV` ternary, so a consumer bundler drops the dev branch (all catalog text):\n\n```ts\nimport { defineDiagnostics, defineProdDiagnostics } from 'nostics'\nexport const diagnostics =\n  process.env.NODE_ENV === 'production'\n    ? \u002F*#__PURE__*\u002F defineProdDiagnostics({ docsBase })\n    : \u002F*#__PURE__*\u002F defineDiagnostics({\n        docsBase,\n        reporters: [\n          \u002F* ... *\u002F\n        ],\n        codes: {\n          \u002F* text *\u002F\n        },\n      })\n```\n\nThe accessed code becomes the `message`, `docs` still derives from `docsBase`, no `why`\u002F`fix` text ships. No `reporters` by default (so a surviving `throw` doesn't also log and then resurface as the uncaught error); pass `reporters` to keep prod telemetry. `nosticsStrip` tracks this ternary like a direct catalog export.\n\n## Conventions\n\n- **Codes** are stable, fully-qualified `PREFIX_XNNNN` (`B` build, `R` runtime, `C` config, `D` deprecation). Never reuse or reassign a published code.\n- Always provide `why`; provide `fix` whenever the solution is known (the most actionable field for humans and agents). Use parameterized templates for runtime values, not string concatenation outside the factory.\n- **`why` is the diagnosis, `fix` is the remedy — split them, don't overlap them.** `why` states only what is wrong; `fix` states only what to do. The reporter prints both, so any wording that appears in both is dead weight. When a single source sentence carries both (`\"A hash must start with '#'. Prefix it with '#'.\"`), cut it in two — diagnosis to `why`, remedy to `fix` — rather than pasting the whole thing into `why` and echoing it in `fix`. `fix` accepts a param function too (`(p) => ...`), so move value-bearing remedies (`use \"#${p.hash}\"`) into it instead of leaving them in `why`.\n- Pass `cause` when re-raising; pass `sources` when the JS stack doesn't reflect the user's source.\n- Split large catalogs by domain (`diagnostics\u002Fbuild.ts`, `runtime.ts`, `config.ts`, re-exported from `index.ts`), each `defineDiagnostics()` sharing `docsBase` with its own code range.\n\n## References\n\n- **Migrating an existing library** to nostics (replacing `console.warn`\u002F`console.error`\u002F`warn()`\u002Fthrown `Error`s with diagnostic codes, without changing runtime behavior): follow `references\u002Fmigration.md` start to finish.\n- Building the error-code documentation site (page template, deployment, agent optimization): `references\u002Fdocumentation-site.md`.\n","# nostics\n\nEvery error condition becomes a typed `Diagnostic` (extends `Error`) with a stable code, docs URL, and actionable `fix`. Serializable via `toJSON()`.\n\n`Diagnostic`: `name` (the code), `message`\u002F`why` (interpolated text), `fix?`, `docs?`, `sources?` (`'file:line:column'`), `cause?`, `toJSON()`. Throw it, catch it with `instanceof Diagnostic`, send `toJSON()` across process boundaries.\n\n## defineDiagnostics\n\nReturns one callable handle per code. Calling a handle builds a fresh `Diagnostic`, fires every reporter in order, and returns it. `throw` the return value to raise (reporters still run, so a thrown diagnostic also reports).\n\n```ts\nimport { createConsoleReporter, defineDiagnostics } from 'nostics'\n\nconst diagnostics = \u002F*#__PURE__*\u002F defineDiagnostics({\n  docsBase: (code) => `https:\u002F\u002Fnuxt.com\u002Fe\u002F${code.replace('NUXT_', '').toLowerCase()}`,\n  reporters: [\u002F*#__PURE__*\u002F createConsoleReporter()],\n  codes: {\n    NUXT_B1001: {\n      why: 'Could not compile template.',\n      fix: 'Check the template for syntax errors.',\n    },\n    NUXT_B2011: {\n      why: (p: { src: string }) => `Invalid plugin \"${p.src}\". src option is required.`,\n      fix: 'Pass a string path or an object with a `src` to `addPlugin()`.',\n    },\n    NUXT_W9001: { why: 'message', docs: false }, \u002F\u002F per-code: string overrides docsBase, false opts out\n  },\n})\n```\n\n- **`docsBase`** `string | (code) => string | undefined`: string appends `\u002F${code.toLowerCase()}`; function returns the full URL (or `undefined` to omit).\n- **`codes`**: each definition needs `why` (`string | (params) => string`, the only required field, becomes `Error.message`); optional `fix` (`string | (params) => string`) and `docs` (`string | false`).\n- **`reporters`**: fired on every call; optional. Their `options` types are intersected; required reporter options become required at the call site. Omit it (or pass `[]`) for a catalog whose codes are only ever `throw`n: the thrown `Diagnostic` already carries the message, so a console reporter would print it once and surface it again from the uncaught error, a visible duplicate. Keep report-only warnings and fatal throws in separate catalogs when one needs a reporter and the other does not.\n- **Param inference**: params from `why` and `fix` are intersected and required at the call site. If `why` needs `{ src }` and `fix` needs `{ date }`, the call requires `{ src, date }`.\n\n## Call sites\n\n```ts\ndiagnostics.NUXT_B1001() \u002F\u002F no params: report only\ndiagnostics.NUXT_B2011({ src: '\u002Fplugins\u002Fbad.ts' }) \u002F\u002F params first\ndiagnostics.NUXT_B2011({\n  src,\n  cause: originalError,\n  sources: ['nuxt.config.ts:42:3'],\n}) \u002F\u002F runtime fields merge in\ndiagnostics.NUXT_B2011({ src }, { method: 'error' }) \u002F\u002F reporter options second\nthrow diagnostics.NUXT_B2011({ src }) \u002F\u002F raise\n```\n\n`cause`\u002F`sources` go in the params object; `sources` matters most for build\u002Fconfig diagnostics where the JS stack points inside the library. Catch with `if (err instanceof Diagnostic)` then read `.name`, `.message`, `.fix`, `.docs`.\n\n## Reporters\n\n`(diagnostic: Diagnostic, options?: Opts) => void`. Declaring a required `options` type makes the second call-site argument required and typed.\n\n| Reporter                          | Import                    | Description                                                                                                                                                                            |\n| --------------------------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `createConsoleReporter(options?)` | `nostics`                 | `console[method](formatter(d))`. `method` defaults `'warn'` (`'log'\\|'warn'\\|'error'`), `formatter` defaults `formatDiagnostic`; both via options, `method` also overridable per call. |\n| `createFetchReporter(url)`        | `nostics\u002Freporters\u002Ffetch` | POSTs diagnostic JSON to the URL; failures swallowed.                                                                                                                                  |\n| `createFileReporter(options?)`    | `nostics\u002Freporters\u002Fnode`  | Appends NDJSON to a local file (default `.nostics.log`).                                                                                                                               |\n| `createDevReporter()`             | `nostics\u002Freporters\u002Fdev`   | Sends `toJSON()` to the Vite dev server via `import.meta.hot.send()`.                                                                                                                  |\n\n```ts\nimport type { DiagnosticReporter } from 'nostics'\nconst sentryReporter: DiagnosticReporter = (d) =>\n  sentry.captureMessage(d.message, { tags: { code: d.name } })\nconst audited: DiagnosticReporter\u003C{ priority: number }> = (d, o) =>\n  audit.log({ name: d.name, priority: o.priority })\n\u002F\u002F → audited makes diagnostics.X({...}, { priority: 1 }) required and type-checked.\n```\n\n## Formatters\n\n| Formatter               | Import                    | Description                                                                                                |\n| ----------------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------- |\n| `formatDiagnostic`      | `nostics`                 | Plain unicode-decorated string (built-in reporters use it).                                                |\n| `ansiFormatter(colors)` | `nostics\u002Fformatters\u002Fansi` | Colorized; accepts a `Colors` interface (`red`\u002F`yellow`\u002F`cyan`\u002F`gray`\u002F`bold`\u002F`dim`, each `(s) => string`). |\n| `jsonFormatter`         | `nostics\u002Fformatters\u002Fjson` | `JSON.stringify(diagnostic)` via `toJSON()`.                                                               |\n\n`formatDiagnostic` output, detail order fixed `fix` → `sources` → `see`, missing fields omitted:\n\n```\n[NUXT_B2011] Invalid plugin `\u002Fplugins\u002Fbad.ts`. src option is required.\n├▶ fix: Pass a string path or an object with a `src` to `addPlugin()`.\n├▶ sources: nuxt.config.ts:42:3\n╰▶ see: https:\u002F\u002Fnuxt.com\u002Fe\u002Fb2011\n```\n\n## Vite plugins (`@nostics\u002Funplugin`, dev dependency)\n\n`@nostics\u002Funplugin\u002Fstrip-transform` (library authors, build optimization) and `@nostics\u002Funplugin\u002Fdev-server-collector` (app developers, dev-time collection). Both unplugin-based: `.vite()`, `.webpack()`, `.rollup()`, etc.\n\n- **`nosticsStrip`** marks `defineDiagnostics()` `\u002F*#__PURE__*\u002F` and wraps bare diagnostic expression statements with a `NODE_ENV` guard so they tree-shake out of production. Option `packageName?` (default `'nostics'`). Throws\u002Freturns\u002Fassignments stay (they are behavior). For tracking: relative imports, export the catalog directly, no factory wrappers or deep barrels.\n  - The plugin is optional. The same production output happens with no build transform if the catalog is annotated by hand: put `\u002F*#__PURE__*\u002F` before `defineDiagnostics(` and before each reporter factory call inside it (as in every example here), and dev-guard each report-only call site (`process.env.NODE_ENV !== 'production' && diagnostics.CODE(p)`). Always write the annotations in source; reach for the plugin when report-only call sites are unguarded and you want stripping without touching them.\n- **`nosticsCollector`** listens for `createDevReporter()` diagnostics over the Vite WebSocket and writes them as NDJSON via `createFileReporter`. Vite-only. Options `logFile?` (default `.nostics.log`), `debug?` (default `!!process.env.DEBUG`).\n\n```ts\n\u002F\u002F vite.config.ts\nimport { nosticsStrip } from '@nostics\u002Funplugin\u002Fstrip-transform'\nimport { nosticsCollector } from '@nostics\u002Funplugin\u002Fdev-server-collector'\nexport default defineConfig({\n  plugins: [nosticsStrip.vite(), nosticsCollector.vite()],\n})\n\n\u002F\u002F src\u002Fdiagnostics.ts — pair the collector with createDevReporter()\nimport { createConsoleReporter, defineDiagnostics } from 'nostics'\nimport { createDevReporter } from 'nostics\u002Freporters\u002Fdev'\nexport const diagnostics = \u002F*#__PURE__*\u002F defineDiagnostics({\n  reporters: [\u002F*#__PURE__*\u002F createConsoleReporter(), \u002F*#__PURE__*\u002F createDevReporter()],\n  codes: {\n    \u002F* ... *\u002F\n  },\n})\n```\n\n## Production builds\n\n- **Report-only** diagnostics (bare `diagnostics.X()`) should disappear: `nosticsStrip` or hand annotations drop them, then the unused catalog tree-shakes.\n- **Surviving** diagnostics (`throw`\u002F`return`\u002Fassigned\u002Fargument) stay, and each keeps the _whole_ catalog reachable, so every `why`\u002F`fix` ships. Not every library throws in production: if yours only reports, stripping is enough, stop here.\n\nWhen a library _does_ `throw` in production, pick `defineProdDiagnostics` at definition time with a `NODE_ENV` ternary, so a consumer bundler drops the dev branch (all catalog text):\n\n```ts\nimport { defineDiagnostics, defineProdDiagnostics } from 'nostics'\nexport const diagnostics =\n  process.env.NODE_ENV === 'production'\n    ? \u002F*#__PURE__*\u002F defineProdDiagnostics({ docsBase })\n    : \u002F*#__PURE__*\u002F defineDiagnostics({\n        docsBase,\n        reporters: [\n          \u002F* ... *\u002F\n        ],\n        codes: {\n          \u002F* text *\u002F\n        },\n      })\n```\n\nThe accessed code becomes the `message`, `docs` still derives from `docsBase`, no `why`\u002F`fix` text ships. No `reporters` by default (so a surviving `throw` doesn't also log and then resurface as the uncaught error); pass `reporters` to keep prod telemetry. `nosticsStrip` tracks this ternary like a direct catalog export.\n\n## Conventions\n\n- **Codes** are stable, fully-qualified `PREFIX_XNNNN` (`B` build, `R` runtime, `C` config, `D` deprecation). Never reuse or reassign a published code.\n- Always provide `why`; provide `fix` whenever the solution is known (the most actionable field for humans and agents). Use parameterized templates for runtime values, not string concatenation outside the factory.\n- **`why` is the diagnosis, `fix` is the remedy — split them, don't overlap them.** `why` states only what is wrong; `fix` states only what to do. The reporter prints both, so any wording that appears in both is dead weight. When a single source sentence carries both (`\"A hash must start with '#'. Prefix it with '#'.\"`), cut it in two — diagnosis to `why`, remedy to `fix` — rather than pasting the whole thing into `why` and echoing it in `fix`. `fix` accepts a param function too (`(p) => ...`), so move value-bearing remedies (`use \"#${p.hash}\"`) into it instead of leaving them in `why`.\n- Pass `cause` when re-raising; pass `sources` when the JS stack doesn't reflect the user's source.\n- Split large catalogs by domain (`diagnostics\u002Fbuild.ts`, `runtime.ts`, `config.ts`, re-exported from `index.ts`), each `defineDiagnostics()` sharing `docsBase` with its own code range.\n\n## References\n\n- **Migrating an existing library** to nostics (replacing `console.warn`\u002F`console.error`\u002F`warn()`\u002Fthrown `Error`s with diagnostic codes, without changing runtime behavior): follow `references\u002Fmigration.md` start to finish.\n- Building the error-code documentation site (page template, deployment, agent optimization): `references\u002Fdocumentation-site.md`.\n",{"name":5,"license":15,"description":7},"main","aa3f7debf0c9eeb73656ed9c1b62467ed920e7bd",".ai\u002Fskills\u002Fnostics",0,"https:\u002F\u002Fgithub.com\u002Fjd-solanki\u002Fairig","https:\u002F\u002Fgithub.com\u002Fjd-solanki","https:\u002F\u002Fjd-solanki.github.io","VueJS, Python + Automation 😍","2026-07-11 22:19:36",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add jd-solanki\u002Fairig --skill nostics",{"tool":39,"command":40},"bunx","bunx skills add jd-solanki\u002Fairig --skill nostics",{"tool":42,"command":43},"pnpm","pnpm dlx skills add jd-solanki\u002Fairig --skill nostics","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjd-solanki\u002Fairig\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fnostics\u002FSKILL.md",true,[47,53],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002Fdocumentation-site.md","REFERENCE","参考文档",2172,"https:\u002F\u002Fgithub.com\u002Fjd-solanki\u002Fairig\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fnostics\u002Freferences\u002Fdocumentation-site.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fmigration.md",10799,"https:\u002F\u002Fgithub.com\u002Fjd-solanki\u002Fairig\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fnostics\u002Freferences\u002Fmigration.md",[58,65,72,79,86,93],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M754ARS6MGAC344C90J4DW5D","writing-great-skills","Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable.","https:\u002F\u002Fgithub.com\u002Fjd-solanki\u002Fairig\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fwriting-great-skills\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M754APFXT5JF0DKP3AR9Q61C","to-prd","Turn the current conversation context into a PRD and publish it to the project issue tracker. Use when user wants to create a PRD from the current context.","https:\u002F\u002Fgithub.com\u002Fjd-solanki\u002Fairig\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fto-prd\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M754AJY5XN0KYXKSA6SAJ6QW","to-issues","Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices. Use when user wants to convert a plan into issues, create implementation tickets, or break down work into issues.","https:\u002F\u002Fgithub.com\u002Fjd-solanki\u002Fairig\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fto-issues\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M754AFXQKKYXEQMWBHV6XKY2","tdd","Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions \"red-green-refactor\", or wants integration tests.","https:\u002F\u002Fgithub.com\u002Fjd-solanki\u002Fairig\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ftdd\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M754AC5GCSJBHSZWRW05WZ5F","review","Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes — Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue\u002FPRD asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to \"review since X\".","https:\u002F\u002Fgithub.com\u002Fjd-solanki\u002Fairig\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Freview\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M754A24GTBMYJ237WQZ9XY8T","node-cli","Patterns and conventions for building Node.js CLI tools — src structure, entry point setup, Commander wiring, and update notifications. Use when creating or modifying a Node.js CLI, adding Commander commands, wiring update-notifier, or asking how to structure a CLI entry point or src directory.","https:\u002F\u002Fgithub.com\u002Fjd-solanki\u002Fairig\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fnode-cli\u002FSKILL.md",[],[]]