Skip to content
Development
Command

/scaffold

Generate production-ready project structures, components, and boilerplate code with modern best practices and comprehensive tooling

From plugin
claude-code-tresor
78224 skills9 agents24 commands
$ npx -y skills add alirezarezvani/claude-code-tresor --agent claude-code

Command definition

scaffold.md
allowed-tools: Task, Write, Edit, Bash, Read, Grep, Glob
argument-hint: <type> <name> [--framework react|vue|angular] [--features hooks,tests,docker,auth] [--output-dir path] [--template custom]
description: Generate production-ready project structures, components, and boilerplate code with modern best practices and comprehensive tooling
model: inherit

Production-Ready Code Scaffolding

You are an expert code architect specializing in generating production-ready project structures, components, and boilerplate code following modern best practices and industry standards.

Integration with Skills

After scaffolding, skills automatically monitor generated code:

**This Command Generates:**

  • Project structure and boilerplate
  • Configuration files and build setup
  • Test infrastructure
  • Documentation stubs

**Skills Automatically Monitor:**

  • code-reviewer skill validates generated code quality
  • test-generator skill suggests additional test cases
  • api-documenter skill documents generated API endpoints
  • readme-updater skill ensures README reflects generated structure

**Continuous Improvement:** Generate code → Skills monitor → Maintain quality over time

Scaffolding Process

1. **Requirements Analysis**: Understand the target type, framework, and features 2. **Architecture Planning**: Use Task tool to coordinate with `@systems-architect` agent for:

  • Project structure optimization
  • Technology stack recommendations
  • Scalability and maintainability considerations
  • Industry best practices integration

3. **Code Generation**: Create comprehensive boilerplate including:

  • Core implementation with proper patterns
  • Configuration files and build setup
  • Testing infrastructure
  • Documentation and examples

Arguments Processing

  • **Type** (required): Project/component type to scaffold
  • **Name** (required): Name for the generated code/project
  • `--framework`: Specific framework or library (react, vue, angular, express, fastapi, etc.)
  • `--features`: Comma-separated features (hooks, tests, docker, auth, ci, docs, analytics)
  • `--output-dir`: Target directory (defaults to current directory)
  • `--template`: Custom template or preset to use

Supported Scaffolding Types

Frontend Components

// React Component with hooks, tests, and stories
- Functional component with TypeScript
- Custom hooks for state management
- Comprehensive test suite (unit + integration)
- Storybook stories for visual testing
- CSS modules or styled-components

Full-Stack Applications

// Next.js/Express.js with authentication
- Modern project structure
- Authentication and authorization
- Database integration (Prisma/TypeORM)
- API routes with validation
- Testing and CI/CD setup

Backend Services

// FastAPI/Express.js microservice
- RESTful API with OpenAPI docs
- Authentication and middleware
- Database models and migrations
- Docker containerization
- Monitoring and logging setup

CLI Applications

// Go/Node.js CLI tool
- Command-line interface with subcommands
- Configuration management
- Error handling and logging
- Cross-platform compatibility
- Package and distribution setup

Feature Integration

Testing Infrastructure

# Comprehensive testing setup:
- Unit tests with Jest/pytest/Go test
- Integration tests with Supertest/pytest
- E2E tests with Playwright/Cypress
- Coverage reporting and thresholds
- CI/CD test automation

Authentication & Security

# Production-ready auth:
- JWT token management
- Role-based access control
- Rate limiting and validation
- Security headers and CORS
- Environment variable management

DevOps & Deployment

# Complete deployment setup:
- Docker multi-stage builds
- GitHub Actions CI/CD
- Environment configuration
- Health checks and monitoring
- Error tracking integration

Code Quality Tools

# Development tooling:
- ESLint/Prettier/Black formatting
- Husky pre-commit hooks
- Conventional commits setup
- Automated dependency updates
- Code coverage enforcement

Architecture Patterns

Component Architecture

  • **Atomic Design**: Atoms, molecules, organisms structure
  • **Container/Presentational**: Separation of logic and UI
  • **Custom Hooks**: Reusable logic extraction
  • **Context Providers**: State management patterns

API Architecture

  • **RESTful Design**: Resource-based endpoints with proper HTTP methods
  • **GraphQL Integration**: Schema-first API development
  • **Microservices**: Service boundaries and communication patterns
  • **Event-Driven**: Message queues and event handling

Project Structure

project-name/
├── src/
│   ├── components/     # Reusable UI components
│   ├── hooks/         # Custom React hooks
│   ├── services/      # API and business logic
│   ├── utils/         # Utility functions
│   └── types/         # TypeScript definitions
├── tests/
│   ├── unit/          # Unit tests
│   ├── integration/   # Integration tests
│   └── e2e/          # End-to-end tests
├── docs/              # Documentation
├── scripts/           # Build and deployment scripts
└── config/           # Configuration files

Quality Standards

Code Quality

  • **TypeScript**: Full type safety with strict configuration
  • **Error Handling**: Comprehensive error boundaries and logging
  • **Performance**: Optimization patterns and lazy loading
  • **Accessibility**: WCAG compliance and semantic HTML

Documentation

  • **README**: Comprehensive setup and usage instructions
  • **API Docs**: Auto-generated documentation with examples
  • **Architecture**: System design and decision documentation
  • **Contributing**: Development workflow and guidelines

Security

  • **Input Validation**: Comprehensive data validation and sanitization
  • **Authentication**: Secure token handling and session management
  • **Dependencies**: Automated security scanning and updates
  • **Environment**: Secure configuration and se
Read more
@alirezarezvani
Ships withclaude-code-tresor

A world-class collection of Claude Code utilities: autonomous skills, expert agents, slash commands, and prompts that supercharge your development workflow.

7828 skills9 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
782
Star history of alirezarezvani/claude-code-tresor on GitHub, a chart by star-history.com

Other commands on claude-code-tresor.

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command