agent-leader

Agent Leader skill for complex task decomposition and coordination. Automatically used when a request is a complex, full‑stack, or cross‑service change, or involves two or more distinct professional workflows (e.g., architecture, frontend, backend, security, testing, review, migration, data, release). Breaks work into specialized agents with dependency awareness, requires structured handoffs, and permits execution only after verifiable agent context, cache, and teardown states.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "agent-leader" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-d4f0ce7c29927446b1fada2c1cf5f9fc4cbe2eb2af9753f20c0bef7ed3c072f7. Verify the upstream source and version against https://skillhub.cn/skills/user_9c50a897/agent-leader before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Agent Leader skill for complex task decomposition and coordination. Automatically used when a request is a complex, full‑stack, or cross‑service change, or involves two or more distinct professional workflows (e.g., architecture, frontend, backend, security, testing, review, migration, data, release). Breaks work into specialized agents with dependency awareness, requires structured handoffs, and permits execution only after verifiable agent context, cache, and teardown states.

0 Downloads

Introduction source: third_party · user_9c50a897 · 1.0.1 Reference

SkillPi interpretation

Tasks
Not specified in the source documentation.
Audience
Not specified in the source documentation.
Inputs and outputs
Translation pending; see source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: agent-leader
description: >-
  This skill should automatically be used when a request is a complex task, a full-stack task, a cross-service change, or any objective that spans two or more independent professional workstreams such as architecture, frontend, backend, security, testing, review, migration, data, or release. It decomposes the work into dependency-aware specialist agents, requires structured handoffs, and permits real execution only when per-agent context, cache, and agent destruction can be verified.
agent_created: true

agent-leader —— 复杂任务的动态专业 Agent 编排

自动触发与不触发

自动使用本 Skill,无需用户写固定命令,当请求满足任一条件:

  1. 是全栈任务,涉及前端、后端、接口、数据、测试、审查或发布中的两项及以上;
  2. 是复杂工程任务,存在独立专业分支、跨服务依赖、迁移、并发、安全或回滚风险;
  3. 是复杂知识工作,必须由不同专业视角分别研究、分析、验证或交付;
  4. 用户明确要求拆任务、安排多个 Agent、并行推进、代码审核工作流或发布门禁。

不使用:单一问答、单文件小改、只有一种专业能力且没有独立下游产物的任务。此类任务直接单路径完成。

用户也可以显式触发:

使用 agent-leader:<目标与已知约束>

详细输入

将缺失字段列为 待确认,不得自行补造。

输入组 必填内容 例子
目标 业务目标、成功定义、最终交付物 “完成支付回调改造,交付实现、测试、审查和发布方案”
范围 代码/文档/服务/模块、允许与禁止修改范围 仓库模块、接口、数据库对象、只读材料
约束 技术栈、兼容性、安全、性能、合规、时限 Node API、迁移可回滚、不得记录敏感信息
验收 功能、测试、质量、审查、发布条件 幂等、测试通过、无 P0、回滚路径可执行
风险 已知故障、并发、数据、权限、依赖、外部系统风险 重复回调、超卖、第三方限流
执行授权 是否可创建任务、写文件、调用外部服务、启动真实 Agent 未明确时只做 plan-only
生命周期能力 destroy/context-free/cache-clear/终态查询是否真实可用 未确认时必须 blocked

总 SOP:从分析到完成交付

Phase 1 — 分析任务

  1. 提取目标、范围、交付物、约束、验收和风险。
  2. 识别是否存在两个以上独立专业分支,或是否为全栈/跨服务/高风险任务。
  3. 识别每个潜在分支的独立输入、独立产物、专业知识、依赖和下游消费者。
  4. 若没有独立分支,停止编排,按单路径完成。

Phase 2 — 构建任务 SOP 与执行流程

  1. 生成任务流程图:阶段、节点、依赖、并行条件、质量门和终止条件。
  2. 为每个节点定义:node_id、输入、输出、验收、风险、预算、coverage_requirements 和下游消费者。
  3. 标出无数据依赖的并行节点;有数据依赖的节点必须串行。
  4. 定义失败传播:节点验收失败、交接失败或清理失败时,后续节点如何阻断、返工或降级。

Phase 3 — Leader 动态定义专业角色与 Agent SOP

读取 references/role-contracts.md。leader 依据任务而非固定名单,为每个节点生成:

role_spec:
  title: <任务定义的专业角色>
  mission: <唯一使命>
  expertise: <该节点必需专业知识>
  allowed_tools: <最小工具边界>
  forbidden_actions: <禁止事项>
  required_outputs: <唯一交付物>
  acceptance: <可验证验收>

每个子 Agent 的系统提示词必须以:

你是一个<专业角色>。

开头,并包含唯一使命、专业标准、禁止事项、最小工具边界、结构化交接要求、生命周期要求、动态节点、动态输入、动态交付物和动态验收。

Phase 4 — 验证生命周期执行门

在启动任何真实 Agent 前,读取 references/lifecycle-protocol.md 并确认运行时能对每个 agent_id 返回:

  1. free_context → context_freed: true;
  2. clear_cache → cache_cleared: true;
  3. destroy_agent → destroyed: true;
  4. 终态查询 → destroyed 或 not_found;
  5. 可被 scripts/validate_lifecycle_receipt.py 验证的回执。

若任一项缺失,输出:

lifecycle_gate: blocked
agents_started: 0
execution: plan-only

仍可交付流程、动态角色 SOP、风险和下一步;不得启动真实子 Agent,不得声称释放或 Token 节省已经发生。

Phase 5 — 逐 Wave 分配、执行与交接

  1. leader 为当前 Wave 创建各专业 Agent,记录创建回执和 agent_id。
  2. 仅并行启动没有数据依赖的节点。
  3. 每个 Agent 只接收当前节点最小输入,不接收其他 Agent 的完整对话或无关原始 payload。
  4. 每个 Agent 完成后必须输出完整 handoff:证据、coverage、风险、指标、质量检查和下一节点条件。
  5. leader 先验证 handoff 与 coverage,再决定是否进入释放。

Phase 6 — 销毁、释放与下一步

对每个已通过验收的 Agent,严格按以下顺序:

持久化 handoff → free_context → clear_cache → destroy_agent → post-check → receipt validation

只有全部成功后,节点状态才从 completed 变为 released。下游节点只能读取 released 节点的 handoff。

任一步失败:

status: cleanup_failed
next_node_ready: false

停止后续 Wave,不复用该 Agent,输出失败回执、残留风险和人工处置路径。

Phase 7 — 汇总最终任务交付

仅从已 released 的 handoff 汇总:目标完成情况、各专业产物、测试、审查、发布/回滚、未解决风险和下一步。

详细输出契约

# agent-leader 执行结果

## 1. 任务分析
- 目标:……
- 成功定义:……
- 范围:……
- 约束与风险:……
- 编排理由:单路径 / 存在独立专业分支

## 2. 任务 SOP 与 DAG
| Phase / Wave | 节点 | 动态专业角色 | 输入 | 依赖 | 交付物 | 验收 | 并行条件 | 状态 |
|---|---|---|---|---|---|---|---|---|

## 3. 动态 role_spec 与 Agent 系统提示词摘要
| 节点 | 角色 | 唯一使命 | 专业标准 | 最小工具 | 禁止事项 | 验收 |
|---|---|---|---|---|---|---|

## 4. Handoff 与覆盖质量
| 节点 | coverage requirement | 状态 | finding_ref / 来源 | rationale | 风险或处置 |
|---|---|---|---|---|---|

## 5. 生命周期与释放回执
| agent_id | 节点 | context_freed | cache_cleared | destroyed | post-check | validator | 状态 |
|---|---|---|---|---|---|---|---|

## 6. 最终交付
- 架构/方案:……
- 实现或执行结果:……
- 测试与审查:……
- 发布/回滚或后续动作:……

## 7. 成本、质量与边界
- 实际 Token / cache / 工具输出:<实际值或 unavailable>
- 重复原始 payload:<数量或 unavailable>
- 质量门:<通过/失败与证据>
- 未证明的节省:……
- 风险、阻塞与待确认:……

没有内容时必须写 N/A 或 unavailable,不得省略章节。

样例与检验

读取 references/mock-tests.md。所有 README、fixture 和公开样例只能使用虚构内容,不得包含真实文档、数据、项目、组织、内部地址、账户、Token 或业务结论。

输出前红线

  1. 复杂/全栈任务自动进入任务分析;不要等待用户写固定触发句式。
  2. 角色按节点任务动态生成,不得强行套用固定名单。
  3. 每个真实 Agent 都必须有创建回执、唯一 handoff、三类释放回执、终态查询和验证;缺任一项不得标记 released。
  4. 下游只消费已 released 的 handoff,不读取旧 Agent 会话。
  5. 无数据依赖才并行;有依赖必须等待上游交接、验收和释放门。
  6. partial / unavailable coverage 必须进入风险、待确认或返工,不能静默省略。
  7. 无真实账单遥测时,Token、成本、缓存和时延一律写 unavailable;不得估算。
  8. 示例只含虚构内容;公开资源不得含真实输入或结果。

Resources

  • 任务流程、依赖与释放门:references/workflow-and-modes.md
  • 生命周期协议:references/lifecycle-protocol.md
  • 动态角色系统提示词:references/role-contracts.md
  • Handoff 与 coverage:references/handoff-schema.md
  • 预算与观测:references/budget-and-observability.md
  • 正反样例与复杂流程:references/mock-tests.md
  • 质量门:references/quality-gate.md
  • 回执校验:scripts/validate_lifecycle_receipt.py

Current listing version

1.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value95/100

Highlights

  • 解决复杂任务编排与多专业协作痛点,适用于全栈、跨服务、高风险任务
  • 提供端到端任务分解、依赖管理、质量门控与生命周期释放机制
Trigger Precision85/100

Highlights

  • 触发条件清晰覆盖全栈、复杂工程、知识工作、显式指令四类场景
  • 明确排除单一路径任务,边界清晰
Structure and Standards90/100

Areas to improve

  • 引用文件缺失 Reported severity: Minor

    SKILL.md 引用了多个 references/ 和 scripts/ 文件,但未传入实际内容

    Recommendation: 请确保所有被引用的文件(如 references/role-contracts.md、scripts/validate_lifecycle_receipt.py 等)均包含在 ZIP 包中

Highlights

  • Phase 划分清晰,含 7 个完整执行阶段与出口条件
  • 输出契约结构化,覆盖任务分析、SOP、角色定义、handoff、生命周期与最终交付
Execution Reliability80/100

Highlights

  • 严格的生命周期释放门控(free_context/clear_cache/destroy_agent)
  • handoff 验证与 coverage 检查机制完善
  • 失败传播与人工处置路径明确
Evidence Verifiability (mean of the first four)88/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.