crew-creator
crew-creator manages the four core employee definition files stored in the `.magic/` directory, enabling users to initialize, view, edit, and optimize employee configurations including identity, instructions, personality traits, and tool settings. Use this skill when setting up a new AI agent employee for the first time or when modifying existing employee prompt definitions and behavioral guidelines.
git clone --depth 1 https://github.com/dtyq/magic /tmp/crew-creator && cp -r /tmp/crew-creator/backend/super-magic/agents/skills/crew-creator ~/.claude/skills/crew-creatorSKILL.md
<!--zh
# Agent Prompt Manager(员工提示词管理器)
管理 `.magic/` 下的 4 个核心员工定义文件,帮助用户查看、编辑和优化员工的身份、指令、性格和工具配置。
当工作区尚无员工定义文件时,还负责引导用户完成首次初始化。
## 语言生成策略
系统会注入 `<user_preferred_language>` 表示用户偏好语言。生成员工文件时遵循:
**默认单语言模式**:以用户偏好语言生成所有内容,不使用 `<!--zh -->` 双语格式,YAML header 只用单语言字段。
**仅在用户明确要求多语言时**才启用双语模式。双语格式以用户偏好语言为主语言(非注释部分),辅助语言放在注释中。
## 员工初始化流程
当 `.magic/IDENTITY.md` 不存在时,说明工作区尚未创建员工,需要引导用户初始化。
### 检测条件
使用 `list_dir` 检查 `.magic/` 目录。若 `IDENTITY.md` 不存在,进入初始化流程。
### 信息采集(通过对话向用户提问)
按以下顺序向用户收集信息,每次可合并多个问题,但不要一次问太多。
**信息采集前,先确认用户偏好语言**:查看 `<user_preferred_language>`,以该语言与用户交流并采集信息。
**第一轮(必填信息)**:
1. **员工名称**:用用户偏好语言提问(如中文用户问"想给员工起什么名字?")
2. **员工角色/职能**:(如"这个员工主要承担什么角色?")
3. **一句话描述**:这个员工主要做什么?
**仅当用户明确要求多语言时**(如"需要中英文双语"),才额外询问对应的翻译。
**第二轮(推荐但可选)**:
4. **角色定义**:更详细地描述这个员工的能力、专长、工作方式(会写入 IDENTITY.md 正文)
5. **主要工作流程/规则**:这个员工应该遵循什么样的工作流程?有什么特殊规则?(会写入 AGENTS.md)
**第三轮(可选,用户可跳过)**:
6. **性格和沟通风格**:希望员工有什么样的性格?(如:严谨、活泼、简洁等)(会写入 SOUL.md)
若用户表示"先这样"、"后面再说"等跳过意图,立即使用已收集的信息进行初始化,无需强制收集所有字段。
### 生成文件
收集完信息后,将配置写入 JSON 文件,调用初始化脚本生成员工定义文件:
**单语言模式(默认)**:
```python
# 1. 将收集到的信息写入 JSON 配置(不需要 _cn 后缀字段)
write_file(
path=".crew_init_config.json",
content='{"name": "研究助手", "role": "学术研究员", "description": "专业的学术研究助手", "role_body": "你是一名学术研究员...", "instructions": "...", "personality": "..."}'
)
# 2. 调用初始化脚本
shell_exec(
command="python scripts/init_crew.py --config .workspace/.crew_init_config.json"
)
```
**仅当用户明确要求多语言时**,才补充辅助语言字段(如 `name_en`, `role_body_en` 等):
```python
write_file(
path=".crew_init_config.json",
content='{"name": "研究助手", "name_en": "Research Assistant", "role": "学术研究员", "role_en": "Academic Researcher", "description": "专业的学术研究助手", "description_en": "A professional research assistant", ...}'
)
```
脚本根据配置生成以下文件(TOOLS.md 和 SKILLS.md 不生成,系统使用默认值):
- `IDENTITY.md` — 始终生成(YAML header + 角色定义正文)
- `AGENTS.md` — 若提供了工作流指令则生成
- `SOUL.md` — 若提供了性格定义则生成
### 初始化后
1. 用 `read_files` 向用户展示生成的文件内容
2. 询问用户是否需要调整
3. 清理临时配置文件:`delete_files(path=".crew_init_config.json")`
4. 告知用户:未生成 TOOLS.md 和 SKILLS.md 表示使用系统默认配置,后续可随时通过员工管理来添加
-->
# Agent Prompt Manager
Manages the 4 core employee definition files under `.magic/`, helping users view, edit, and optimize their employee's identity, instructions, personality, and tool configuration.
Also handles first-time employee initialization when the workspace has no definition files.
## Language Generation Strategy
The system injects `<user_preferred_language>` indicating the user's preferred language. Follow these rules when generating employee files:
**Default single-language mode**: Generate all content in the user's preferred language, without `<!--zh -->` bilingual format. YAML header uses single-language fields only.
**Only enable bilingual mode when the user explicitly requests multiple languages**. In bilingual format, use the user's preferred language as primary (non-commented), with the auxiliary language in comments.
## Employee Initialization Flow
When `.magic/IDENTITY.md` does not exist, the workspace has no employee yet and you should guide the user through initialization.
### Detection
Use `list_dir` to check `.magic/`. If `IDENTITY.md` is missing, enter the initialization flow.
### Information Gathering (ask the user conversationally)
Collect information in rounds; you may combine questions but don't overwhelm the user.
**Before gathering, check user's preferred language**: Look at `<user_preferred_language>`. Communicate and collect information in that language.
**Round 1 (required)**:
1. **Employee name**: Ask in the user's preferred language (e.g., for English users: "What name would you like to give your employee?")
2. **Employee role**: (e.g., "What role will this employee take on?")
3. **One-line description**: What does this employee mainly do?
**Only ask for translations when the user explicitly requests multiple languages** (e.g., "need bilingual support", "要支持中英文").
**Round 2 (recommended but optional)**:
4. **Role definition**: A richer description of capabilities, expertise, and working style (goes into IDENTITY.md body)
5. **Workflow / rules**: What workflow should this employee follow? Any special rules? (goes into AGENTS.md)
**Round 3 (optional, user may skip)**:
6. **Personality and communication style**: What personality should the employee have? (e.g. rigorous, lively, concise) (goes into SOUL.md)
If the user signals intent to skip ("先这样", "later", etc.), proceed immediately with whatever has been collected.
### Generating Files
After collecting info, write a JSON config and call the init script:
**Single-language mode (default)**:
```python
# 1. Write collected info as JSON config (no _en suffix variants needed)
write_file(
path=".crew_init_config.json",
content='{"name": "Research Assistant", "role": "Academic Researcher", "description": "A professional research assistant", "role_body": "You are an academic researcher...", "instructions": "...", "personality": "..."}'
)
# 2. Call the init script
shell_exec(
command="python scripts/init_crew.py --config .workspace/.crew_init_config.json"
)
```
**Only when the user explicitly requests multiple languages**, supplement with auxiliary language fields (e.g., `name_cn`, `role_body_cn`, etc.):
```python
write_file(
path=".crew_init_config.json",
content='{"name": "Research Assistant", "name_cn": "研究助手", "role": "Academic Researcher", "role_cn": "学术研究员", "description": "A professional research assistant", "description_cn": "专业的学术研究助手", ...}'
)
```
The script generates files based on the config (TOOLS.md and SKILLS.md are intentionally not created — the system uses defaults):
- `IDENTITY.md` — always generated (YAML header + role definition body)
- `AGENTS.md` — generated if workflow instructions were provided
- `SOUL.md` — generated if personality was provided
### After Initialization
1. Show the generated files to the user via `read_files`
2. Ask if they want any adjustments
3. Clean up the temp config: `delete_files(pathCore canvas design skill covering project management, multimedia principles, AI image generation, web image search, and design marker processing. Load for any canvas design task. CRITICAL - When user message contains [@design_canvas_project:...] or [@design_marker:...] mentions, or when the user wants to generate video/animation/clip on a canvas project, you MUST load this skill first before any operations.
Summarize and compress the current conversation history into a structured context snapshot, then call compact_chat_history to save it. Read this skill only when the user explicitly asks to compact/summarize — system-triggered compaction injects the instructions directly without requiring a skill read.
Slide/PPT creation skill that provides complete slide creation, editing, and management capabilities. Use when users need to create slides, make presentations, edit slide content, or manage slide projects. CRITICAL - When user message contains [@slide_project:...] mention, you MUST load this skill first before any operations.
|
Data analysis dashboard (instrument panel) development skill. Use when users need to develop data dashboards, create/edit Dashboard projects, build large-screen data boards, or perform dashboard data cleaning. Includes dashboard project creation, card plan, data cleaning (data_cleaning.py), card management tools (create_dashboard_cards, update_dashboard_cards, delete_dashboard_cards, query_dashboard_cards), map download tool (download_dashboard_maps), dashboard development, and validation.
Use when the user wants to interact with DingTalk/钉钉 in any way — including but not limited to: reading, querying, searching, sending, replying to, forwarding, or recalling DingTalk/钉钉 chat messages and chat history; managing group chats and conversations; sending DING alerts; querying contacts, org structure, AI search, or coworkers; reading, searching, creating, or editing DingTalk/钉钉 docs, drive files, sheets, AI tables, wiki, mail, calendar events, meeting rooms, AI meeting minutes, attendance, OA approvals, todos, reports/logs, live sessions, AI apps, permissions, or open-platform docs.
Use when the user provides API keys, tokens, or other configuration values that should persist across sessions, or when the user asks to query, list, or delete saved environment variables. Manages personal env by default and workspace env only when explicitly requested.