scaffold
Project scaffolding - generate boilerplate for common project types with best-practice defaults. Use for: scaffold, boilerplate, template, new project, init, create project, starter, setup, project structure, directory structure, monorepo, microservice, API template, web app template, CLI tool template, library template.
What this skill does
# Scaffold Project scaffolding templates and boilerplate generation for common project types with best-practice defaults. ## Project Type Decision Tree ``` What are you building? │ ├─ API / Backend Service │ ├─ REST API │ │ ├─ Python → FastAPI (async, OpenAPI auto-docs) │ │ ├─ Node.js → Express or Fastify (Fastify for performance) │ │ ├─ Go → Gin (ergonomic) or Echo (middleware-rich) │ │ └─ Rust → Axum (tower ecosystem, async-first) │ ├─ GraphQL API │ │ ├─ Python → Strawberry + FastAPI │ │ ├─ Node.js → Apollo Server or Pothos + Yoga │ │ ├─ Go → gqlgen (code-first) │ │ └─ Rust → async-graphql + Axum │ └─ gRPC Service │ ├─ Python → grpcio + protobuf │ ├─ Go → google.golang.org/grpc │ └─ Rust → tonic │ ├─ Web Application │ ├─ Full-stack with SSR │ │ ├─ React ecosystem → Next.js 14+ (App Router) │ │ ├─ Vue ecosystem → Nuxt 3 │ │ ├─ Svelte ecosystem → SvelteKit │ │ └─ Content-heavy / multi-framework → Astro │ ├─ SPA (client-only) │ │ ├─ React → Vite + React + React Router │ │ ├─ Vue → Vite + Vue + Vue Router │ │ └─ Svelte → Vite + Svelte + svelte-routing │ └─ Static Site │ ├─ Blog / docs → Astro or VitePress │ └─ Marketing / landing → Astro or Next.js (static export) │ ├─ CLI Tool │ ├─ Python → Typer (simple) or Click (complex) │ ├─ Node.js → Commander + Inquirer │ ├─ Go → Cobra + Viper │ └─ Rust → Clap (derive API) │ ├─ Library / Package │ ├─ npm package → TypeScript + tsup + Vitest │ ├─ PyPI package → uv + pyproject.toml + pytest │ ├─ Go module → go mod init + go test │ └─ Rust crate → cargo init --lib + cargo test │ └─ Monorepo ├─ JavaScript/TypeScript → Turborepo + pnpm workspaces ├─ Full-stack JS → Nx ├─ Go → Go workspaces (go.work) ├─ Rust → Cargo workspaces └─ Python → uv workspaces or hatch ``` ## Stack Selection Matrix | Project Type | Language | Framework | Database | ORM/Query | Deploy Target | |-------------|----------|-----------|----------|-----------|---------------| | REST API | Python | FastAPI | PostgreSQL | SQLAlchemy + Alembic | Docker / AWS ECS | | REST API | Node.js | Fastify | PostgreSQL | Prisma or Drizzle | Docker / Vercel | | REST API | Go | Gin | PostgreSQL | sqlx (raw) or GORM | Docker / Fly.io | | REST API | Rust | Axum | PostgreSQL | sqlx | Docker / Fly.io | | Web App | TypeScript | Next.js 14+ | PostgreSQL | Prisma or Drizzle | Vercel / Docker | | Web App | TypeScript | Nuxt 3 | PostgreSQL | Prisma | Vercel / Netlify | | Web App | TypeScript | Astro | SQLite / none | Drizzle | Cloudflare / Netlify | | CLI Tool | Python | Typer | SQLite | sqlite3 stdlib | PyPI | | CLI Tool | Go | Cobra | SQLite / BoltDB | sqlx | GitHub Releases | | CLI Tool | Rust | Clap | SQLite | rusqlite | crates.io | | Library | TypeScript | tsup | n/a | n/a | npm | | Library | Python | hatch/uv | n/a | n/a | PyPI | ## Quick Scaffold Commands ### Python (API) ```bash # FastAPI with uv mkdir my-api && cd my-api uv init --python 3.12 uv add fastapi uvicorn sqlalchemy alembic psycopg2-binary pydantic-settings uv add --dev pytest pytest-asyncio httpx ruff mypy ``` ### Node.js (Web App) ```bash # Next.js 14+ npx create-next-app@latest my-app --typescript --tailwind --eslint --app --src-dir --import-alias "@/*" # Vite + React npm create vite@latest my-app -- --template react-ts ``` ### Go (API) ```bash mkdir my-api && cd my-api go mod init github.com/user/my-api go get github.com/gin-gonic/gin go get github.com/jmoiron/sqlx go get github.com/lib/pq ``` ### Rust (CLI) ```bash cargo init my-cli cd my-cli cargo add clap --features derive cargo add serde --features derive cargo add anyhow tokio --features tokio/full ``` ### Monorepo (Turborepo) ```bash npx create-turbo@latest my-monorepo # Or manual: mkdir my-monorepo && cd my-monorepo npm init -y npm install turbo --save-dev mkdir -p apps/web apps/api packages/shared ``` ## API Project Template ### Directory Structure (FastAPI Example) ``` my-api/ ├── src/ │ └── my_api/ │ ├── __init__.py │ ├── main.py # FastAPI app, lifespan, middleware │ ├── config.py # pydantic-settings configuration │ ├── database.py # SQLAlchemy engine, session │ ├── dependencies.py # Shared FastAPI dependencies │ ├── routers/ │ │ ├── __init__.py │ │ ├── health.py # Health check endpoint │ │ └── users.py # User CRUD endpoints │ ├── models/ │ │ ├── __init__.py │ │ └── user.py # SQLAlchemy models │ ├── schemas/ │ │ ├── __init__.py │ │ └── user.py # Pydantic request/response schemas │ └── services/ │ ├── __init__.py │ └── user.py # Business logic ├── alembic/ │ ├── alembic.ini │ ├── env.py │ └── versions/ ├── tests/ │ ├── conftest.py # Fixtures: test DB, client, factories │ ├── test_health.py │ └── test_users.py ├── pyproject.toml ├── Dockerfile ├── docker-compose.yml ├── .env.example ├── .gitignore └── .dockerignore ``` ### Directory Structure (Express/Fastify Example) ``` my-api/ ├── src/ │ ├── index.ts # Entry point, server startup │ ├── app.ts # Express/Fastify app setup │ ├── config.ts # Environment config with zod validation │ ├── database.ts # Prisma client or Drizzle config │ ├── middleware/ │ │ ├── auth.ts │ │ ├── error-handler.ts │ │ └── request-logger.ts │ ├── routes/ │ │ ├── health.ts │ │ └── users.ts │ ├── services/ │ │ └── user.service.ts │ └── types/ │ └── index.ts ├── prisma/ │ └── schema.prisma ├── tests/ │ ├── setup.ts │ └── routes/ │ └── users.test.ts ├── package.json ├── tsconfig.json ├── Dockerfile ├── docker-compose.yml ├── .env.example └── .gitignore ``` ## Web App Project Template ### Directory Structure (Next.js App Router) ``` my-app/ ├── src/ │ ├── app/ │ │ ├── layout.tsx # Root layout │ │ ├── page.tsx # Home page │ │ ├── loading.tsx # Global loading UI │ │ ├── error.tsx # Global error boundary │ │ ├── not-found.tsx # 404 page │ │ ├── globals.css # Global styles + Tailwind │ │ ├── (auth)/ │ │ │ ├── login/page.tsx │ │ │ └── register/page.tsx │ │ ├── dashboard/ │ │ │ ├── layout.tsx │ │ │ └── page.tsx │ │ └── api/ │ │ └── health/route.ts │ ├── components/ │ │ ├── ui/ # Reusable primitives │ │ └── features/ # Feature-specific components │ ├── lib/ │ │ ├── db.ts # Database client │ │ ├── auth.ts # Auth helpers │ │ └── utils.ts # Shared utilities │ └── types/ │ └── index.ts ├── public/ │ └── favicon.ico ├── tests/ │ ├── setup.ts │ └── components/ ├── next.config.ts ├── tailwind.config.ts ├── tsconfig.json ├── package.json ├── .env.local.example └── .gitignore ``` ## CLI Tool Project Template ### Directory Structure (Python / Typer) ``` my-cli/ ├── src/ │ └── my_cli/ │ ├── __init__.py │ ├── __main__.py # python -m my_cli entry │ ├── cli.py # Typer app, command groups │ ├── commands/ │ │ ├── __init__.py │ │ ├── init.py # my-cli init │ │ └── run.py # my-cli run │ ├── config.py # Config file loading (TOML/YAML) │ └── utils.py ├── tests/ │ ├── conftest.py │ └── test_commands.py ├── pyproject.toml # [project.scripts] entry point ├── .gitignore └── README.md ``` ### Directory Structure (Go / Cobra) ``` my-cli/ ├── cmd/ │ ├── root.go # Root command, global flags │ ├── init.go # my-cli init │ └── run.go # my-cli run ├── internal/ │ ├── config/ │ │ └── config.go # Viper config loading │ └── runner/ │ └── runner.go # Core lo
Related in Web Dev
generating-lwc-components
IncludedLightning Web Components with PICKLES methodology and 165-point scoring. Use this skill when the user creates or edits LWC components, builds wire service patterns, or writes Jest tests for LWC. TRIGGER when: user creates/edits LWC components, touches lwc/**/*.js, .html, .css, .js-meta.xml files, or asks about wire service, SLDS, or Jest LWC tests. DO NOT TRIGGER when: Apex classes (use generating-apex), Aura components, or Visualforce.
tanstack-query
IncludedManage server state in React with TanStack Query v5. Set up queries with useQuery, mutations with useMutation, configure QueryClient caching strategies, implement optimistic updates, and handle infinite scroll with useInfiniteQuery. Use when: setting up data fetching in React projects, migrating from v4 to v5, or fixing object syntax required errors, query callbacks removed issues, cacheTime renamed to gcTime, isPending vs isLoading confusion, keepPreviousData removed problems.
document-processor-api
IncludedProcess documents with Nutrient DWS. Use when the user wants to generate PDFs from HTML or URLs, convert Office/images/PDFs, assemble or split packets, OCR scans, extract text/tables/key-value pairs, redact PII, watermark, sign, fill forms, optimize PDFs, or produce compliance outputs like PDF/A or PDF/UA. Triggers include convert to PDF, merge these PDFs, OCR this scan, extract tables, redact PII, sign this PDF, make this PDF/A, or linearize for web delivery.
nutrient-document-processing
IncludedProcess documents with Nutrient DWS. Use when the user wants to generate PDFs from HTML or URLs, convert Office/images/PDFs, assemble or split packets, OCR scans, extract text/tables/key-value pairs, redact PII, watermark, sign, fill forms, optimize PDFs, or produce compliance outputs like PDF/A or PDF/UA. Triggers include convert to PDF, merge these PDFs, OCR this scan, extract tables, redact PII, sign this PDF, make this PDF/A, or linearize for web delivery.
tanstack-query
IncludedManage server state in React with TanStack Query v5. Covers useMutationState, simplified optimistic updates, throwOnError, network mode (offline/PWA), and infiniteQueryOptions. Use when setting up data fetching, fixing v4→v5 migration errors (object syntax, gcTime, isPending, keepPreviousData), or debugging SSR/hydration issues with streaming server components.
accelint-nextjs-best-practices
IncludedNext.js performance optimization and best practices. Use when writing Next.js code (App Router or Pages Router); implementing Server Components, Server Actions, or API routes; optimizing RSC serialization, data fetching, or server-side rendering; reviewing Next.js code for performance issues; fixing authentication in Server Actions; or implementing Suspense boundaries, parallel data fetching, or request deduplication.