Node.js / TypeScript
TypeScript-first development skill. Delivers strict-typed, clean, verified Node/TS code. JavaScript without types is the fallback, not the default.
Core stance
- Strict TypeScript.
strict: true with every flag on; no any without a justification; types model the domain, not the other way around.
- Type inference over annotation. Annotate public API boundaries and let inference carry the rest.
- Evidence first. When code crashes, hangs, or returns wrong output, gather runtime evidence with
dbga and the debug-agent skill before guessing. See references/debugging.md.
- Clean, self-explaining code; no comments unless asked — see
_shared/clean-code.md (cross-reference, do not restate).
- Audit then suggest dependency bumps (
npm outdated, npm audit) — see _shared/dependency-hygiene.md.
- Validation discipline — see
_shared/evidence-first.md.
References — load on demand
| Need |
Read |
| Module/composition/DI patterns, anti-patterns |
references/design-patterns.md |
Advanced types: conditional, mapped, template-literal, branded, discriminated unions, infer, utility types |
references/typescript-types.md |
| async/await, Promise combinators, concurrency limits, streams, EventEmitter, graceful shutdown |
references/async-patterns.md |
Typed errors, Result types, never exhaustiveness, custom error classes, async error wrapping |
references/errors-structure.md |
| Plain JS with no types: JSDoc typing, defensive coding, ESM |
references/js-fallback.md |
dbga + vscode-js-debug recipes for Node/TS |
references/debugging.md |
Toolchain
- Runtime:
node (use a current LTS). Package manager: npm / pnpm.
- Type-check:
tsc --noEmit. Lint/format: ESLint + Prettier.
- Test: Vitest (preferred) or Jest. Cover edge cases, not just the happy path.
- Run a real flow (
tsc --noEmit, the test suite, or the actual command) before declaring anything done.
Evidence-First Debugging (debug-agent toolkit)
You have dbga — an evidence-first debugger for Python/Go/Node over DAP — and the debug-agent skill. When code crashes, hangs, produces wrong output, or you need live runtime state, DO NOT guess from source. Gather evidence:
dbga diagnose --timeout 60 --cwd <dir> -- node buggy.js → triage a crash to the deepest user frame
dbga session start --break-at file:line -- <script> then dbga session eval --expr "<x>" → inspect live state
- Invoke the
debug-agent skill for the full evidence-first loop.
Node uses vscode-js-debug (set $DBGA_JS_DEBUG_SERVER if not auto-discovered); only a single launched process is validated today. Validate against real use flows and verify the fix at the original fault before declaring it done.
Source: niradler/dbga — distributed by TomeVault.
1---2name: niradler-dbga-node3description: Node.js / TypeScript4---56# Node.js / TypeScript78TypeScript-first development skill. Delivers strict-typed, clean, verified Node/TS code. JavaScript without types is the fallback, not the default.910## Core stance1112- **Strict TypeScript.** `strict: true` with every flag on; no `any` without a justification; types model the domain, not the other way around.13- **Type inference over annotation.** Annotate public API boundaries and let inference carry the rest.14- **Evidence first.** When code crashes, hangs, or returns wrong output, gather runtime evidence with `dbga` and the `debug-agent` skill before guessing. See `references/debugging.md`.15- **Clean, self-explaining code; no comments unless asked** — see `_shared/clean-code.md` (cross-reference, do not restate).16- **Audit then suggest dependency bumps** (`npm outdated`, `npm audit`) — see `_shared/dependency-hygiene.md`.17- **Validation discipline** — see `_shared/evidence-first.md`.1819## References — load on demand2021| Need | Read |22| --- | --- |23| Module/composition/DI patterns, anti-patterns | `references/design-patterns.md` |24| Advanced types: conditional, mapped, template-literal, branded, discriminated unions, `infer`, utility types | `references/typescript-types.md` |25| async/await, Promise combinators, concurrency limits, streams, EventEmitter, graceful shutdown | `references/async-patterns.md` |26| Typed errors, Result types, `never` exhaustiveness, custom error classes, async error wrapping | `references/errors-structure.md` |27| Plain JS with no types: JSDoc typing, defensive coding, ESM | `references/js-fallback.md` |28| `dbga` + vscode-js-debug recipes for Node/TS | `references/debugging.md` |2930## Toolchain3132- Runtime: `node` (use a current LTS). Package manager: npm / pnpm.33- Type-check: `tsc --noEmit`. Lint/format: ESLint + Prettier.34- Test: Vitest (preferred) or Jest. Cover edge cases, not just the happy path.35- Run a real flow (`tsc --noEmit`, the test suite, or the actual command) before declaring anything done.3637## Evidence-First Debugging (debug-agent toolkit)3839You have `dbga` — an evidence-first debugger for Python/Go/Node over DAP — and the `debug-agent` skill. When code crashes, hangs, produces wrong output, or you need live runtime state, DO NOT guess from source. Gather evidence:4041- `dbga diagnose --timeout 60 --cwd <dir> -- node buggy.js` → triage a crash to the deepest user frame42- `dbga session start --break-at file:line -- <script>` then `dbga session eval --expr "<x>"` → inspect live state43- Invoke the `debug-agent` skill for the full evidence-first loop.4445Node uses vscode-js-debug (set `$DBGA_JS_DEBUG_SERVER` if not auto-discovered); only a single launched process is validated today. Validate against real use flows and verify the fix at the original fault before declaring it done.4647---48> Source: [niradler/dbga](https://github.com/niradler/dbga) — distributed by [TomeVault](https://tomevault.io).49<!-- tomevault:4.0:skill_md:2026-06-15 -->