From scaffold-project
Scaffold a new TypeScript + pnpm project with opinionated defaults
How this skill is triggered — by the user, by Claude, or both
Slash command
/scaffold-project:scaffold-projectThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
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.ymlname: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm lint
- run: pnpm typecheck
- run: pnpm build
Run pnpm install in the project directory.
Run the following commands in the project directory:
git init
git add .
git commit -m "Initial project setup
Scaffolded with pia:scaffold-project:
- TypeScript (strict)
- ESLint (flat config)
- Prettier
- GitHub Actions CI"
Output a summary to the user:
Project "{{PROJECT_NAME}}" created at {{TARGET_DIR}}.
Files created:
- package.json
- tsconfig.json
- eslint.config.js
- .prettierrc
- src/index.ts
- .gitignore
- CLAUDE.md
- .github/workflows/ci.yml
Next steps:
cd {{TARGET_DIR}}
pnpm build
npx claudepluginhub matthiasrossbach/pia-marketplace --plugin scaffold-projectGenerates production-ready TypeScript project structures for Node.js and frontend apps using pnpm, Vite, Next.js, with type safety and testing setup.
Scaffolds projects with directory structures, configs, dependencies, linting, testing, CI/CD basics, and docs for frontend, backend, mobile, CLI, libraries, and monorepos.
Create project, component, or boilerplate scaffolds. Use when starting a new project, module, or component, generating boilerplate, or stamping a repeatable file structure.