AgentSkillsCN

team-coordination

Appwrite Dart SDK技能。在使用Appwrite构建Flutter应用(移动端、Web端、桌面端)或服务器端Dart应用时使用此功能。涵盖客户端身份验证(邮箱、OAuth)、数据库查询、支持原生文件处理的文件上传、实时订阅,以及通过API密钥进行服务器端管理,包括用户管理、数据库管理、存储与函数调用。

SKILL.md
--- frontmatter
name: team-coordination
description: Coordinate work across multiple AI agents using teams, tasks, and messaging
author: opencode-teams
version: 1.0.0
compatibility: opencode
metadata:
  category: collaboration
  audience: ai-agents

Team Coordination Skill

Coordinate multi-agent workflows using teams, shared task queues, and inter-agent messaging.

What This Skill Does

  • Create and manage teams of AI agents
  • Distribute work via shared task queues
  • Enable communication between team members
  • Track task ownership and completion

When to Use This Skill

Use this skill when:

  • You need multiple agents to work on a complex task together
  • Work can be parallelized across specialist agents
  • Agents need to communicate findings or coordinate actions
  • You want to track who is working on what

Available Tools

This skill uses the following OpenCode tools (registered by opencode-teams plugin):

Team Management

  • spawn-team: Create a new team
  • discover-teams: List available teams to join
  • join-team: Join an existing team as a member
  • get-team-info: Get details about team members

Task Coordination

  • create-task: Add a task to the team's queue
  • get-tasks: View available or assigned tasks
  • claim-task: Claim a pending task to work on
  • update-task: Update task status or details

Communication

  • send-message: Send a direct message to a teammate
  • broadcast-message: Send a message to all team members
  • read-messages: Check messages from teammates

Example Workflows

Code Review Team

text
Leader Agent:
1. Use spawn-team to create "review-pr-456"
2. Use create-task to add:
   - Security review task
   - Performance review task
   - Style review task

Specialist Agents:
1. Use discover-teams to find "review-pr-456"
2. Use join-team to join as a member
3. Use get-tasks with filter {status: "pending"}
4. Use claim-task for their specialty
5. Complete review work
6. Use update-task to mark completed
7. Use send-message to report findings to leader

Leader Agent:
1. Use read-messages to collect all findings
2. Synthesize final review

Parallel Refactoring

text
Leader Agent:
1. Use spawn-team to create "refactor-services"
2. Break down work into service-specific tasks
3. Use create-task for each service

Worker Agents:
1. Use discover-teams to find work
2. Use join-team to join
3. Use get-tasks to see available work
4. Use claim-task for a service
5. Perform refactoring
6. Use broadcast-message to announce completion

Environment Variables

OpenCode sets these automatically:

  • OPENCODE_TEAM_NAME: Current team context
  • OPENCODE_AGENT_ID: Your unique agent identifier
  • OPENCODE_AGENT_NAME: Your display name
  • OPENCODE_AGENT_TYPE: Your role (leader, worker, specialist, etc.)

Best Practices

For Leaders:

  • Create specific, well-scoped tasks
  • Set appropriate task priorities
  • Monitor team progress via get-tasks
  • Synthesize results from multiple agents

For Workers:

  • Claim tasks that match your capabilities
  • Update task status regularly
  • Communicate blockers or questions
  • Share findings with relevant teammates

For Everyone:

  • Use descriptive team names (e.g., "review-pr-123" not "team1")
  • Keep messages concise and actionable
  • Clean up teams when work is complete (leader responsibility)

Error Handling

All tools throw descriptive errors:

  • Team already exists (when creating)
  • Team does not exist (when joining)
  • Task already claimed (when claiming)
  • Invalid team/task names

Check error messages and adjust accordingly.

Related Skills

This skill works well with:

  • Code analysis skills (for reviewing code)
  • Testing skills (for test coverage tasks)
  • Documentation skills (for doc generation tasks)

Tips

  • Start small: Create a team with 2-3 agents first
  • Use clear task descriptions
  • Establish communication patterns early
  • Leaders should periodically check task status
  • Workers should broadcast when they complete major milestones