TypeScript Development
Announce: "I'm using the typescript-dev skill. Following the 4-phase workflow."
MANDATORY: Read and Follow the Shared Workflow
You MUST read workflow.md NOW and follow ALL 4 phases defined there. The sections below provide TypeScript-specific inputs for each phase.
Read patterns.md during Phase 1.
If you lost workflow.md from context: Re-read ../../shared/workflow.md NOW before continuing.
TypeScript-Specific Configuration
Verification Commands (Phase 1 plan + Phase 3 verify)
WORKFLOW STATE Verification line: tsc --noEmit, <lint-commands>, vitest/jest (lint failure BLOCKS Phase 3 verify — see Lint Enforcement below).
Phase 3 Tier A commands:
tsc --noEmit — type checking
- Lint — see Lint Enforcement below; failure blocks Phase 3
vitest or jest — tests
- Coverage target: 70-80%
Phase 3 Tier B additional MCP verifications:
- PostgreSQL MCP → Query DB state before/after
Lint Enforcement (Phase 3)
Lint failures BLOCK Phase 3 verification with the same severity as a failing test. Read references/lint-enforcement.md at the start of Phase 3 verification and follow it.
Detection is a union, not a priority ladder:
- If
package.json defines scripts.lint → run <PM> run lint (PM detected per references/package-manager.md). Done.
- Else, run every detected standalone linter (biome / eslint / oxlint) — all must pass.
- Else, record "Lint: skipped (no linter configured)" and do not block.
No --fix auto-remediation — agents fix lint errors intentionally.
Implementation Rules (Phase 3)
- Schema structure — Zod CRUD variants per entity (CreateInput/UpdateInput/Output), domain-driven
schemas.ts, types derived via z.infer, composition over deep extends chains
- Minimize complexity — Map/Set lookups over array scans
- Preserve compatibility —
.transform() for renamed fields, .default() for new fields, preserve exported signatures, re-export moved symbols
Staff Review Configuration (Phase 4)
- Patterns file path: Path to this skill's
patterns.md
TypeScript-Specific Rules
- Types are erased at runtime — external data needs Zod validation
- Fix type errors during implementation, not after
- No positive claim without running
tsc --noEmit
- Before emitting any
install / run <script> / exec <bin> command, detect the project's package manager — read references/package-manager.md. Never default to npm.
- Lint failures BLOCK Phase 3 verify — same severity as test failures. Skip is allowed only when no linter is configured (no
scripts.lint, no biome/eslint/oxlint config). See references/lint-enforcement.md.
Quality Checklist (TypeScript-Specific)
Add these to the shared workflow's verification checklist:
1---2name: typescript-dev3description: "TypeScript development. Use for TypeScript, Node.js, Express, Fastify, Zod, vitest, jest. Backend, CLI, libraries only — no frontend frameworks."4user-invocable: true5allowed-tools: Glob, Read, Grep, Bash, Task, Skill, Edit, Write, AskUserQuestion6metadata:7 source: https://skillmd.com/skills/concertonotes/typescript-dev8---910# TypeScript Development1112**Announce:** "I'm using the typescript-dev skill. Following the 4-phase workflow."1314## MANDATORY: Read and Follow the Shared Workflow1516**You MUST read [workflow.md](../../shared/workflow.md) NOW** and follow ALL 4 phases defined there. The sections below provide TypeScript-specific inputs for each phase.1718Read [patterns.md](patterns.md) during Phase 1.1920**If you lost workflow.md from context:** Re-read `../../shared/workflow.md` NOW before continuing.2122---2324## TypeScript-Specific Configuration2526### Verification Commands (Phase 1 plan + Phase 3 verify)2728WORKFLOW STATE Verification line: `tsc --noEmit, <lint-commands>, vitest/jest` (lint failure BLOCKS Phase 3 verify — see Lint Enforcement below).2930**Phase 3 Tier A commands:**31- `tsc --noEmit` — type checking32- Lint — see [Lint Enforcement](#lint-enforcement-phase-3) below; failure blocks Phase 333- `vitest` or `jest` — tests34- Coverage target: 70-80%3536**Phase 3 Tier B additional MCP verifications:**37- PostgreSQL MCP → Query DB state before/after3839### Lint Enforcement (Phase 3)4041**Lint failures BLOCK Phase 3 verification** with the same severity as a failing test. Read [references/lint-enforcement.md](references/lint-enforcement.md) at the start of Phase 3 verification and follow it.4243Detection is a union, not a priority ladder:441. If `package.json` defines `scripts.lint` → run `<PM> run lint` (PM detected per [references/package-manager.md](references/package-manager.md)). Done.452. Else, run **every** detected standalone linter (biome / eslint / oxlint) — all must pass.463. Else, record "Lint: skipped (no linter configured)" and do not block.4748No `--fix` auto-remediation — agents fix lint errors intentionally.4950### Implementation Rules (Phase 3)5152- **Schema structure** — Zod CRUD variants per entity (CreateInput/UpdateInput/Output), domain-driven `schemas.ts`, types derived via `z.infer`, composition over deep extends chains53- **Minimize complexity** — Map/Set lookups over array scans54- **Preserve compatibility** — `.transform()` for renamed fields, `.default()` for new fields, preserve exported signatures, re-export moved symbols5556### Staff Review Configuration (Phase 4)5758- **Patterns file path:** Path to this skill's `patterns.md`5960---6162## TypeScript-Specific Rules6364- Types are erased at runtime — external data needs Zod validation65- Fix type errors during implementation, not after66- No positive claim without running `tsc --noEmit`67- Before emitting any `install` / `run <script>` / `exec <bin>` command, detect the project's package manager — read [references/package-manager.md](references/package-manager.md). Never default to `npm`.68- Lint failures BLOCK Phase 3 verify — same severity as test failures. Skip is allowed only when no linter is configured (no `scripts.lint`, no biome/eslint/oxlint config). See [references/lint-enforcement.md](references/lint-enforcement.md).6970---7172## Quality Checklist (TypeScript-Specific)7374Add these to the shared workflow's verification checklist:7576- [ ] Using TypeScript 5.x+ features where appropriate77- [ ] `strict: true` enabled in tsconfig.json78- [ ] No `any` types (or explicitly justified)79- [ ] Proper type guards for runtime checks80- [ ] Zod or similar for external data validation81- [ ] ESM imports with proper extensions82- [ ] `tsc --noEmit` passes (no type errors)83- [ ] Lint passed (or explicitly skipped because no linter is configured)84- [ ] Tests pass (`vitest`/`jest`)