A Claude Code slash command for generating project scaffolding following existing patterns.
# Clone to your preferred location
git clone git@github.com:claude-commands/command-scaffold.git <clone-path>/command-scaffold
# Symlink (use full path to cloned repo)
ln -s <clone-path>/command-scaffold/scaffold.md ~/.claude/commands/scaffold.md/scaffold component Button # React/Vue component
/scaffold api users # API endpoint with CRUD
/scaffold model User # Database model
/scaffold service payment # Service class
/scaffold hook useAuth # Custom hook
/scaffold test auth # Test file
- Detects project framework and patterns
- Finds existing similar files
- Generates files following conventions
- Creates tests automatically
- Updates exports and routes
| Type | Creates |
|---|---|
| component | Component with styles and tests |
| api | Route handler with CRUD operations |
| model | Database model/entity |
| service | Service class |
| hook | React custom hook |
| test | Test file |
| middleware | Express middleware |
| schema | Validation schema |
# Scaffolding Complete
## Created Files
| File | Type |
|------|------|
| src/components/Button/Button.tsx | Component |
| src/components/Button/Button.test.tsx | Test |
| src/components/Button/index.ts | Export |
## Updated Files
- src/components/index.ts (added export)| Framework | Scaffolds |
|---|---|
| React | Components, hooks, context |
| Express | Routes, middleware, services |
| Prisma/TypeORM | Models, migrations |
| Jest/Vitest | Test files |
- Git repository with source code
- Claude Code with Opus 4.5 model access
cd <clone-path>/command-scaffold && git pull