# Scaffold

> Generate boilerplate for components, pages, hooks, services, or tests matching project conventions.

- Skill: `rhythmmittal19/scaffold` (Agent Skill)
- Install (CLI): `npx skillmds@latest add rhythmmittal19/scaffold`
- Raw SKILL.md: https://api.skillmd.com/api/skills/rhythmmittal19/scaffold/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: RhythmMittal19 (https://skillmd.com/u/rhythmmittal19)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/rhythmmittal19/scaffold

---


## Project Context
!`basename $(pwd)`
!`ls src/ 2>/dev/null | head -15`
!`ls tsconfig.json vite.config.* next.config.* 2>/dev/null`

## Request
$ARGUMENTS

## Scaffold Rules

### React Component → `src/components/[Name]/`
- `[Name].tsx` — Component with typed props interface
- `[Name].test.tsx` — Basic test with render and key interactions
- `index.ts` — Barrel export

### Page/Route → `src/pages/` or `src/app/`
- Follow existing routing convention

### Custom Hook → `src/hooks/`
- `use[Name].ts` — Hook with TypeScript return type
- `use[Name].test.ts` — Test hook behavior

### Service → `src/services/`
- `[name].service.ts` — API calls with typed request/response
- `[name].service.test.ts` — Tests with mocked HTTP

### API Route → `src/routes/` or `src/controllers/`
- Route handler + input validation + service layer call + error handling

Before creating: check existing patterns. Match the project's style exactly.

