feat: skills i18n 改造(schemaVersion 1.1,零向后兼容) (#1)

* feat: skills i18n 改造 — schemaVersion 1.1,零向后兼容

把 21 个 skills + 1 个 agent + manifest/categories 全量迁移到 schemaVersion 1.1
的 i18n 结构,配套 CI AI 翻译流水线(GitHub Models)与本地工具链。

## 关键变更

### 数据结构(破坏性,schemaVersion 1.0 → 1.1)
- SKILL.md: 顶层 name 改为 ASCII slug(== 目录名,符合 agentskills.io 规范);
  中文显示名/short_desc/description 全部迁入 metadata.i18n.<locale>
- agents/<id>/agent.json: shortDesc/fullDesc/tags/persona.{role,traits} 迁入
  i18n.<locale>;changelog[].changes 改为 { <locale>: string[] } 对象
- categories.json: 每个分类的 label/description 迁入 i18n.<locale>,顶层只剩
  color/icon
- manifest.json: 加 supportedLocales / defaultLocale;顶层 description 迁入
  i18n.<locale>

### Body 文件结构
- 根 SKILL.md = frontmatter + default_locale (en-US) body
- SKILL.<locale>.md = 各 locale 的 markdown body(首行 <!-- locale: xx --> 自校验)

### 工具链(scripts/i18n/)
- glossary.json: zh→en 术语表 + do_not_translate 白名单
- schema/skill-frontmatter.schema.json: i18n frontmatter JSON Schema
- validate-i18n.py: 8 条校验规则(name 合规 / locale 完整性 / hash 一致性等)
- translate.py: GitHub Models / Anthropic 双 backend,sha256 增量翻译
- migrate.py: 一次性迁移脚本(旧格式 → i18n 结构)

### CI(.github/workflows/)
- i18n-validate.yml: PR 触发跑 validate + translate --check
- i18n-translate.yml: PR 触发用 GitHub Models(默认 openai/gpt-5-mini)翻译缺失
  locale,自动追加 commit;可切到 ANTHROPIC_API_KEY 走 Claude

### 文档
- docs/I18N.md: 作者贡献指南(schema 说明 / 提交流程 / 常见问题)
- README.md: 加多语言段落

## 验证

- uv run scripts/i18n/validate-i18n.py: OK,49 文件 0 错误
- uv run scripts/i18n/translate.py --check: 0 stale locale
- 21 skills 标题数 zh-CN == en-US 严格对齐(最大 66=66)
- skills-ref 规范校验:全部通过(顶层 name ASCII slug + description 单字段)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(i18n): 修复 PR #1 review 反馈的 6 项问题

- schema: translated_by 正则放宽为 ^(human|ai:[A-Za-z0-9._:/-]+)$,接受
  'ai:github:openai/gpt-5-mini' 这类 backend:model 形式(CI 翻译输出格式)
- README + docs/I18N.md: 修正"CI 用 Claude API"误导描述,正确说明默认是
  GitHub Models(openai/gpt-5-mini)+ GITHUB_TOKEN,可选切到 Anthropic
- skills/minimax-tts/SKILL.md & SKILL.zh-CN.md: 删除多余的 ``` 闭合,避免
  Markdown 后续渲染错乱
- skills/docx/SKILL.md: 翻译时丢失的 • Unicode escape 示例已恢复,
  与 zh-CN 版本对齐

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-05 00:26:33 +08:00
committed by GitHub
parent 1c107a9344
commit 1f7c8b9673
59 changed files with 10533 additions and 2014 deletions

View File

@@ -1,5 +1,5 @@
---
name: 团队管理
name: manage-teams
description: 创建和管理 Agent 团队,组织多 Agent 协作。Use when 需要多个 Agent 围绕同一任务协作、需要建立组织架构、或需要组长统一调度分派任务时。
version: 1.2.3
type: procedural
@@ -13,6 +13,29 @@ tags:
metadata:
author: desirecore
updated_at: '2026-05-04'
i18n:
default_locale: en-US
source_locale: zh-CN
locales:
- zh-CN
- en-US
zh-CN:
name: 团队管理
short_desc: 创建团队、管理成员、组织多 Agent 协作
description: >-
创建和管理 Agent 团队,组织多 Agent 协作。Use when 需要多个 Agent 围绕同一任务协作、需要建立组织架构、或需要组长统一调度分派任务时。
body: ./SKILL.zh-CN.md
source_hash: sha256:2aad4d237ca4bc7a
translated_by: human
en-US:
name: Team Management
short_desc: Create teams, manage members, and organize multi-Agent collaboration
description: >-
Create and manage Agent teams to organize multi-Agent collaboration. Use when multiple Agents need to collaborate on the same task, when organizational structure is required, or when a team leader needs to orchestrate and dispatch tasks.
body: ./SKILL.md
source_hash: sha256:2aad4d237ca4bc7a
translated_by: ai:claude-opus-4-7
translated_at: '2026-05-03'
market:
icon: >-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0
@@ -31,73 +54,72 @@ market:
fill="#34C759"/><circle cx="17.5" cy="4" r="0.9" fill="#34C759"
fill-opacity="0.7"/><circle cx="21.5" cy="4" r="0.9" fill="#34C759"
fill-opacity="0.7"/></svg>
short_desc: 创建团队、管理成员、组织多 Agent 协作
category: productivity
---
# manage-teams 技能
# manage-teams Skill
## L0:一句话摘要
## L0: One-line Summary
创建和管理 Agent 团队,组织多 Agent 围绕共同任务协作。
Create and manage Agent teams to organize multiple Agents collaborating around a shared task.
## L1:概述与使用场景
## L1: Overview and Use Cases
### 能力描述
### Capability Description
manage-teams 是一个**流程型技能(Procedural Skill**,赋予 DesireCore 创建和管理 Agent 团队的能力。团队是多个 Agent 围绕共同任务协作的组织单元每个团队有一个组长supervisor负责接收需求、拆解任务、分派给成员、汇总结果。
manage-teams is a **Procedural Skill** that gives DesireCore the ability to create and manage Agent teams. A team is an organizational unit in which multiple Agents collaborate around a shared task; each team has a supervisor responsible for receiving requirements, decomposing tasks, dispatching work to members, and consolidating results.
### 使用场景
### Use Cases
- 需要多个 Agent 围绕同一任务持续协作(如项目组)
- 需要建立组织架构(部门/团队层级)
- 需要组长统一调度、拆解和分派任务
- 简单一次性委派不够,需要共享上下文的长期协作
- Multiple Agents need to collaborate continuously on the same task (e.g., a project group)
- An organizational hierarchy is required (departments / team levels)
- A supervisor is needed to centrally orchestrate, decompose, and dispatch tasks
- Simple one-off delegation is insufficient and long-term collaboration with shared context is required
### 核心价值
### Core Value
- **组织化协作**:从单点委派升级为团队协作模式
- **灵活管理**:支持临时团队和持久团队两种模式
- **动态调整**:运行时可添加/移除成员、更换组长
- **Organized collaboration**: upgrade from point-to-point delegation to a team collaboration model
- **Flexible management**: supports both ephemeral and persistent team modes
- **Dynamic adjustment**: members can be added/removed and supervisors swapped at runtime
## L2:详细规范
## L2: Detailed Specification
## 核心概念
## Core Concepts
### 团队 vs 单点委派
### Teams vs. Single-point Delegation
| 场景 | 推荐方式 | 理由 |
| Scenario | Recommended Approach | Rationale |
|------|---------|------|
| 一次性简单问题 | `Delegate(target, mode='sync')` | 无需组织开销 |
| 需要一个专家处理 | `Delegate(target, mode='sync/async')` | 一对一足够 |
| 需要多专家各出意见 | `Delegate(targets, mode='fan-out')` | 并行分派无需创建团队 |
| 持续协作 + 共享上下文 | **创建团队** | 团队提供共享 workdir 和组织架构 |
| 组织架构管理 | **创建嵌套团队** | 部门/团队层级关系 |
| One-off simple problem | `Delegate(target, mode='sync')` | No need for organizational overhead |
| Need a single expert to handle | `Delegate(target, mode='sync/async')` | One-to-one is sufficient |
| Need multiple experts to weigh in | `Delegate(targets, mode='fan-out')` | Parallel dispatch without creating a team |
| Continuous collaboration + shared context | **Create a team** | Teams provide a shared workdir and structure |
| Organizational hierarchy management | **Create nested teams** | Department / team hierarchy relationships |
### 团队类型
### Team Types
- **临时团队ephemeral**:任务驱动,完成后可解散。适合项目制协作。
- **持久团队persistent**:长期存在,适合部门/团队。临时团队可升级为持久团队。
- **Ephemeral team**: task-driven, can be disbanded after completion. Suitable for project-based collaboration.
- **Persistent team**: long-lived, suitable for departments / teams. Ephemeral teams can be promoted to persistent.
### 组长唯一性约束
### Supervisor Uniqueness Constraint
**一个 Agent 只能担任一个团队的组长TL** 这是组织架构的硬性约束:
**An Agent can only serve as the supervisor (TL) of a single team.** This is a hard constraint of the organizational structure:
- 创建团队时,如果调用者已是其他团队的组长,应先卸任原团队组长(`set_supervisor` 指定接替者)再创建新团队
- 不要将已担任组长的 Agent 设为另一个团队的组长
- 一个 Agent 可以同时是某团队的组长和另一个团队的普通成员,但不能同时担任两个团队的组长
- When creating a team, if the caller is already a supervisor of another team, they must first step down from the original team (use `set_supervisor` to designate a successor) before creating the new team
- Do not assign an Agent who already serves as supervisor to be the supervisor of another team
- An Agent can simultaneously be the supervisor of one team and a regular member of another, but cannot be supervisor of two teams at once
### 组长职责
### Supervisor Responsibilities
1. 接收用户需求,分析任务复杂度
2. 拆解子任务,决定需要哪些成员参与
3. 使用 `Delegate` 工具分派任务(单点或 fan-out
4. 汇总各成员结果,给出综合回答
5. 根据需要动态调整成员(添加/移除)
1. Receive user requirements and analyze task complexity
2. Decompose subtasks and decide which members are needed
3. Use the `Delegate` tool to dispatch tasks (single-point or fan-out)
4. Consolidate results from members and produce an integrated answer
5. Dynamically adjust members (add/remove) as needed
## 操作指南
## Operations Guide
### 创建团队
### Create a Team
```
ManageTeam({
@@ -108,11 +130,11 @@ ManageTeam({
})
```
组长默认为调用者(你自己)。创建后你就是这个团队的 supervisor。
The supervisor defaults to the caller (you). After creation, you are the supervisor of this team.
### 向团队成员分派任务
### Dispatch Tasks to Team Members
**单点委派**(一个成员处理):
**Single-point delegation** (one member handles it):
```
Delegate({
target: 'legal-advisor',
@@ -121,7 +143,7 @@ Delegate({
})
```
**扇出委派**(多个成员并行):
**Fan-out delegation** (multiple members in parallel):
```
Delegate({
targets: ['legal-advisor', 'finance-advisor', 'real-estate'],
@@ -131,7 +153,7 @@ Delegate({
})
```
### 管理成员
### Manage Members
```
// 添加成员
@@ -150,7 +172,7 @@ ManageTeam({ action: 'remove_members', teamId: '...', members: ['agent-a', 'agen
ManageTeam({ action: 'set_supervisor', teamId: '...', agentId: 'new-leader' })
```
### 团队生命周期
### Team Lifecycle
```
// 任务完成,解散临时团队
@@ -160,13 +182,13 @@ ManageTeam({ action: 'disband', teamId: '...' })
ManageTeam({ action: 'promote', teamId: '...' })
```
## 最佳实践
## Best Practices
1. **先评估再创建团队**:简单任务直接 Delegate不要过度组织
2. **成员精简**:只拉入真正需要的专家,避免信息过载
3. **优先团队内成员**:在团队中优先委派给团队内成员。如需团队外专家的一次性意见,可临时 Delegate 咨询而无需加入团队;若反复需要,则用 add_member 正式拉入
4. **明确任务描述**:分派时给出清晰的任务描述和背景信息
5. **及时汇总**:收到成员结果后及时汇总,不要让用户等待
6. **动态调整**:发现缺少某领域专家时,用 add_member 补充
7. **用完即散**:临时团队任务完成后及时解散,保持组织整洁
8. **组长唯一**:一个 Agent 只担任一个团队的组长,避免职责分散导致管理混乱
1. **Evaluate before creating a team**: simple tasks should be delegated directly without over-organizing
2. **Keep membership lean**: only bring in the experts truly needed to avoid information overload
3. **Prefer in-team members**: within a team, prefer delegating to its members. For one-off opinions from outside experts, ad-hoc `Delegate` consultation is fine without joining the team; if needed repeatedly, formally bring them in via `add_member`
4. **Clear task descriptions**: provide a clear task description and background information when dispatching
5. **Consolidate promptly**: synthesize member results promptly — do not keep the user waiting
6. **Adjust dynamically**: when missing a domain expert, supplement with `add_member`
7. **Disband after use**: disband ephemeral teams promptly when their task is done to keep the organization tidy
8. **One supervisor per Agent**: an Agent should only serve as supervisor of one team to avoid management chaos from divided responsibilities