# Dev.bootstrap.typescript

> Use when creating TypeScript projects or add TypeScript pre-commit checks.

- Skill: `kevinslin-skills/dev-bootstrap-typescript` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add kevinslin-skills/dev-bootstrap-typescript`
- Raw SKILL.md: https://api.skillmd.com/api/skills/kevinslin-skills/dev-bootstrap-typescript/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: kevinslin (https://skillmd.com/u/kevinslin-skills)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/kevinslin-skills/dev-bootstrap-typescript

---


# Dev.bootstrap.typescript

## Overview

Bootstrap new TypeScript projects from a local Copier template or add a pre-commit hook that runs linting and formatting for an existing project.

## Workflow

### 1. Pick the path

- New project: run `scripts/bootstrap_project.sh`
- Existing project: run `scripts/add_precommit.sh`

### 2. Bootstrap a new project

- Ensure `copier` is installed and `/Users/kevinlin/code/copier-typescript-codex` exists.
- Run `scripts/bootstrap_project.sh <target_dir> [copier args]`.
- Use `--data` to avoid interactive prompts when needed.

### 3. Post-bootstrap follow-up (new project)

- By default, `scripts/bootstrap_project.sh` runs these steps; pass `--skip-followup` (or `--no-followup`) to skip.
- If you ran Copier directly, from `target_dir` run `pnpm install` and `pnpm test`.
- If no `.git` directory exists, run `git init` then `pnpm prepare` to activate Husky hooks.

### 4. Add pre-commit hook (augment)

- Ensure `package.json` exists and defines `lint` and `format` scripts.
- Run `scripts/add_precommit.sh [project_root]`.
- If `.husky/_/husky.sh` is missing, run your package manager install (or `npx husky install`) to activate hooks.

