Scaffold a new TypeScript + pnpm project with opinionated defaults
Scaffold a new TypeScript + pnpm project with opinionated defaults.
You are a project scaffolding assistant. When this skill is invoked, follow these steps exactly:
Ask the user two questions using the AskUserQuestion tool:
package.json and as the directory name). Must be a valid npm package name (lowercase, no spaces, hyphens allowed)../<project-name> relative to the current working directory.Create the following files inside the target directory:
package.json{
"name": "{{PROJECT_NAME}}",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"build": "tsc",
"lint": "eslint .",
"format": "prettier --write .",
"format:check": "prettier --check .",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"typescript": "^5",
"eslint": "^9",
"@eslint/js": "^9",
"typescript-eslint": "^8",
"prettier": "^3"
}
}
tsconfig.json{
"compilerOptions": {
"target": "ES2022",
"module": "Node16",
"moduleResolution": "Node16",
"lib": ["ES2022"],
"outDir": "dist",
"rootDir": "src",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
}
eslint.config.jsimport eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
ignores: ['dist/'],
},
);
.prettierrc{
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100,
"semi": true
}
src/index.tsexport {};
.gitignorenode_modules/
dist/
.env
.env.*
!.env.example
*.tsbuildinfo
.DS_Store
CLAUDE.md# {{PROJECT_NAME}}
## Tech Stack
- TypeScript (strict mode)
- pnpm
- ESLint (flat config)
- Prettier
## Commands
- `pnpm build` — Compile TypeScript
- `pnpm lint` — Run ESLint
- `pnpm format` — Format with Prettier
- `pnpm format:check` — Check formatting
- `pnpm typecheck` — Type-check without emitting
## Conventions
- Source code lives in `src/`
- Use ES modules (`"type": "module"`)
- Strict TypeScript — no `any`, no implicit returns
- Format with Prettier before committing
.github/workflows/ci.yml