Scaffold

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

RhythmMittal19 be07e81 1.1 KB Updated

File contents

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.

RhythmMittal19/claude-config/tree/main/skills/scaffold commit be07e810d8

Frequently asked questions

npx skillmds@latest add rhythmmittal19/scaffold