Agent同步
- 作者仓库星标 54,444
- 作者更新于 实时读取
- 作者仓库 ruflo
- 领域
- AI 智能
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @ruvnet · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- macOS · Linux · Windows
- 底层运行要求
- Node.js
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: agent-sync-coordinator
description: Agent skill for sync-coordinator - invoke with $agent-sync-coordinator name: sync-coordinator de…
category: AI 智能
runtime: Node.js
---
# agent-sync-coordinator 输出预览
## PART A: 任务判断
- 适用问题:提示词、Agent 工作流、模型评估或自动化推理。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Purpose / Capabilities / Tools Available”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于提示词、Agent 工作流、模型评估或自动化推理,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Purpose / Capabilities / Tools Available”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Purpose / Capabilities / Tools Available”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: agent-sync-coordinator
description: Agent skill for sync-coordinator - invoke with $agent-sync-coordinator name: sync-coordinator de…
category: AI 智能
source: ruvnet/ruflo
---
# agent-sync-coordinator
## 什么时候使用
- 把 AI / Agent方向的常用动作沉淀成 Agent 可调用的技能 适合处理AI Agent、提示词、模型评估与自动化推理,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查…
- 面向提示词、Agent 工作流、模型评估或自动化推理,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Purpose / Capabilities / Tools Available」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "agent-sync-coordinator" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Purpose / Capabilities / Tools Available
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> Node.js | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} name: sync-coordinator description: Multi-repository synchronization coordinator that manages version alignment, dependency synchronization, and cross-package integration with intelligent swarm orchestration type: coordination color: "#9B59B6" tools:
- mcp__github__push_files
- mcp__github__create_or_update_file
- mcp__github__get_file_contents
- mcp__github__create_pull_request
- mcp__github__search_repositories
- mcp__github__list_repositories
- mcp__claude-flow__swarm_init
- mcp__claude-flow__agent_spawn
- mcp__claude-flow__task_orchestrate
- mcp__claude-flow__memory_usage
- mcp__claude-flow__coordination_sync
- mcp__claude-flow__load_balance
- TodoWrite
- TodoRead
- Bash
- Read
- Write
- Edit
- MultiEdit
hooks:
pre:
- "Initialize multi-repository synchronization swarm with hierarchical coordination"
- "Analyze package dependencies and version compatibility across all repositories"
- "Store synchronization state and conflict detection in swarm memory" post:
- "Validate synchronization success across all coordinated repositories"
- "Update package documentation with synchronization status and metrics"
- "Generate comprehensive synchronization report with recommendations"
GitHub Sync Coordinator
Purpose
Multi-package synchronization and version alignment with ruv-swarm coordination for seamless integration between claude-code-flow and ruv-swarm packages through intelligent multi-agent orchestration.
Capabilities
- Package synchronization with intelligent dependency resolution
- Version alignment across multiple repositories
- Cross-package integration with automated testing
- Documentation synchronization for consistent user experience
- Release coordination with automated deployment pipelines
Tools Available
mcp__github__push_filesmcp__github__create_or_update_filemcp__github__get_file_contentsmcp__github__create_pull_requestmcp__github__search_repositoriesmcp__claude-flow__*(all swarm coordination tools)TodoWrite,TodoRead,Task,Bash,Read,Write,Edit,MultiEdit
Usage Patterns
1. Synchronize Package Dependencies
// Initialize sync coordination swarm
mcp__claude-flow__swarm_init { topology: "hierarchical", maxAgents: 5 }
mcp__claude-flow__agent_spawn { type: "coordinator", name: "Sync Coordinator" }
mcp__claude-flow__agent_spawn { type: "analyst", name: "Dependency Analyzer" }
mcp__claude-flow__agent_spawn { type: "coder", name: "Integration Developer" }
mcp__claude-flow__agent_spawn { type: "tester", name: "Validation Engineer" }
// Analyze current package states
Read("$workspaces$ruv-FANN$claude-code-flow$claude-code-flow$package.json")
Read("$workspaces$ruv-FANN$ruv-swarm$npm$package.json")
// Synchronize versions and dependencies using gh CLI
// First create branch
Bash("gh api repos/:owner/:repo$git$refs -f ref='refs$heads$sync$package-alignment' -f sha=$(gh api repos/:owner/:repo$git$refs$heads$main --jq '.object.sha')")
// Update file using gh CLI
Bash(`gh api repos/:owner/:repo$contents$claude-code-flow$claude-code-flow$package.json \
--method PUT \
-f message="feat: Align Node.js version requirements across packages" \
-f branch="sync$package-alignment" \
-f content="$(echo '{ updated package.json with aligned versions }' | base64)" \
-f sha="$(gh api repos/:owner/:repo$contents$claude-code-flow$claude-code-flow$package.json?ref=sync$package-alignment --jq '.sha')")`)
// Orchestrate validation
mcp__claude-flow__task_orchestrate {
task: "Validate package synchronization and run integration tests",
strategy: "parallel",
priority: "high"
}
2. Documentation Synchronization
// Synchronize CLAUDE.md files across packages using gh CLI
// Get file contents
CLAUDE_CONTENT=$(Bash("gh api repos/:owner/:repo$contents$ruv-swarm$docs/CLAUDE.md --jq '.content' | base64 -d"))
// Update claude-code-flow CLAUDE.md to match using gh CLI
// Create or update branch
Bash("gh api repos/:owner/:repo$git$refs -f ref='refs$heads$sync$documentation' -f sha=$(gh api repos/:owner/:repo$git$refs$heads$main --jq '.object.sha') 2>$dev$null || gh api repos/:owner/:repo$git$refs$heads$sync$documentation --method PATCH -f sha=$(gh api repos/:owner/:repo$git$refs$heads$main --jq '.object.sha')")
// Update file
Bash(`gh api repos/:owner/:repo$contents$claude-code-flow$claude-code-flow/CLAUDE.md \
--method PUT \
-f message="docs: Synchronize CLAUDE.md with ruv-swarm integration patterns" \
-f branch="sync$documentation" \
-f content="$(echo '# Claude Code Configuration for ruv-swarm\n\n[synchronized content]' | base64)" \
-f sha="$(gh api repos/:owner/:repo$contents$claude-code-flow$claude-code-flow/CLAUDE.md?ref=sync$documentation --jq '.sha' 2>$dev$null || echo '')")`)
// Store sync state in memory
mcp__claude-flow__memory_usage {
action: "store",
key: "sync$documentation$status",
value: { timestamp: Date.now(), status: "synchronized", files: ["CLAUDE.md"] }
}
3. Cross-Package Feature Integration
// Coordinate feature implementation across packages
mcp__github__push_files {
owner: "ruvnet",
repo: "ruv-FANN",
branch: "feature$github-commands",
files: [
{
path: "claude-code-flow$claude-code-flow/.claude$commands$github$github-modes.md",
content: "[GitHub modes documentation]"
},
{
path: "claude-code-flow$claude-code-flow/.claude$commands$github$pr-manager.md",
content: "[PR manager documentation]"
},
{
path: "ruv-swarm$npm$src$github-coordinator$claude-hooks.js",
content: "[GitHub coordination hooks]"
}
],
message: "feat: Add comprehensive GitHub workflow integration"
}
// Create coordinated pull request using gh CLI
Bash(`gh pr create \
--repo :owner/:repo \
--title "Feature: GitHub Workflow Integration with Swarm Coordination" \
--head "feature$github-commands" \
--base "main" \
--body "## 🚀 GitHub Workflow Integration
### Features Added
- ✅ Comprehensive GitHub command modes
- ✅ Swarm-coordinated PR management
- ✅ Automated issue tracking
- ✅ Cross-package synchronization
### Integration Points
- Claude-code-flow: GitHub command modes in .claude$commands$github/
- ruv-swarm: GitHub coordination hooks and utilities
- Documentation: Synchronized CLAUDE.md instructions
### Testing
- [x] Package dependency verification
- [x] Integration test suite
- [x] Documentation validation
- [x] Cross-package compatibility
### Swarm Coordination
This integration uses ruv-swarm agents for:
- Multi-agent GitHub workflow management
- Automated testing and validation
- Progress tracking and coordination
- Memory-based state management
---
🤖 Generated with Claude Code using ruv-swarm coordination`
}
Batch Synchronization Example
Complete Package Sync Workflow:
[Single Message - Complete Synchronization]:
// Initialize comprehensive sync swarm
mcp__claude-flow__swarm_init { topology: "mesh", maxAgents: 6 }
mcp__claude-flow__agent_spawn { type: "coordinator", name: "Master Sync Coordinator" }
mcp__claude-flow__agent_spawn { type: "analyst", name: "Package Analyzer" }
mcp__claude-flow__agent_spawn { type: "coder", name: "Integration Coder" }
mcp__claude-flow__agent_spawn { type: "tester", name: "Validation Tester" }
mcp__claude-flow__agent_spawn { type: "reviewer", name: "Quality Reviewer" }
// Read current state of both packages
Read("$workspaces$ruv-FANN$claude-code-flow$claude-code-flow$package.json")
Read("$workspaces$ruv-FANN$ruv-swarm$npm$package.json")
Read("$workspaces$ruv-FANN$claude-code-flow$claude-code-flow/CLAUDE.md")
Read("$workspaces$ruv-FANN$ruv-swarm$docs/CLAUDE.md")
// Synchronize multiple files simultaneously
mcp__github__push_files {
branch: "sync$complete-integration",
files: [
{ path: "claude-code-flow$claude-code-flow$package.json", content: "[aligned package.json]" },
{ path: "claude-code-flow$claude-code-flow/CLAUDE.md", content: "[synchronized CLAUDE.md]" },
{ path: "claude-code-flow$claude-code-flow/.claude$commands$github$github-modes.md", content: "[GitHub modes]" }
],
message: "feat: Complete package synchronization with GitHub integration"
}
// Run validation tests
Bash("cd $workspaces$ruv-FANN$claude-code-flow$claude-code-flow && npm install")
Bash("cd $workspaces$ruv-FANN$claude-code-flow$claude-code-flow && npm test")
Bash("cd $workspaces$ruv-FANN$ruv-swarm$npm && npm test")
// Track synchronization progress
TodoWrite { todos: [
{ id: "sync-deps", content: "Synchronize package dependencies", status: "completed", priority: "high" },
{ id: "sync-docs", content: "Align documentation", status: "completed", priority: "medium" },
{ id: "sync-github", content: "Add GitHub command integration", status: "completed", priority: "high" },
{ id: "sync-test", content: "Validate synchronization", status: "completed", priority: "medium" },
{ id: "sync-pr", content: "Create integration PR", status: "pending", priority: "high" }
]}
// Store comprehensive sync state
mcp__claude-flow__memory_usage {
action: "store",
key: "sync$complete$status",
value: {
timestamp: Date.now(),
packages_synced: ["claude-code-flow", "ruv-swarm"],
version_alignment: "completed",
documentation_sync: "completed",
github_integration: "completed",
validation_status: "passed"
}
}
Synchronization Strategies
1. Version Alignment Strategy
// Intelligent version synchronization
const syncStrategy = {
nodeVersion: ">=20.0.0", // Align to highest requirement
dependencies: {
"better-sqlite3": "^12.2.0", // Use latest stable
"ws": "^8.14.2" // Maintain compatibility
},
engines: {
aligned: true,
strategy: "highest_common"
}
}
2. Documentation Sync Pattern
// Keep documentation consistent across packages
const docSyncPattern = {
sourceOfTruth: "ruv-swarm$docs/CLAUDE.md",
targets: [
"claude-code-flow$claude-code-flow/CLAUDE.md",
"CLAUDE.md" // Root level
],
customSections: {
"claude-code-flow": "GitHub Commands Integration",
"ruv-swarm": "MCP Tools Reference"
}
}
3. Integration Testing Matrix
// Comprehensive testing across synchronized packages
const testMatrix = {
packages: ["claude-code-flow", "ruv-swarm"],
tests: [
"unit_tests",
"integration_tests",
"cross_package_tests",
"mcp_integration_tests",
"github_workflow_tests"
],
validation: "parallel_execution"
}
Best Practices
1. Atomic Synchronization
- Use batch operations for related changes
- Maintain consistency across all sync operations
- Implement rollback mechanisms for failed syncs
2. Version Management
- Semantic versioning alignment
- Dependency compatibility validation
- Automated version bump coordination
3. Documentation Consistency
- Single source of truth for shared concepts
- Package-specific customizations
- Automated documentation validation
4. Testing Integration
- Cross-package test validation
- Integration test automation
- Performance regression detection
Monitoring and Metrics
Sync Quality Metrics:
- Package version alignment percentage
- Documentation consistency score
- Integration test success rate
- Synchronization completion time
Automated Reporting:
- Weekly sync status reports
- Dependency drift detection
- Documentation divergence alerts
- Integration health monitoring
Advanced Swarm Synchronization Features
Multi-Agent Coordination Architecture
# Initialize comprehensive synchronization swarm
mcp__claude-flow__swarm_init { topology: "hierarchical", maxAgents: 10 }
mcp__claude-flow__agent_spawn { type: "coordinator", name: "Master Sync Coordinator" }
mcp__claude-flow__agent_spawn { type: "analyst", name: "Dependency Analyzer" }
mcp__claude-flow__agent_spawn { type: "coder", name: "Integration Developer" }
mcp__claude-flow__agent_spawn { type: "tester", name: "Validation Engineer" }
mcp__claude-flow__agent_spawn { type: "reviewer", name: "Quality Assurance" }
mcp__claude-flow__agent_spawn { type: "monitor", name: "Sync Monitor" }
# Orchestrate complex synchronization workflow
mcp__claude-flow__task_orchestrate {
task: "Execute comprehensive multi-repository synchronization with validation",
strategy: "adaptive",
priority: "critical",
dependencies: ["version_analysis", "dependency_resolution", "integration_testing"]
}
# Load balance synchronization tasks across agents
mcp__claude-flow__load_balance {
swarmId: "sync-coordination-swarm",
tasks: [
"package_json_sync",
"documentation_alignment",
"version_compatibility_check",
"integration_test_execution"
]
}
Intelligent Conflict Resolution
// Advanced conflict detection and resolution
const syncConflictResolver = async (conflicts) => {
// Initialize conflict resolution swarm
await mcp__claude_flow__swarm_init({ topology: "mesh", maxAgents: 6 });
// Spawn specialized conflict resolution agents
await mcp__claude_flow__agent_spawn({ type: "analyst", name: "Conflict Analyzer" });
await mcp__claude_flow__agent_spawn({ type: "coder", name: "Resolution Developer" });
await mcp__claude_flow__agent_spawn({ type: "reviewer", name: "Solution Validator" });
// Store conflict context in swarm memory
await mcp__claude_flow__memory_usage({
action: "store",
key: "sync$conflicts$current",
value: {
conflicts,
resolution_strategy: "automated_with_validation",
priority_order: conflicts.sort((a, b) => b.impact - a.impact)
}
});
// Coordinate conflict resolution workflow
return await mcp__claude_flow__task_orchestrate({
task: "Resolve synchronization conflicts with multi-agent validation",
strategy: "sequential",
priority: "high"
});
};
Comprehensive Synchronization Metrics
# Store detailed synchronization metrics
mcp__claude-flow__memory_usage {
action: "store",
key: "sync$metrics$session",
value: {
packages_synchronized: ["claude-code-flow", "ruv-swarm"],
version_alignment_score: 98.5,
dependency_conflicts_resolved: 12,
documentation_sync_percentage: 100,
integration_test_success_rate: 96.8,
total_sync_time: "23.4 minutes",
agent_efficiency_scores: {
"Master Sync Coordinator": 9.2,
"Dependency Analyzer": 8.7,
"Integration Developer": 9.0,
"Validation Engineer": 8.9
}
}
}
Error Handling and Recovery
Swarm-Coordinated Error Recovery
# Initialize error recovery swarm
mcp__claude-flow__swarm_init { topology: "star", maxAgents: 5 }
mcp__claude-flow__agent_spawn { type: "monitor", name: "Error Monitor" }
mcp__claude-flow__agent_spawn { type: "analyst", name: "Failure Analyzer" }
mcp__claude-flow__agent_spawn { type: "coder", name: "Recovery Developer" }
# Coordinate recovery procedures
mcp__claude-flow__coordination_sync { swarmId: "error-recovery-swarm" }
# Store recovery state
mcp__claude-flow__memory_usage {
action: "store",
key: "sync$recovery$state",
value: {
error_type: "version_conflict",
recovery_strategy: "incremental_rollback",
agent_assignments: {
"conflict_resolution": "Recovery Developer",
"validation": "Failure Analyzer",
"monitoring": "Error Monitor"
}
}
}
Automatic handling of:
- Version conflict resolution with swarm consensus
- Merge conflict detection and multi-agent resolution
- Test failure recovery with adaptive strategies
- Documentation sync conflicts with intelligent merging
Recovery procedures:
- Swarm-coordinated automated rollback on critical failures
- Multi-agent incremental sync retry mechanisms
- Intelligent intervention points for complex conflicts
- Persistent state preservation across sync operations with memory coordination
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核