К основному содержанию
команда CX Codex

scaffold — команда для Claude Code: каркас проекта и установка

Команда scaffold генерирует каркас проекта или отдельного компонента: исходники, конфиги, тесты и документацию. Фреймворк и набор фич задаются флагами.

MIT ★ 788 обновлён 2026-07-03

Установить в Claude Code · Вручную: положить файлы Все способы и платформы ↓
.claude/commands/scaffold.md
Открыть на GitHub

Что делает scaffold

Команда собирает каркас: исходники, конфиги сборки и линтеров, тестовую обвязку, заготовки документации. Первые два аргумента обязательны: <type> и <name>. Дальше идут необязательные флаги --framework, --features, --output-dir и --template.

Перед генерацией команда через инструмент Task зовёт субагента @systems-architect, чтобы тот предложил структуру и стек. Шаблоны на выбор: Minimal, Standard, Enterprise, Monorepo. Когда файлы записаны, за них берутся скиллы code-reviewer, test-generator, api-documenter и readme-updater.

--output-dir по умолчанию указывает на текущую директорию, поэтому запуск из корня репозитория разложит файлы прямо рядом с существующим кодом. А без <type> и <name> команда не стартует — оба аргумента обязательные.

Какие задачи решает

  • поднять каркас React-компонента с хуками и тестами
  • собрать структуру FastAPI-сервиса с Docker и OpenAPI
  • сгенерировать CLI на Go с подкомандами и упаковкой
  • добавить ESLint, Prettier и pre-commit хуки в существующий репозиторий
  • разложить монорепозиторий по пакетам с общим тулингом

Примеры запросов агенту

  • /scaffold component UserCard --framework react --features hooks,tests
  • /scaffold service billing-api --framework fastapi --features docker,auth --output-dir services
  • Сгенерируй каркас CLI deployctl по шаблону Standard с тестами

Как установить scaffold

Вручную: положить файлы

.claude/commands/scaffold.md

Вызов — /scaffold. Для всех проектов — ~/.claude/commands/

Вопросы о scaffold

Как установить scaffold в Claude Code?

Положите файл команды в проект по пути .claude/commands/scaffold.md. После этого она вызывается как /scaffold.

Что делает scaffold?

Создаёт рабочий каркас проекта или компонента: исходный код, конфиги сборки и линтеров, тесты, заготовки документации и настройку деплоя.

Что нужно указать при вызове?

Тип и имя, они обязательны. Флаги --framework, --features, --output-dir и --template можно не указывать.

Исходный текст

scaffold.md · MIT
---
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
```typescript
// 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
```javascript
// 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
```python
// 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
// 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
```yaml
# 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
```yaml
# Production-ready auth:
- JWT token management
- Role-based access control
- Rate limiting and validation
- Security headers and CORS
- Environment variable management
```

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

### Code Quality Tools
```yaml
# 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 secret management

## Output Structure

Generate complete projects including:

1. **Source Code**: Production-ready implementation with best practices
2. **Configuration**: Build tools, linters, formatters, and CI/CD setup
3. **Tests**: Comprehensive test suites with high coverage
4. **Documentation**: Setup guides, API docs, and architecture documentation
5. **Deployment**: Docker, CI/CD, and deployment configuration

## Template System

### Built-in Templates
- **Minimal**: Basic structure with essential features
- **Standard**: Common patterns with testing and tooling
- **Enterprise**: Full-featured with monitoring, analytics, and security
- **Monorepo**: Multi-package workspace with shared tooling

### Customization Options
- **Styling**: CSS-in-JS, CSS Modules, Tailwind CSS, Sass
- **State Management**: Redux, Zustand, Context API, MobX
- **Database**: PostgreSQL, MongoDB, SQLite, Prisma, TypeORM
- **Deployment**: Vercel, Netlify, AWS, Docker, Kubernetes

Focus on generating maintainable, scalable, and well-documented code that follows industry best practices and can be easily extended by development teams.

© alirezarezvani · MIT · alirezarezvani/claude-code-tresor

Похожие слэш-команды

Все слэш-команды по теме «Настройка агента: память, контекст, субагенты» →
rapid-prototyper rohitg00 Плагин rapid-prototyper для Claude Code создаёт минимальную структуру проекта одной командой. Запускается, когда нужно за несколько секунд развернуть макет приложения с основными папками и файлами. ★ 2 858звёзд репо drizzle-sqlite-scaffold pproenca Скилл drizzle-sqlite-scaffold генерирует готовый boilerplate для Drizzle ORM + SQLite: конфиг, клиент с прагмами, схемы таблиц, CRUD-модули и валидаторы. Срабатывает на фразы вроде «добавь таблицу для X» или «настрой БД». CX Codex +1 149установок code-generation-template aj-geddes Скилл code-generation-template для Claude Code и ещё пяти сред: собирает код из шаблонов, скаффолдинг и типы из схем. Работает на генерации компонентов, CRUD-операций и API-клиентов. CX Codex +1 539установок svelte-scaffold davila7 Команда svelte-scaffold для Claude Code создаёт каркас проекта, модуля или библиотеки компонентов на SvelteKit. Запускается по запросу подготовить новую структуру или добавить функцию. CX Codex +1 127установок scaffold-project Thientan Soparat Скилл scaffold-project для Claude Code разворачивает каркас дизайн-проекта с дизайн-токенами, правилами и структурой папок. Запускается вручную разработчиком при старте нового интерфейсного продукта. CX Codex +1 ★ 3 216звёзд репо web-dev rohitg00 Плагин web-dev для Claude Code автоматизирует создание полнофункциональных веб-приложений: генерирует структуру проекта, компоненты и страницы с одной команды. ★ 2 858звёзд репо

Из того же набора27

Весь набор →
api-documenter Скилл api-documenter для Claude Code собирает спецификации API по коду и комментариям. Формирует документацию при изменении маршрутов или подготовке OpenAPI-документа. CX Codex +1 ★ 788звёзд репо readme-updater Скилл readme-updater обновляет README автоматически, когда меняется структура проекта, добавляются зависимости или новые фичи. CX Codex +1 ★ 788звёзд репо test-generator Скилл test-generator генерирует базовые заготовки тестов для новых функций и React-компонентов под популярные тест-раннеры. CX Codex +1 ★ 788звёзд репо docs-gen Команда docs-gen анализирует кодовую базу и собирает API-документацию, руководства и справочные материалы. Подходит для генерации сайта документации и автодеплоя. CX Codex +1 ★ 788звёзд репо code-reviewer Скилл code-reviewer для Claude Code автоматически проверяет качество, стиль и типовые уязвимости при сохранении файлов или перед коммитом. CX Codex +1 ★ 788звёзд репо git-commit-helper Скилл git-commit-helper анализирует staged diff и предлагает сообщение коммита в формате Conventional Commits. Пригодится перед созданием коммита или когда сложно сформулировать его описание. CX Codex +1 ★ 788звёзд репо config-safety-reviewer Субагент config-safety-reviewer проверяет конфиги на захардкоженные значения, неверные таймауты и лимиты пулов; его включают перед изменениями конфигурации. CX Codex ★ 788звёзд репо agent Промпт agent превращает ассистента в инженера промптов. Он помогает проектировать цепочки рассуждений, выстраивать защиту от инъекций и оптимизировать шаблоны под Claude или GPT-4. GP ChatGPT ★ 788звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой