setup-ts-project-config

Installation
SKILL.md

Setup TS Project Config (planning)

Plan — don't build. This skill inspects a TypeScript project, asks the toolchain decisions once, and writes an ordered, resumable plan for wiring the standard quality gates: a Husky pre-commit hook driven by lint-staged, a commit-msg hook driven by commitlint, a linter and formatter (ESLint flat config + Prettier, or Biome for both), and a unit-test runner (Vitest by default; an existing Jest or node:test setup is kept). The plan lands at <cwd>/.plans/setup-ts-project-config/plan.md. No project files are created or modified by this skill — executing the plan is a separate step, done by hand or with whatever implementation workflow you use.

Use this when bootstrapping a fresh TS repo or retrofitting tooling onto one with none. Re-run any time: the skill re-reads an existing plan, reconciles it against the project's current state, and reports what's still outstanding.

Core rules

  1. Plan only — never touch the project. The single file this skill writes is <cwd>/.plans/setup-ts-project-config/plan.md (creating .plans/setup-ts-project-config/ if needed). It never installs dependencies and never writes eslint.config.*, package.json, .husky/, tsconfig.json, etc. Those are steps in the plan, for someone else to run.
  2. Detect before planning. Run scripts/detect-stack.sh first. Never assume the package manager — use the one the lockfile implies (pnpm / yarn / npm / bun); the plan's commands are written for that manager.
  3. Resumable. On every invocation, check for an existing plan.md. If it exists, read it, re-run detection, mark steps the project now satisfies as - [x] with an "(already present)" note, refresh the detected-state table, and report the outstanding steps — never blow the file away, never delete a step the user has annotated. Only rewrite sections that changed.
  4. Never clobber — in the plan too. If a config file already exists (eslint.config.*, .prettierrc*, biome.json*, knip.config.*, commitlint.config.*, vitest.config.*, .husky/), the plan records it as present — leave as-is instead of emitting an overwrite step, unless the user explicitly asked to replace it.
  5. One toolchain for lint+format. Either ESLint+Prettier or Biome — never both. If the project already has one, the plan keeps it; otherwise the choice is asked and recorded in the plan.
  6. Keep the existing test runner. The plan scaffolds Vitest only when no Jest / Vitest / node:test setup is detected.
  7. The plan is self-sufficient. Every step is concrete: exact install command, exact file path plus the REFERENCE.md section to copy from, exact package.json keys, exact hook contents. A reader should not have to re-derive anything.
  8. Verification is a planned step, not something this skill runs. The final plan steps are "run lint / format:check / type-check / test, report results" and "exercise the hooks with a trivial commit" — instructions for the executor, not actions for this skill.

Plan file format

Installs
19
Repository
sanxzy/skills
First Seen
May 13, 2026
setup-ts-project-config — sanxzy/skills