360 Secure SkillHub
360 安全技能中心

Agent Team Skill

这是基于Python的AI代理团队管理工具,核心功能含查询/增改成员信息、设置团队leader、重置数据,遵循PDCA工作流与委派规则实现高效任务分配。典型场景有:查看团队架构、寻找特定专长成员、更换leader、委派任务。通过bash命令调用脚本,输出Markdown格式结果,需Python3.10+运行。

realqiyan
realqiyan
热度 88.46
最近更新 2026-05-11 17:28:58
分类:协作依赖:代码执行 / 读写文件应用场景:任务管理 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add agent-team-skill
Metadata
name
agent-team-skill
description
Manage AI agent team members with roles, skills, and task delegation. Use when: listing team members, adding/updating agents, setting the team leader, checking who has specific expertise, delegating tasks to the right agent, or coordinating multi-agent workflows. Keywords: team member, agent list, leader, expertise, delegation, PDCA workflow.
license
MIT
homepage
https://github.com/realqiyan/agent-team-skill
allowed-tools
Bash(python3:*) Read(*.json)
compatibility
Requires Python 3.10+
metadata
{"clawdbot":{"emoji":"🤖","requires":{"bins":["python3"]}}}

Agent Team Skill

Manage AI agent team members with skills, roles, and task delegation.

Team Members

List all team member information:

python3 scripts/team.py list

Common scenarios:

  • Check who is the current team leader
  • Find members with specific expertise before task assignment
  • Review team structure and available roles

Output example:

## Team Members

**Alice** ⭐ Leader - coordination,planning,decision-making
- agent_id: alice
- expertise: task breakdown, comprehensive decisions, agent coordination
- not_good_at: code development, investment analysis

**Bob** - Backend Developer - backend,API,database
- agent_id: bob
- expertise: Python,Go,PostgreSQL
- not_good_at: frontend,design

# Total: 2 member(s), Leader: Alice (alice)

⚡ Task Delegation Rules (Core Principle)

Delegation Timing:

  1. First complete prep work: understand requirements, clarify goals, confirm constraints
  2. When entering implementation: identify the best person for execution, delegate to them
  3. Follow up after delegation: check output quality, ensure requirements are met

Delegation Context (what to pass): When delegating, always provide:

  • Original requirements and success criteria
  • Relevant background and context
  • Your execution plan and any constraints
  • Expected output format

Delegation Failover: If teammate fails to complete:

  1. First attempt: Send back with specific feedback for revision
  2. Second attempt: Reassign to another teammate with adjusted context
  3. Third attempt: Escalate to leader OR execute yourself

🔄 Task Processing Flow (Highest Priority)

Plan → Do → Check → Act

IMPORTANT: This is a continuous improvement cycle. If task is incomplete in Act phase, loop back to Plan.

1. Plan — Planning Phase

Goal: Prepare thoroughly, avoid blind execution

  • Understand requirements and clarify questions
  • Define goals and success criteria
  • Identify risks and determine ownership
  • Create execution plan

2. Do — Execution Phase

Goal: Execute the plan while maintaining progress

  • Execute or delegate based on ownership
  • Track progress and key decisions

3. Check — Checking Phase

Goal: Verify results against requirements

  • Verify completeness and quality
  • Check compliance with standards

4. Act — Acting Phase

Goal: Summarize and decide next steps

  • ✅ Task complete → End
  • ❌ Task incomplete → Loop back to Plan

Add/Update Member

Add a new member or update existing member information:

python3 scripts/team.py update \
  --agent-id "agent-001" \
  --name "Alice" \
  --role "Backend Developer" \
  --is-leader "true" \
  --enabled "true" \
  --tags "backend,api,database" \
  --expertise "python,go,postgresql" \
  --not-good-at "frontend,design" \
  --load-workflow "true" \
  --group "backend-team"

Parameters:

  • --agent-id: Member unique identifier (required)
  • --name: Member name (required)
  • --role: Role/position (required)
  • --is-leader: Whether team Leader (required, true/false, only one Leader per team)
  • --enabled: Enable status true/false (required)
  • --tags: Tags, comma-separated (required)
  • --expertise: Expertise skills, comma-separated (required)
  • --not-good-at: Weak areas, comma-separated (required)
  • --load-workflow: Whether to load workflow prompts (optional, true/false, default: true for leader, false for others)
  • --group: Group name for categorization (optional, used for organizing team members)

Reset Data

Clear all team data and reset to initial state:

python3 scripts/team.py reset

Output:

Team data has been reset.

⚠️ Warning: This operation is irreversible. All data in ~/.agent-team/team.json will be permanently deleted.

Data Storage

Team data is stored in ~/.agent-team/team.json, shared globally. Directory is auto-created if it doesn't exist.

Common Use Cases

Finding the right person for a task

# List team to find member with relevant expertise
python3 scripts/team.py list
# Look for matching tags/expertise in the output

Changing team leader

Setting a new leader automatically removes leader status from the previous one:

python3 scripts/team.py update --agent-id "alice" --name "Alice" --role "Team Lead" --is-leader "true" --enabled "true" --tags "coordination,planning" --expertise "management,decision-making" --not-good-at "specialized-development"

Temporarily disabling a member

Set --enabled "false" to disable without removing:

python3 scripts/team.py update --agent-id "bob" --name "Bob" --role "Backend Developer" --is-leader "false" --enabled "false" --tags "backend,api" --expertise "Python,Go" --not-good-at "frontend"

Adding a new team member

python3 scripts/team.py update --agent-id "charlie" --name "Charlie" --role "Frontend Developer" --is-leader "false" --enabled "true" --tags "frontend,ui" --expertise "React,TypeScript" --not-good-at "backend,database"

Error Handling

Data file not found

If ~/.agent-team/team.json doesn't exist, the script returns an empty team state (no error raised).

Invalid JSON

If the data file is corrupted, the script logs an error and returns an empty state:

[agent-team] Error loading team data: <error message>

Missing required parameters

Running update without required parameters:

error: the following arguments are required: --agent-id, --name, --role, --is-leader, --enabled, --tags, --expertise, --not-good-at

Single leader constraint

Only one leader can exist. Setting a new leader automatically removes leader status from the previous one:

Note: Removed leader status from <previous-leader-name>

References