init-project — команда для Claude Code: старт нового проекта
Разворачивает структуру нового проекта: каталоги, git, линтеры, тесты и CI. Пригодится, когда нужно начать с чистого листа без ручной возни.
npx claude-code-templates@latest --command project-management/init-projectЧто делает init-project
Команда принимает тип проекта и фреймворк: [project-type] [framework] или флаг вроде --react, --vue, --api, --cli. Без аргументов она смотрит на текущий каталог и спрашивает, что вы собираете. Дальше создаёт src/, tests/, docs/, инициализирует git с подходящим .gitignore и пишет README.
Под каждый стек свой набор: для React — TypeScript, Vite или Next.js, ESLint и Prettier; для Vue — Vue 3 с Vite; для API — Express.js или FastAPI с Pydantic; для CLI — Node.js с commander.js. Добавляются тесты (Jest, Vitest, Pytest), сборка с горячей перезагрузкой, GitHub Actions, Dependabot и проверка зависимостей через npm audit. В конце команда прогоняет установку, сборку и тесты, чтобы убедиться, что всё завелось, и делает первый коммит.
Инструменты ограничены: Read, Write, Edit, Bash, Glob. Ничего не запустится без Node.js и пакетного менеджера — команда ставит зависимости через npm, yarn или pnpm. Если в проекте уже есть свои конфиги, генерация поверх них перезапишет файлы, так что на существующем репозитории это повод сначала сделать ветку.
Какие задачи решает
- развернуть скелет проекта с нуля
- настроить TypeScript, ESLint и Prettier за один проход
- подключить тесты и отчёты о покрытии
- собрать CI на GitHub Actions с автопроверкой зависимостей
- создать README и CONTRIBUTING с инструкциями
Примеры запросов агенту
- /init-project --react
- /init-project api fastapi
- /init-project --cli
Как установить init-project
1Через claude-code-templates
npx claude-code-templates@latest --command project-management/init-project2Вручную: положить файлы
.claude/commands/init-project.mdВызов — /init-project. Для всех проектов — ~/.claude/commands/
Вручную: положить файлы
~/.codex/prompts/init-project.mdВызов — /prompts:init-project. В Codex этот формат помечен устаревшим, замена — скиллы
Вручную: положить файлы
.github/prompts/init-project.prompt.mdВручную: положить файлы
.gemini/commands/init-project.tomlGemini хранит команды в TOML: текст запроса — в поле prompt
Вопросы о init-project
Как установить init-project в Claude?
Через шаблоны: npx claude-code-templates@latest --command project-management/init-project. После этого файл команды лежит в .claude/commands/init-project.md.
Что делает init-project?
Создаёт структуру каталогов, git-репозиторий, конфиги фреймворка, тесты, сборку и CI для нового проекта, а затем проверяет, что установка, сборка и тесты проходят.
Какие фреймворки поддерживаются?
React, Vue, Angular, Express, FastAPI, React Native, Electron, Node.js CLI и NPM-библиотеки — набор задаётся аргументом или флагом.
Исходный текст
init-project.md · MIT
---
allowed-tools: Read, Write, Edit, Bash, Glob
argument-hint: "[project-type] [framework] | --react | --vue | --api | --cli"
description: Initialize new project with essential structure, configuration, and development environment setup
---
# Initialize New Project
Initialize new project with essential structure: **$ARGUMENTS**
## Instructions
1. **Project Analysis and Setup**
- Parse the project type and framework from arguments: `$ARGUMENTS`
- If no arguments provided, analyze current directory and ask user for project type and framework
- Create project directory structure if needed
- Validate that the chosen framework is appropriate for the project type
2. **Base Project Structure**
- Create essential directories (src/, tests/, docs/, etc.)
- Initialize git repository with proper .gitignore for the project type
- Create README.md with project description and setup instructions
- Set up proper file structure based on project type and framework
3. **Framework-Specific Configuration**
- **Web/React**: Set up React with TypeScript, Vite/Next.js, ESLint, Prettier
- **Web/Vue**: Configure Vue 3 with TypeScript, Vite, ESLint, Prettier
- **Web/Angular**: Set up Angular CLI project with TypeScript and testing
- **API/Express**: Create Express.js server with TypeScript, middleware, and routing
- **API/FastAPI**: Set up FastAPI with Python, Pydantic models, and async support
- **Mobile/React Native**: Configure React Native with navigation and development tools
- **Desktop/Electron**: Set up Electron with renderer and main process structure
- **CLI/Node**: Create Node.js CLI with commander.js and proper packaging
- **Library/NPM**: Set up library with TypeScript, rollup/webpack, and publishing config
4. **Development Environment Setup**
- Configure package manager (npm, yarn, pnpm) with proper package.json
- Set up TypeScript configuration with strict mode and path mapping
- Configure linting with ESLint and language-specific rules
- Set up code formatting with Prettier and pre-commit hooks
- Add EditorConfig for consistent coding standards
5. **Testing Infrastructure**
- Install and configure testing framework (Jest, Vitest, Pytest, etc.)
- Set up test directory structure and example tests
- Configure code coverage reporting
- Add testing scripts to package.json/makefile
6. **Build and Development Tools**
- Configure build system (Vite, webpack, rollup, etc.)
- Set up development server with hot reloading
- Configure environment variable management
- Add build optimization and bundling
7. **CI/CD Pipeline**
- Create GitHub Actions workflow for testing and deployment
- Set up automated testing on pull requests
- Configure automated dependency updates with Dependabot
- Add status badges to README
8. **Documentation and Quality**
- Generate comprehensive README with installation and usage instructions
- Create CONTRIBUTING.md with development guidelines
- Set up API documentation generation (JSDoc, Sphinx, etc.)
- Add code quality badges and shields
9. **Security and Best Practices**
- Configure security scanning with npm audit or similar
- Set up dependency vulnerability checking
- Add security headers for web applications
- Configure environment-specific security settings
10. **Project Validation**
- Verify all dependencies install correctly
- Run initial build to ensure configuration is working
- Execute test suite to validate testing setup
- Check linting and formatting rules are applied
- Validate that development server starts successfully
- Create initial commit with proper project structure
© davila7 · MIT · davila7/claude-code-templates