project-scaffold
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseProject Scaffold
项目脚手架
Unified project scaffolder for creating new projects or adding components to existing ones.
用于创建新项目或向现有项目添加组件的统一项目脚手架工具。
Purpose
用途
This skill provides a unified way to scaffold:
- folder structure for AI-first development
.agents/ - Backend (NestJS) with MongoDB, Swagger, and best practices
- Frontend (NextJS) with Tailwind and @agenticindiedev/ui
- Mobile (Expo) with React Native and Expo Router
- Browser Extension (Plasmo) with React and Tailwind
此技能提供统一的方式来搭建:
- 面向AI优先开发的文件夹结构
.agents/ - 集成MongoDB、Swagger及最佳实践的后端(NestJS)
- 集成Tailwind和@agenticindiedev/ui的前端(NextJS)
- 集成React Native和Expo Router的移动端(Expo)
- 集成React和Tailwind的浏览器扩展(Plasmo)
When to Use
适用场景
Use this skill when:
- Starting a new project from scratch
- Adding components to an existing project
- Setting up a monorepo or separate repositories
- Need a unified scaffolding experience across Claude, Codex, and Cursor
在以下场景中使用此技能:
- 从零开始创建新项目
- 向现有项目添加组件
- 配置单仓库(monorepo)或独立仓库
- 需要在Claude、Codex和Cursor中获得统一的脚手架体验
Usage
使用方法
Interactive Mode (Recommended)
交互式模式(推荐)
bash
python3 ~/.claude/skills/project-scaffold/scripts/scaffold.pyThe script will ask you:
- Project name
- Project root path
- Repository structure (monorepo vs separate)
- Components to scaffold (all optional):
- .agent folder
- Backend (NestJS)
- Frontend (NextJS)
- Mobile (Expo)
- Extension (Plasmo)
- Organization name (for monorepo packages)
bash
python3 ~/.claude/skills/project-scaffold/scripts/scaffold.py脚本会询问以下信息:
- 项目名称
- 项目根路径
- 仓库结构(单仓库/独立仓库)
- 要搭建的组件(均为可选):
- .agent文件夹
- 后端(NestJS)
- 前端(NextJS)
- 移动端(Expo)
- 扩展(Plasmo)
- 组织名称(用于单仓库包)
From Claude
通过Claude使用
When user requests scaffolding, activate this skill and run:
bash
python3 ~/.claude/skills/project-scaffold/scripts/scaffold.pyThe script handles all interactive prompts.
当用户请求搭建项目时,激活此技能并运行:
bash
python3 ~/.claude/skills/project-scaffold/scripts/scaffold.py脚本会处理所有交互式提示。
Features
功能特性
Flexible Structure
灵活的结构
- Monorepo: All components in one repository with workspace configuration
- Separate repos: Each component in its own directory/repository
- Existing projects: Can add components to existing projects
- 单仓库(Monorepo): 所有组件位于同一仓库,包含工作区配置
- 独立仓库: 每个组件位于单独的目录/仓库中
- 现有项目: 可向现有项目添加组件
Component Options
组件选项
All components are optional - scaffold only what you need:
- folder with full AI documentation structure
.agents/ - Backend with NestJS, MongoDB, Swagger
- Frontend with NextJS 15, Tailwind, @agenticindiedev/ui
- Mobile with Expo Router, React Native
- Extension with Plasmo, React, Tailwind
所有组件均为可选 - 仅搭建你需要的部分:
- 包含完整AI文档结构的文件夹
.agents/ - 基于NestJS、MongoDB、Swagger的后端
- 基于NextJS 15、Tailwind、@agenticindiedev/ui的前端
- 基于Expo Router、React Native的移动端
- 基于Plasmo、React、Tailwind的扩展
Cross-Platform
跨平台支持
Works from:
- Claude Code
- Codex
- Cursor
可在以下环境中使用:
- Claude Code
- Codex
- Cursor
Generated Structure
生成的结构
Monorepo Example
单仓库示例
myproject/
├── .agents/ # AI documentation
├── package.json # Workspace root
├── api/ # NestJS backend
│ ├── .agents/
│ ├── apps/api/src/
│ └── package.json
├── frontend/ # NextJS apps
│ ├── .agents/
│ ├── apps/dashboard/
│ └── package.json
├── mobile/ # Expo app
│ ├── .agents/
│ ├── app/
│ └── package.json
└── extension/ # Plasmo extension
├── .agents/
├── src/
└── package.jsonmyproject/
├── .agents/ # AI documentation
├── package.json # Workspace root
├── api/ # NestJS backend
│ ├── .agents/
│ ├── apps/api/src/
│ └── package.json
├── frontend/ # NextJS apps
│ ├── .agents/
│ ├── apps/dashboard/
│ └── package.json
├── mobile/ # Expo app
│ ├── .agents/
│ ├── app/
│ └── package.json
└── extension/ # Plasmo extension
├── .agents/
├── src/
└── package.jsonSeparate Repos Example
独立仓库示例
myproject-api/ # Backend only
├── .agents/
├── apps/api/src/
└── package.json
myproject-frontend/ # Frontend only
├── .agents/
├── apps/dashboard/
└── package.jsonmyproject-api/ # Backend only
├── .agents/
├── apps/api/src/
└── package.json
myproject-frontend/ # Frontend only
├── .agents/
├── apps/dashboard/
└── package.jsonKey Patterns Included
包含的核心模式
Backend (NestJS)
后端(NestJS)
- Soft deletes:
isDeleted: boolean - Multi-tenancy: Always filter by
organization - Collection pattern: controllers → services → schemas
- Swagger documentation
- Dockerfile included
- 软删除:
isDeleted: boolean - 多租户:始终按过滤
organization - 集合模式:控制器→服务→数据模型
- Swagger文档
- 包含Dockerfile
Frontend (NextJS)
前端(NextJS)
- Path aliases: ,
@components/,@services/@hooks/ - Tailwind CSS with @agenticindiedev/ui
- TypeScript strict mode
- App Router structure
- 路径别名:、
@components/、@services/@hooks/ - 集成@agenticindiedev/ui的Tailwind CSS
- TypeScript严格模式
- App Router结构
Mobile (Expo)
移动端(Expo)
- Expo Router for navigation
- TypeScript configuration
- Platform-specific configurations
- 使用Expo Router进行导航
- TypeScript配置
- 平台专属配置
Extension (Plasmo)
浏览器扩展(Plasmo)
- React + TypeScript
- Tailwind CSS with @agenticindiedev/ui
- Manifest configuration
- Popup component
- React + TypeScript
- 集成@agenticindiedev/ui的Tailwind CSS
- 清单配置
- 弹窗组件
Next Steps After Scaffolding
搭建后的后续步骤
-
Install dependencies:bash
cd [project-root] bun install -
Start development:bash
# Monorepo bun run dev:api bun run dev:frontend # Separate repos cd api && bun run start:dev cd frontend && bun run dev -
Customize:
- Update with your coding standards
.agents/SYSTEM/RULES.md - Configure environment variables
- Add your first features
- Update
-
安装依赖:bash
cd [project-root] bun install -
启动开发环境:bash
# Monorepo bun run dev:api bun run dev:frontend # Separate repos cd api && bun run start:dev cd frontend && bun run dev -
自定义配置:
- 在中更新你的编码规范
.agents/SYSTEM/RULES.md - 配置环境变量
- 添加你的首个功能
- 在
Integration with Existing Skills
与现有技能的集成
This skill integrates with:
- : Uses its script for .agent folder scaffolding
agent-folder-init - : Reuses component templates and patterns
fullstack-workspace-init
此技能可与以下技能集成:
- :使用其脚本搭建.agent文件夹
agent-folder-init - :复用组件模板和模式
fullstack-workspace-init
Troubleshooting
故障排除
Script not found: Ensure the skill is installed in
~/.claude/skills/project-scaffold/Permission denied: Make script executable:
chmod +x ~/.claude/skills/project-scaffold/scripts/scaffold.pyPython not found: Ensure Python 3 is installed and in PATH
Agent folder not created: The script tries to use skill. If not found, it will skip .agent folder creation.
agent-folder-init脚本未找到:确保技能已安装在目录中
~/.claude/skills/project-scaffold/权限不足:将脚本设置为可执行:
chmod +x ~/.claude/skills/project-scaffold/scripts/scaffold.py未找到Python:确保已安装Python 3并添加到系统PATH中
未创建Agent文件夹:脚本会尝试使用技能。若未找到该技能,将跳过.agent文件夹的创建。
agent-folder-init