Loading...
Loading...
Compare original and translation side by side
| Order | Skill | Purpose | Required |
|---|---|---|---|
| 1 | | AI documentation & standards | Yes |
| 2 | | ESLint + Prettier + pre-commit | Yes |
| 3 | | Test coverage enforcement | Optional |
| 4 | | Backend/Frontend/Mobile scaffolding | Optional |
| 顺序 | 技能 | 用途 | 是否必需 |
|---|---|---|---|
| 1 | | AI文档与规范制定 | 是 |
| 2 | | ESLint + Prettier + 提交前检查 | 是 |
| 3 | | 测试覆盖管控 | 可选 |
| 4 | | 后端/前端/移动端脚手架搭建 | 可选 |
┌─────────────────────────────────────────────────────────────┐
│ PROJECT INIT ORCHESTRATOR │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ PHASE 1: GATHER CONTEXT │
│ • Project name and path │
│ • Tech stack (Next.js, NestJS, Expo, Plasmo) │
│ • Package manager preference (bun, pnpm, npm) │
│ • Test coverage threshold (default: 80%) │
│ • Additional scaffolding needs │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ PHASE 2: AGENT FOLDER INIT │
│ • Create .agents/ directory structure │
│ • Set up SESSIONS/, TASKS/, SYSTEM/ folders │
│ • Generate coding standards and rules │
│ • Copy agent configs (.claude/, .codex/, .cursor/) │
│ ──────────────────────────────────────────────────────────│
│ Invocation: │
│ python3 ~/.claude/skills/agent-folder-init/ │
│ agent-folder-init/scripts/scaffold.py │
│ --root /path/to/project │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ PHASE 3: LINTER FORMATTER INIT │
│ • Detect project tech stack │
│ • Install ESLint + Prettier (or Biome) │
│ • Configure framework-specific rules │
│ • Set up lint-staged for pre-commit │
│ • Create .vscode/settings.json │
│ ──────────────────────────────────────────────────────────│
│ Invocation: │
│ Use linter-formatter-init skill guidance │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ PHASE 4: HUSKY TEST COVERAGE (if tests exist) │
│ • Detect test runner (Jest, Vitest, Mocha) │
│ • Configure coverage thresholds │
│ • Add pre-commit hook for test coverage │
│ ──────────────────────────────────────────────────────────│
│ Invocation: │
│ Use husky-test-coverage skill guidance │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ PHASE 5: PROJECT SCAFFOLD (optional) │
│ • Scaffold additional components if requested: │
│ - Backend (NestJS) │
│ - Frontend (Next.js) │
│ - Mobile (Expo) │
│ - Extension (Plasmo) │
│ ──────────────────────────────────────────────────────────│
│ Invocation: │
│ python3 ~/.claude/skills/project-scaffold/ │
│ project-scaffold/scripts/scaffold.py │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ PHASE 6: VERIFICATION │
│ • Verify all configurations created │
│ • Run lint check (should pass) │
│ • Confirm git hooks installed │
│ • Generate setup summary │
└─────────────────────────────────────────────────────────────┘┌─────────────────────────────────────────────────────────────┐
│ 项目初始化编排器 │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ 阶段1:收集上下文信息 │
│ • 项目名称与路径 │
│ • 技术栈(Next.js、NestJS、Expo、Plasmo) │
│ • 包管理器偏好(bun、pnpm、npm) │
│ • 测试覆盖阈值(默认:80%) │
│ • 额外的脚手架需求 │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ 阶段2:Agent文件夹初始化 │
│ • 创建.agents/目录结构 │
│ • 搭建SESSIONS/、TASKS/、SYSTEM/文件夹 │
│ • 生成编码规范与规则 │
│ • 复制Agent配置文件(.claude/、.codex/、.cursor/) │
│ ──────────────────────────────────────────────────────────│
│ 调用方式: │
│ python3 ~/.claude/skills/agent-folder-init/ │
│ agent-folder-init/scripts/scaffold.py │
│ --root /path/to/project │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ 阶段3:代码检查与格式化工具初始化 │
│ • 检测项目技术栈 │
│ • 安装ESLint + Prettier(或Biome) │
│ • 配置框架专属规则 │
│ • 搭建lint-staged用于提交前检查 │
│ • 创建.vscode/settings.json │
│ ──────────────────────────────────────────────────────────│
│ 调用方式: │
│ 遵循linter-formatter-init技能指引 │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ 阶段4:Husky测试覆盖(若存在测试) │
│ • 检测测试运行器(Jest、Vitest、Mocha) │
│ • 配置覆盖阈值 │
│ • 添加测试覆盖的提交前钩子 │
│ ──────────────────────────────────────────────────────────│
│ 调用方式: │
│ 遵循husky-test-coverage技能指引 │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ 阶段5:项目脚手架搭建(可选) │
│ • 若有需求,搭建额外组件: │
│ - 后端(NestJS) │
│ - 前端(Next.js) │
│ - 移动端(Expo) │
│ - 浏览器扩展(Plasmo) │
│ ──────────────────────────────────────────────────────────│
│ 调用方式: │
│ python3 ~/.claude/skills/project-scaffold/ │
│ project-scaffold/scripts/scaffold.py │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ 阶段6:验证环节 │
│ • 验证所有配置文件已创建 │
│ • 运行代码检查(应通过) │
│ • 确认Git钩子已安装 │
│ • 生成搭建总结 │
└─────────────────────────────────────────────────────────────┘1. Ask for project context:
- Project path (default: current directory)
- Tech stack (Next.js, NestJS, Node.js, etc.)
- Package manager (bun, pnpm, npm)
- Test coverage threshold (default: 80%)
- Need additional scaffolding? (backend, frontend, mobile, extension)
2. Execute phases in order:
Phase 2 → Phase 3 → Phase 4 → Phase 5 (if needed) → Phase 61. 询问项目上下文信息:
- 项目路径(默认:当前目录)
- 技术栈(Next.js、NestJS、Node.js等)
- 包管理器(bun、pnpm、npm)
- 测试覆盖阈值(默认:80%)
- 是否需要额外脚手架?(后端、前端、移动端、浏览器扩展)
2. 按顺序执行各阶段:
阶段2 → 阶段3 → 阶段4 → 阶段5(若需要)→ 阶段6python3 ~/.claude/skills/agent-folder-init/agent-folder-init/scripts/scaffold.py --root /path/to/projectlinter-formatter-inithusky-test-coveragepython3 ~/.claude/skills/project-scaffold/project-scaffold/scripts/scaffold.pypython3 ~/.claude/skills/agent-folder-init/agent-folder-init/scripts/scaffold.py --root /path/to/projectlinter-formatter-inithusky-test-coveragepython3 ~/.claude/skills/project-scaffold/project-scaffold/scripts/scaffold.pyPhases: 2, 3
Output:
├── .agents/
├── .eslintrc.js
├── .prettierrc
├── .husky/pre-commit (lint-staged)
└── .vscode/settings.json执行阶段:2、3
输出结构:
├── .agents/
├── .eslintrc.js
├── .prettierrc
├── .husky/pre-commit(lint-staged)
└── .vscode/settings.jsonPhases: 2, 3, 4
Output:
├── .agents/
├── .eslintrc.js
├── .prettierrc
├── .husky/pre-commit (lint-staged + tests)
├── jest.config.js (coverage thresholds)
└── .vscode/settings.json执行阶段:2、3、4
输出结构:
├── .agents/
├── .eslintrc.js
├── .prettierrc
├── .husky/pre-commit(lint-staged + 测试)
├── jest.config.js(覆盖阈值)
└── .vscode/settings.jsonPhases: 2, 3, 4, 5
Output:
├── .agents/
├── apps/
│ ├── web/ (Next.js)
│ ├── api/ (NestJS)
│ ├── mobile/ (Expo)
│ └── extension/ (Plasmo)
├── packages/
│ └── shared/
├── .eslintrc.js
├── .prettierrc
├── .husky/pre-commit
└── .vscode/settings.json执行阶段:2、3、4、5
输出结构:
├── .agents/
├── apps/
│ ├── web/ (Next.js)
│ ├── api/ (NestJS)
│ ├── mobile/ (Expo)
│ └── extension/ (Plasmo)
├── packages/
│ └── shared/
├── .eslintrc.js
├── .prettierrc
├── .husky/pre-commit
└── .vscode/settings.jsonproject-root/
├── .agents/ # AI-first documentation
│ ├── SESSIONS/ # Daily session logs
│ ├── TASKS/ # Task tracking
│ │ └── INBOX.md
│ ├── SYSTEM/ # Architecture docs
│ │ ├── ARCHITECTURE.md
│ │ └── RULES.md
│ └── README.md
│
├── .claude/ # Claude Code configs
│ ├── commands/
│ ├── rules/
│ └── skills/
│
├── .husky/ # Git hooks
│ └── pre-commit # Runs lint-staged + tests
│
├── .vscode/ # Editor settings
│ └── settings.json # Format on save
│
├── .eslintrc.js # ESLint configuration
├── .prettierrc # Prettier configuration
├── .lintstagedrc # Lint-staged configuration
│
└── [app directories if scaffolded]project-root/
├── .agents/ # AI优先的文档目录
│ ├── SESSIONS/ # 日常会话日志
│ ├── TASKS/ # 任务追踪
│ │ └── INBOX.md
│ ├── SYSTEM/ # 架构文档
│ │ ├── ARCHITECTURE.md
│ │ └── RULES.md
│ └── README.md
│
├── .claude/ # Claude Code配置目录
│ ├── commands/
│ ├── rules/
│ └── skills/
│
├── .husky/ # Git钩子目录
│ └── pre-commit # 执行lint-staged + 测试
│
├── .vscode/ # 编辑器设置
│ └── settings.json # 保存时自动格式化
│
├── .eslintrc.js # ESLint配置文件
├── .prettierrc # Prettier配置文件
├── .lintstagedrc # Lint-staged配置文件
│
└── [若搭建脚手架则包含应用目录].agents/npm run lintbun lintnpm run formatbun format.agents/npm run lintbun lintnpm run formatbun formatI'll initialize your project with full AI-first infrastructure.
Let me gather some context:
1. Tech stack: [Next.js / NestJS / Node.js / Other]
2. Package manager: [bun / pnpm / npm]
3. Test coverage threshold: [80% default]
4. Need scaffolding? [backend / frontend / mobile / extension]
[After user responds]
Starting orchestration...
✓ Phase 2: Agent Folder Init
- Created .agents/ with 13 files
- Copied agent configs (.claude/, .codex/, .cursor/)
✓ Phase 3: Linter Formatter Init
- Detected: Next.js + TypeScript
- Installed: eslint, prettier, lint-staged
- Created: .eslintrc.js, .prettierrc, .lintstagedrc
✓ Phase 4: Husky Test Coverage
- Detected: Jest
- Set threshold: 80%
- Added pre-commit hook
✓ Phase 6: Verification
- All configs created ✓
- Lint check passed ✓
- Git hooks installed ✓
Project initialized successfully!我将为你初始化具备全AI优先开发基础设施的项目。
请提供以下上下文信息:
1. 技术栈:[Next.js / NestJS / Node.js / 其他]
2. 包管理器:[bun / pnpm / npm]
3. 测试覆盖阈值:[默认80%]
4. 是否需要脚手架?[后端 / 前端 / 移动端 / 浏览器扩展]
[用户回复后]
开始编排...
✓ 阶段2:Agent文件夹初始化
- 创建了包含13个文件的.agents/目录
- 复制了Agent配置文件(.claude/、.codex/、.cursor/)
✓ 阶段3:代码检查与格式化工具初始化
- 检测到:Next.js + TypeScript
- 已安装:eslint、prettier、lint-staged
- 已创建:.eslintrc.js、.prettierrc、.lintstagedrc
✓ 阶段4:Husky测试覆盖
- 检测到:Jest
- 设置阈值:80%
- 已添加提交前钩子
✓ 阶段6:验证环节
- 所有配置文件已创建 ✓
- 代码检查通过 ✓
- Git钩子已安装 ✓
项目初始化成功!nodepython3nodepython3npm run lint:fix.eslintrc.jsnpm run lint:fix.eslintrc.jsnpx husky install.husky/pre-commitpreparenpx husky install.husky/pre-commitprepare