team-init
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese工程团队初始化
Engineering Team Initialization
通过交互式问答,收集项目信息并创建由 Lead 领导的 Agent 工程团队。
Collect project information through interactive Q&A and create an Agent engineering team led by a Lead role.
支持的团队类型
Supported Team Types
| # | 类型 | 领导角色 | 目录 | 适用场景 |
|---|---|---|---|---|
| 1 | 软件开发 | PM | dev | 全新项目开发、功能迭代 |
| 2 | 软件测试 | 测试经理 | testing | 系统测试、质量保障 |
| 3 | 逆向工程 | 逆向负责人 | reverse | 二进制分析、协议逆向、恶意软件分析 |
| 4 | 调试/Bug修复 | 调试负责人 | debug | 故障排查、性能问题定位 |
| 5 | 安全研究 | 安全负责人 | security | 漏洞挖掘、安全评估(需合法授权) |
| 6 | CTF 比赛 | 队长 | ctf | CTF 竞赛、安全挑战 |
| 7 | 运维 | 运维经理 | ops | 部署运维、基础设施管理 |
| 8 | 讨论/研讨 | 主持人 | discuss | 方案设计、技术选型、需求研讨、头脑风暴 |
各类型的详细角色列表见 。
references/role-catalog.md| # | Type | Lead Role | Directory | Applicable Scenarios |
|---|---|---|---|---|
| 1 | Software Development | PM | dev | New project development, feature iteration |
| 2 | Software Testing | Test Manager | testing | System testing, quality assurance |
| 3 | Reverse Engineering | Reverse Engineering Lead | reverse | Binary analysis, protocol reverse-engineering, malware analysis |
| 4 | Debugging/Bug Fixing | Debug Lead | debug | Troubleshooting, performance issue localization |
| 5 | Security Research | Security Lead | security | Vulnerability discovery, security assessment (requires legal authorization) |
| 6 | CTF Competition | Captain | ctf | CTF contests, security challenges |
| 7 | Operation & Maintenance | O&M Manager | ops | Deployment & O&M, infrastructure management |
| 8 | Discussion/Seminar | Moderator | discuss | Solution design, technology selection, requirement discussion, brainstorming |
Detailed role lists for each type can be found in .
references/role-catalog.md交互式问答流程
Interactive Q&A Process
按顺序使用 AskUserQuestion 工具向用户提问。
Use the AskUserQuestion tool to ask users in sequence.
问题 0: 团队类型
Question 0: Team Type
AskUserQuestion:
question: "请选择要创建的团队类型"
header: "团队类型"
options:
- label: "软件开发"
description: "全新项目开发、功能迭代"
- label: "软件测试"
description: "系统测试、质量保障"
- label: "逆向工程"
description: "二进制分析、协议逆向"
- label: "调试/Bug修复"
description: "故障排查、性能定位"
- label: "安全研究"
description: "漏洞挖掘、安全评估(需合法授权)"
- label: "CTF 比赛"
description: "CTF 竞赛、安全挑战"
- label: "运维"
description: "部署运维、基础设施管理"
- label: "讨论/研讨"
description: "方案设计、技术选型、需求研讨、头脑风暴"
multiSelect: false记录用户选择的 ,映射到对应目录名:
team_type- 软件开发 → dev
- 软件测试 → testing
- 逆向工程 → reverse
- 调试/Bug修复 → debug
- 安全研究 → security
- CTF 比赛 → ctf
- 运维 → ops
- 讨论/研讨 → discuss
AskUserQuestion:
question: "Please select the type of team to create"
header: "Team Type"
options:
- label: "Software Development"
description: "New project development, feature iteration"
- label: "Software Testing"
description: "System testing, quality assurance"
- label: "Reverse Engineering"
description: "Binary analysis, protocol reverse-engineering"
- label: "Debugging/Bug Fixing"
description: "Troubleshooting, performance localization"
- label: "Security Research"
description: "Vulnerability discovery, security assessment (requires legal authorization)"
- label: "CTF Competition"
description: "CTF contests, security challenges"
- label: "Operation & Maintenance"
description: "Deployment & O&M, infrastructure management"
- label: "Discussion/Seminar"
description: "Solution design, technology selection, requirement discussion, brainstorming"
multiSelect: falseRecord the user-selected and map it to the corresponding directory name:
team_type- Software Development → dev
- Software Testing → testing
- Reverse Engineering → reverse
- Debugging/Bug Fixing → debug
- Security Research → security
- CTF Competition → ctf
- Operation & Maintenance → ops
- Discussion/Seminar → discuss
问题 1: 项目名称
Question 1: Project Name
如果 非空,使用其作为项目名称,跳过此问题。
$ARGUMENTSAskUserQuestion:
question: "请输入项目名称(英文,用作 team name,如 my-webapp)"
header: "项目名称"
options:
- label: "my-project"
description: "使用默认名称"
- label: "输入自定义名称"
description: "在「其他」中输入"
multiSelect: falseIf is not empty, use it as the project name and skip this question.
$ARGUMENTSAskUserQuestion:
question: "Please enter the project name (in English, used as team name, e.g., my-webapp)"
header: "Project Name"
options:
- label: "my-project"
description: "Use default name"
- label: "Enter custom name"
description: "Input in 'Other'"
multiSelect: false问题 2: 项目描述
Question 2: Project Description
AskUserQuestion:
question: "{根据 team_type 调整措辞}"
header: "项目描述"
options: {根据 team_type 提供 2-4 个典型场景选项}
multiSelect: false措辞映射:
- dev: "请简要描述项目目标和范围"
- testing: "请描述被测系统和测试目标"
- reverse: "请描述逆向目标和分析目的"
- debug: "请描述需要调试的问题和症状"
- security: "请描述安全研究的目标和范围"
- ctf: "请描述比赛名称和赛制"
- ops: "请描述运维目标和基础设施概况"
- discuss: "请描述讨论议题和期望产出"
AskUserQuestion:
question: "{Adjust wording based on team_type}"
header: "Project Description"
options: {Provide 2-4 typical scenario options based on team_type}
multiSelect: falseWording mapping:
- dev: "Please briefly describe the project goals and scope"
- testing: "Please describe the system under test and testing goals"
- reverse: "Please describe the reverse-engineering target and analysis purpose"
- debug: "Please describe the issue to be debugged and its symptoms"
- security: "Please describe the goals and scope of the security research"
- ctf: "Please describe the competition name and format"
- ops: "Please describe the O&M goals and infrastructure overview"
- discuss: "Please describe the discussion topic and expected outcomes"
问题 3: 技术栈/目标平台
Question 3: Tech Stack/Target Platform
AskUserQuestion:
question: "{根据 team_type 调整措辞}"
header: "技术栈"
options: {根据 team_type 提供 2-4 个典型选项}
multiSelect: true措辞映射:
- dev: "项目使用什么技术栈?"
- testing: "被测系统的技术栈?"
- reverse: "目标平台和架构?(x86/ARM/MIPS, Windows/Linux/Android)"
- debug: "问题所在的技术栈和环境?"
- security: "研究目标的技术栈和平台?"
- ctf: "比赛偏好方向和工具?"
- ops: "基础设施技术栈?(Linux/K8s/AWS/Docker)"
- discuss: "讨论涉及哪些领域?(用于配置专家角色的专业背景)"
AskUserQuestion:
question: "{Adjust wording based on team_type}"
header: "Tech Stack"
options: {Provide 2-4 typical options based on team_type}
multiSelect: trueWording mapping:
- dev: "What tech stack does the project use?"
- testing: "What is the tech stack of the system under test?"
- reverse: "Target platform and architecture? (x86/ARM/MIPS, Windows/Linux/Android)"
- debug: "Tech stack and environment where the issue occurs?"
- security: "Tech stack and platform of the research target?"
- ctf: "Competition preference direction and tools?"
- ops: "Infrastructure tech stack? (Linux/K8s/AWS/Docker)"
- discuss: "Which fields does the discussion involve? (Used to configure professional backgrounds of expert roles)"
问题 4: 角色选择
Question 4: Role Selection
展示当前 team_type 的角色列表。Lead 角色自动包含,无需选择。
AskUserQuestion:
question: "选择需要的角色({lead_role} 默认包含)。多实例角色可在「其他」中用 'developer x2' 格式指定数量"
header: "团队角色"
multiSelect: true
options:
- label: "全部角色 (推荐)"
description: "包含该类型所有角色各 1 个"
- label: "核心团队"
description: "{该类型的核心角色子集}"
- label: "最小团队"
description: "{lead + 1-2 个核心角色}"
- label: "自定义"
description: "在「其他」中指定角色和数量"
multiSelect: false核心团队映射:
- dev: pm + architect + developer + tester
- testing: test-manager + test-architect + functional-tester + automation-tester
- reverse: re-lead + static-analyst + dynamic-analyst
- debug: debug-lead + root-cause-analyst + fix-engineer
- security: security-lead + vuln-hunter + security-auditor
- ctf: captain + web + pwn + reverse
- ops: ops-manager + sys-engineer + monitor-engineer
- discuss: moderator + domain-expert + critic + synthesizer
最小团队映射:
- dev: pm + developer
- testing: test-manager + functional-tester
- reverse: re-lead + static-analyst
- debug: debug-lead + fix-engineer
- security: security-lead + vuln-hunter
- ctf: captain + web
- ops: ops-manager + sys-engineer
- discuss: moderator + domain-expert
Display the role list for the current team_type. The Lead role is automatically included and does not need to be selected.
AskUserQuestion:
question: "Select required roles ({lead_role} is included by default). For multi-instance roles, specify the quantity in 'Other' using the format 'developer x2'"
header: "Team Roles"
multiSelect: true
options:
- label: "All Roles (Recommended)"
description: "Include one of each role in this type"
- label: "Core Team"
description: "{Core role subset for this type}"
- label: "Minimum Team"
description: "{lead + 1-2 core roles}"
- label: "Custom"
description: "Specify roles and quantities in 'Other'"
multiSelect: falseCore Team mapping:
- dev: pm + architect + developer + tester
- testing: test-manager + test-architect + functional-tester + automation-tester
- reverse: re-lead + static-analyst + dynamic-analyst
- debug: debug-lead + root-cause-analyst + fix-engineer
- security: security-lead + vuln-hunter + security-auditor
- ctf: captain + web + pwn + reverse
- ops: ops-manager + sys-engineer + monitor-engineer
- discuss: moderator + domain-expert + critic + synthesizer
Minimum Team mapping:
- dev: pm + developer
- testing: test-manager + functional-tester
- reverse: re-lead + static-analyst
- debug: debug-lead + fix-engineer
- security: security-lead + vuln-hunter
- ctf: captain + web
- ops: ops-manager + sys-engineer
- discuss: moderator + domain-expert
问题 4.5: 讨论轮次(仅 discuss 类型触发)
Question 4.5: Discussion Rounds (Triggered only for discuss type)
AskUserQuestion:
question: "每个议题的最大讨论轮次?"
header: "讨论轮次"
options:
- label: "3 轮(默认)"
- label: "5 轮"
- label: "自定义"
multiSelect: falsemax_rounds<project_context>AskUserQuestion:
question: "Maximum number of discussion rounds per topic?"
header: "Discussion Rounds"
options:
- label: "3 rounds (Default)"
- label: "5 rounds"
- label: "Custom"
multiSelect: falsemax_rounds<project_context>问题 5: 工作目录
Question 5: Working Directory
AskUserQuestion:
question: "项目工作目录在哪里?"
header: "工作目录"
options:
- label: "当前目录"
description: "使用当前工作目录"
- label: "指定路径"
description: "在「其他」中输入绝对路径"
multiSelect: falseAskUserQuestion:
question: "Where is the project working directory?"
header: "Working Directory"
options:
- label: "Current Directory"
description: "Use current working directory"
- label: "Specify Path"
description: "Input absolute path in 'Other'"
multiSelect: false确认步骤
Confirmation Step
输出汇总信息,然后确认:
团队配置汇总
--------------------
团队类型: {team_type_name}
项目名称: {project_name}
项目描述: {description}
技术栈: {tech_stack}
工作目录: {work_dir}
团队成员:
- {lead_role} x1 (Lead)
- {role_name} x{count}
...
预计创建 {N} 个 Agent
--------------------AskUserQuestion:
question: "确认以上配置并创建团队?"
header: "确认"
options:
- label: "确认创建"
description: "开始创建团队"
- label: "修改配置"
description: "重新开始问答"
- label: "取消"
description: "放弃创建"
multiSelect: falseOutput the summary information, then confirm:
Team Configuration Summary
--------------------
Team Type: {team_type_name}
Project Name: {project_name}
Project Description: {description}
Tech Stack: {tech_stack}
Working Directory: {work_dir}
Team Members:
- {lead_role} x1 (Lead)
- {role_name} x{count}
...
Estimated {N} Agents to be created
--------------------AskUserQuestion:
question: "Confirm the above configuration and create the team?"
header: "Confirmation"
options:
- label: "Confirm Creation"
description: "Start creating the team"
- label: "Modify Configuration"
description: "Restart the Q&A process"
- label: "Cancel"
description: "Abandon creation"
multiSelect: false团队创建流程
Team Creation Process
用户确认后,执行以下步骤。
After user confirmation, execute the following steps.
步骤 1: 创建团队
Step 1: Create Team
TeamCreate:
team_name: "{project_name}"
description: "{team_type_name} - {description}"TeamCreate:
team_name: "{project_name}"
description: "{team_type_name} - {description}"步骤 2: 读取角色定义和工作流
Step 2: Read Role Definitions and Workflows
角色定义路径:
工作流路径:
~/.claude/skills/team-init/references/{type_dir}/roles/{role_code}.md~/.claude/skills/team-init/references/{type_dir}/workflow.md注意: 以上路径以 skill 实际安装目录为准。使用 Read 工具时需要确认 skill 所在的实际路径。
对每个选中的角色,使用 Read 工具读取其角色定义文件。
同时读取该类型的 workflow.md。
Role definition path:
Workflow path:
~/.claude/skills/team-init/references/{type_dir}/roles/{role_code}.md~/.claude/skills/team-init/references/{type_dir}/workflow.mdNote: The above paths are based on the actual installation directory of the skill. Confirm the actual path of the skill when using the Read tool.
Use the Read tool to read the role definition file for each selected role.
Also read the workflow.md for this type.
步骤 3: 构建角色 Prompt
Step 3: Build Role Prompt
为每个成员组合 prompt:
你是「{project_name}」项目的{role_name}。
<project_context>
项目名称: {project_name}
团队类型: {team_type_name}
项目描述: {description}
技术栈: {tech_stack}
工作目录: {work_dir}
</project_context>
<team_members>
{列出所有成员的名称和角色}
</team_members>
<workflow>
{workflow.md 的内容}
</workflow>
<your_role>
{对应角色 .md 文件的完整内容}
</your_role>Combine the prompt for each member:
You are the {role_name} of the "{project_name}" project.
<project_context>
Project Name: {project_name}
Team Type: {team_type_name}
Project Description: {description}
Tech Stack: {tech_stack}
Working Directory: {work_dir}
</project_context>
<team_members>
{List all members' names and roles}
</team_members>
<workflow>
{Content of workflow.md}
</workflow>
<your_role>
{Full content of the corresponding role .md file}
</your_role>步骤 4: 创建初始任务
Step 4: Create Initial Tasks
使用 TaskCreate 根据 workflow.md 的阶段创建任务骨架。
设置阶段间的 blockedBy 依赖关系。
将第一个任务分配给 Lead 角色。
Use TaskCreate to create a task skeleton based on the phases in workflow.md.
Set blockedBy dependencies between phases.
Assign the first task to the Lead role.
步骤 5: 派生团队成员
Step 5: Derive Team Members
Lead 角色必须第一个创建。
Agent:
name: "{member_name}"
subagent_type: "general-purpose"
team_name: "{project_name}"
prompt: "{步骤 3 构建的 prompt}"
mode: "bypassPermissions"
description: "Team member: {role_name}"命名规则:
- 单实例角色: 直接使用代号 (pm, architect, captain 等)
- 多实例角色: 代号-序号 (developer-1, web-2 等)
创建顺序:先创建 Lead,再并行创建其他角色。
The Lead role must be created first.
Agent:
name: "{member_name}"
subagent_type: "general-purpose"
team_name: "{project_name}"
prompt: "{Prompt built in Step 3}"
mode: "bypassPermissions"
description: "Team member: {role_name}"Naming rules:
- Single-instance roles: Use the code directly (pm, architect, captain, etc.)
- Multi-instance roles: code-sequence number (developer-1, web-2, etc.)
Creation order: Create Lead first, then create other roles in parallel.
步骤 6: 保存团队配置到项目目录
Step 6: Save Team Configuration to Project Directory
将团队配置保存到项目工作目录下的 ,以便后续通过 复用。
.team-profiles/{project_name}.yaml/team-load使用 Write 工具创建文件:
yaml
undefinedSave the team configuration to in the project working directory for reuse via later.
.team-profiles/{project_name}.yaml/team-loadUse the Write tool to create the file:
yaml
undefined团队配置 - 由 /team-init 自动生成
Team Configuration - Automatically generated by /team-init
使用 /team-load {project_name} 可直接加载此配置创建团队
Use /team-load {project_name} to directly load this configuration to create a team
format: template
team_type: "{type_dir}" # dev/testing/reverse/debug/security/ctf/ops/discuss
team_type_name: "{team_type_name}" # 中文名称
description: "{description}"
tech_stack: "{tech_stack}"
work_dir: "{work_dir}"
roles:
Lead 角色(自动包含)
- role: "{lead_role_code}" count: 1 is_lead: true
其他角色
- role: "{role_code}" count: {N}
... 列出所有选中的角色及数量
保存后输出提示:团队配置已保存到: {work_dir}/.team-profiles/{project_name}.yaml
后续可使用 /team-load {project_name} 直接加载此团队配置。
undefinedformat: template
team_type: "{type_dir}" # dev/testing/reverse/debug/security/ctf/ops/discuss
team_type_name: "{team_type_name}" # English name
description: "{description}"
tech_stack: "{tech_stack}"
work_dir: "{work_dir}"
roles:
Lead role (automatically included)
- role: "{lead_role_code}" count: 1 is_lead: true
Other roles
- role: "{role_code}" count: {N}
... List all selected roles and their quantities
After saving, output the prompt:Team configuration saved to: {work_dir}/.team-profiles/{project_name}.yaml
You can directly load this team configuration using /team-load {project_name} later.
undefined步骤 7: 通知 Lead 启动
Step 7: Notify Lead to Start
SendMessage:
type: "message"
recipient: "{lead_name}"
content: |
团队已创建完成。
- 项目: {project_name}
- 描述: {description}
- 技术栈: {tech_stack}
- 工作目录: {work_dir}
- 团队成员: {member_list}
请开始第一阶段工作。
团队配置: ~/.claude/teams/{project_name}/config.json
工作流: ~/.claude/skills/team-init/references/{type_dir}/workflow.md
角色定义: ~/.claude/skills/team-init/references/{type_dir}/roles/
summary: "团队已创建,启动项目"SendMessage:
type: "message"
recipient: "{lead_name}"
content: |
Team creation completed.
- Project: {project_name}
- Description: {description}
- Tech Stack: {tech_stack}
- Working Directory: {work_dir}
- Team Members: {member_list}
Please start the first phase of work.
Team Configuration: ~/.claude/teams/{project_name}/config.json
Workflow: ~/.claude/skills/team-init/references/{type_dir}/workflow.md
Role Definitions: ~/.claude/skills/team-init/references/{type_dir}/roles/
summary: "Team created, start project"参考资源
Reference Resources
- - 各团队类型的完整角色列表
references/role-catalog.md - - 各角色详细定义
references/{type_dir}/roles/{role}.md - - 各团队类型的工作流定义
references/{type_dir}/workflow.md
- - Complete role lists for each team type
references/role-catalog.md - - Detailed definitions for each role
references/{type_dir}/roles/{role}.md - - Workflow definitions for each team type
references/{type_dir}/workflow.md