Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问clear审计未展示

delegationdelegation 工具

Agent Skill

delegation 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

523

周安装

22

GitHub Stars

公开资料未说明

下载量

183
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:delegation(delegation 工具)
来源仓库:https://github.com/s-hiraoku/synapse-a2a
仓库路径:skills/delegation
安装命令:
npx skills add s-hiraoku/synapse-a2a --skill "delegation"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add s-hiraoku/synapse-a2a --skill "delegation"

简介

delegation 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词快速定位候选结果时使用。

  • 发现并安装 AI 代理的技能,支持 delegation 工具相关任务。
  • 通过 github 安装,命令为 npx skills add s-hiraoku/synapse-a2a --skill "delegation"。
  • 建议确认权限范围、维护状态及是否触发联网或文件读写操作。
  • delegation 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
delegation
description
This skill configures automatic task delegation between agents in Synapse A2A. Configure delegation rules via settings files (.synapse/settings.json and .synapse/delegate.md) or the interactive config TUI (synapse config). Supports orchestrator mode (Claude coordinates) and passthrough mode (direct forwarding). Includes agent status verification, priority levels, error handling, and File Safety integration.

Delegation Skill

Configure automatic task delegation to other agents based on natural language rules.

Configuration

Delegation is configured via settings files, managed using:

  • synapse init - Create .synapse/ with template files
  • synapse config - Interactive TUI for editing settings
  • Direct file editing

Configuration Files

FilePurpose
.synapse/settings.jsonEnable/disable delegation and set A2A flow mode
.synapse/delegate.mdDefine delegation rules and agent responsibilities

Settings Structure

In .synapse/settings.json:

{
  "a2a": {
    "flow": "auto"  // "roundtrip" | "oneway" | "auto"
  },
  "delegation": {
    "enabled": true  // Enable automatic task delegation
  }
}

Delegate Rules Structure

The .synapse/delegate.md file defines delegation rules in YAML frontmatter followed by optional markdown documentation.

Schema

---
# Delegate rules configuration
version: 1  # Schema version (required)

# Agent definitions with their responsibilities
agents:
  codex:
    responsibilities:
      - "Code implementation and refactoring"
      - "File editing and creation"
      - "Bug fixes"
    default_priority: 3

  gemini:
    responsibilities:
      - "Research and web search"
      - "Documentation review"
      - "API exploration"
    default_priority: 3

  claude:
    responsibilities:
      - "Code review and analysis"
      - "Architecture planning"
      - "Complex problem solving"
    default_priority: 3

# Delegation rules (evaluated in order, first match wins)
rules:
  - name: "coding-tasks"
    description: "Route coding tasks to Codex"
    match:
      keywords: ["implement", "refactor", "fix", "edit", "create file"]
      file_patterns: ["*.py", "*.ts", "*.js"]
    target: codex
    priority: 3
    flow: roundtrip  # Wait for response

  - name: "research-tasks"
    description: "Route research to Gemini"
    match:
      keywords: ["research", "search", "find", "look up", "documentation"]
    target: gemini
    priority: 2
    flow: oneway  # Fire and forget

  - name: "review-tasks"
    description: "Route reviews to Claude"
    match:
      keywords: ["review", "analyze", "evaluate", "assess"]
    target: claude
    priority: 3
    flow: roundtrip

# Fallback behavior when no rules match
fallback:
  action: manual  # "manual" | "ask" | "default_agent"
  default_agent: claude  # Used when action is "default_agent"
---

# Delegation Rules Documentation

Additional markdown content here for human-readable documentation...

Field Reference

FieldTypeRequiredDescription
versionintegerYesSchema version (currently 1)
agentsobjectYesAgent definitions keyed by agent name
agents.<name>.responsibilitiesstring[]NoList of task types this agent handles
agents.<name>.default_priorityintegerNoDefault priority (1-5) for this agent
rulesarrayNoOrdered list of delegation rules
rules[].namestringYesUnique rule identifier
rules[].descriptionstringNoHuman-readable description
rules[].matchobjectYesConditions for rule matching
rules[].match.keywordsstring[]NoKeywords to match in task text
rules[].match.file_patternsstring[]NoGlob patterns for file-related tasks
rules[].targetstringYesTarget agent name
rules[].priorityintegerNoTask priority (1-5, default: 3)
rules[].flowstringNo"roundtrip" \"oneway" \"auto"
fallbackobjectNoBehavior when no rules match
fallback.actionstringNo"manual" \"ask" \"default_agent"
fallback.default_agentstringNoAgent to use for "default_agent" action

Rule Evaluation

Rules are evaluated in order from top to bottom. The first matching rule is applied:

  1. Keyword matching: Case-insensitive substring match against task text
  2. File pattern matching: Glob patterns matched against mentioned file paths
  3. Combined conditions: All specified conditions must match (AND logic)

If no rules match, the fallback behavior is applied.

Delegating Tasks

Use the @agent pattern to send tasks to other agents:

@codex Please refactor this function
@gemini Research the latest API changes
@claude Review this design document

For programmatic delegation (from AI agents):

# Fire and forget (default)
synapse send codex "Refactor this function" --from claude

# Wait for response (roundtrip)
synapse send gemini "Analyze this code" --response --from claude

# Urgent follow-up
synapse send gemini "Status update?" --priority 4 --from claude

# Reply to a --response request
synapse send claude "Here is the analysis..." --reply-to <task_id> --from gemini

Important: When responding to a --response request, the receiver MUST use --reply-to <task_id> to link the response.

Modes

Orchestrator Mode (Recommended)

Claude analyzes tasks, delegates to appropriate agent, waits for response, integrates results.

User → Claude (analyze) → @codex/@gemini → Claude (integrate) → User

Passthrough Mode

Direct forwarding without processing.

User → Claude (route) → @codex/@gemini → User

Manual Mode (Default)

No automatic delegation. User explicitly uses @agent patterns.

Pre-Delegation Checklist

Before delegating any task:

  1. Verify agent is READY: synapse list (Rich TUI with auto-refresh on changes)
  2. Check file locks: synapse file-safety locks (for file edits)
  3. Verify branch: git branch --show-current (for coding tasks)

Agent Status:

StatusMeaningAction
READYIdle, waiting for inputSafe to delegate
WAITINGAwaiting user inputUse terminal jump to respond
PROCESSINGBusy handling a taskWait or use --priority 5
DONETask completedWill return to READY shortly

Note: synapse list provides real-time agent monitoring with auto-refresh. Press 1-9/↑↓ to select agent, Enter/j to jump, k to kill, / to filter, ESC to clear, q to quit.

Priority Levels

PriorityUse Case
1-2Low priority, background tasks
3Normal tasks (default)
4Urgent follow-ups
5Critical/emergency tasks

Available Agents

AgentStrengthsPort Range
claudeCode review, analysis, planning8100-8109
geminiResearch, web search, documentation8110-8119
codexCoding, file editing, refactoring8120-8129
opencodeAI coding, file operations8130-8139
copilotCode suggestions, completions8140-8149

References

For detailed documentation, read:

  • references/modes.md - Delegation modes and workflows
  • references/file-safety.md - File Safety integration
  • references/examples.md - Example sessions and configurations

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

26.93%
按下载量换算49

Gemini CLI

20.38%
按下载量换算37

windsurf

16.75%
按下载量换算31

trae

13.81%
按下载量换算25

OpenCode

7.86%
按下载量换算14

Cursor

3.59%
按下载量换算7

安全审计

暂无安全审计结果可展示。

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add s-hiraoku/synapse-a2a --skill "delegation" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills