#What it does
The /scaffold skill generates boilerplate for new projects, features, and modules. It creates the full file structure -- source files, types, tests, configuration, and documentation -- following your project's existing conventions. Instead of copying from old code and removing the parts you do not need, scaffold gives you a clean starting point with everything wired up correctly.
#How to use
/scaffold feature user-notifications/scaffold api-route POST /api/v1/invoices/scaffold component DataTable --with-tests --with-stories/scaffold project next-app my-saas-dashboard#Scaffold types
#feature -- Full feature module
Creates the complete vertical slice: API route, service layer, repository, types, validation schema, and tests.
#api-route -- Single API endpoint
Creates route handler, request/response types, validation, error handling, and integration test.
#component -- React/UI component
Creates component file, types/props interface, test file, and optionally a Storybook story.
#project -- New project from template
Creates a full project with recommended directory structure, base configuration, linting, testing setup, and CI pipeline.
#module -- Standalone library module
Creates an isolated module with its own types, tests, barrel export, and README.
#Workflow
- Detect -- Read the existing project structure, identify conventions for file naming, directory layout, import patterns, and test organization
- Template -- Generate files that match the project's patterns exactly: same naming conventions, same export style, same test structure
- Wire -- Add barrel exports, route registrations, and navigation entries so the new code is connected to the existing application
- Stub -- Include placeholder implementations with
TODOcomments marking where custom logic goes - Verify -- Ensure the scaffolded code compiles and placeholder tests pass
#Example
> /scaffold feature billing
## Created 7 files:
src/features/billing/
billing.service.ts β Business logic with TODO stubs
billing.repository.ts β Database queries interface + implementation
billing.types.ts β Request/response types, domain models
billing.validation.ts β Zod schemas for input validation
billing.route.ts β API route handler wired to service
__tests__/
billing.service.test.ts β Unit tests with happy path stubs
billing.route.test.ts β Integration test with supertest
## Wired up:
+ Added export to src/features/index.ts
+ Registered route in src/app/api/billing/route.ts#Conventions
- Reads your
CLAUDE.md,tsconfig.json, and existing code to match conventions - Never overwrites existing files -- warns and skips if a file already exists
- Uses your project's preferred import style (relative vs. path aliases)
- Generates TypeScript strict-mode compatible code with no
anytypes