关于 agent-github-modes
agent-github-modes 提供 Claude-Flow 的 GitHub 工作流协调模式,涵盖 PR、Issue、发布、仓库和 CI/CD。它结合 GitHub CLI 操作,并可选用 ruv-swarm 协调和批量执行。
主要功能
- 01GitHub 工作流编排
- 02PR 审查与协调
- 03Issue 跟踪
- 04发布与部署协调
- 05仓库和分支管理
- 06CI/CD 与安全工作流
适用场景
- 01协调多个 PR 的审查与合并
- 02跟踪 Issue 和项目进度
- 03同步软件包与版本
- 04协调 CI 检查和部署
MCP 相关
这些模式可使用 claude-flow MCP 工具初始化 swarm、生成 Agent 并编排 GitHub 任务。
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ ruvnet/ ruflo --skill agent-github-modes安装后在 Claude Code 中输入/agent-github-modes确认已加载。
详细介绍
name: github-modes description: 用于工作流编排、PR 管理和仓库协调的全面 GitHub 集成模式,并针对批量操作进行了优化 tools: mcp__claude-flow__swarm_init, mcp__claude-flow__agent_spawn, mcp__claude-flow__task_orchestrate, Bash, TodoWrite, Read, Write color: purple type: development capabilities:
- GitHub 工作流编排
- 拉取请求管理与审查
- 问题跟踪与协调
- 发布管理与部署
- 仓库架构与组织
- CI/CD 流水线协调 priority: medium hooks: pre: | echo "Starting github-modes..." echo "Initializing GitHub workflow coordination" gh auth status || (echo "GitHub CLI authentication required" && exit 1) git status > $dev$null || (echo "Not in a git repository" && exit 1) post: | echo "Completed github-modes" echo "GitHub operations synchronized" echo "Workflow coordination finalized"
GitHub 集成模式
概述
本文档介绍 Claude-Flow 中与 ruv-swarm 协调的所有可用 GitHub 集成模式。每种模式都针对特定的 GitHub 工作流进行了优化,并包含批量工具集成,以实现最高效率。
GitHub 工作流模式
gh-coordinator
GitHub 工作流编排与协调
- 协调模式:分层
- 最大并行操作数:10
- 批量优化:是
- 工具:gh CLI 命令、TodoWrite、TodoRead、Task、Memory、Bash
- 用法:
$github gh-coordinator <GitHub workflow description> - 适用场景:复杂的 GitHub 工作流、多仓库协调
pr-manager
拉取请求管理与审查协调
- 审查模式:自动化
- 多审查者:是
- 冲突解决:智能
- 工具:gh pr create、gh pr view、gh pr review、gh pr merge、TodoWrite、Task
- 用法:
$github pr-manager <PR management task> - 适用场景:PR 审查、合并协调、冲突解决
issue-tracker
问题管理与项目协调
- 问题工作流:自动化
- 标签管理:智能
- 进度跟踪:实时
- 工具:gh issue create、gh issue edit、gh issue comment、gh issue list、TodoWrite
- 用法:
$github issue-tracker <issue management task> - 适用场景:项目管理、问题协调、进度跟踪
release-manager
发布协调与部署
- 发布流水线:自动化
- 版本控制:语义化
- 部署:多阶段
- 工具:gh pr create、gh pr merge、gh release create、Bash、TodoWrite
- 用法:
$github release-manager <release task> - 适用场景:发布管理、版本协调、部署流水线
仓库管理模式
repo-architect
仓库结构与组织
- 结构优化:是
- 多仓库:支持
- 模板管理:高级
- 工具:gh repo create、gh repo clone、git 命令、Write、Read、Bash
- 用法:
$github repo-architect <repository management task> - 适用场景:仓库设置、结构优化、多仓库管理
code-reviewer
自动化代码审查与质量保证
- 审查质量:深入
- 安全分析:是
- 性能检查:自动化
- 工具:gh pr view --json files、gh pr review、gh pr comment、Read、Write
- 用法:
$github code-reviewer <review task> - 适用场景:代码质量、安全审查、性能分析
branch-manager
分支管理与工作流协调
- 分支策略:GitFlow
- 合并策略:智能
- 冲突预防:主动
- 工具:gh api(用于分支操作)、git 命令、Bash
- 用法:
$github branch-manager <branch management task> - 适用场景:分支协调、合并策略、工作流管理
集成命令
sync-coordinator
多包同步
- 包同步:智能
- 版本对齐:自动
- 依赖项解析:高级
- 工具:git commands、gh pr create、Read、Write、Bash
- 用法:
$github sync-coordinator <sync task> - 最适合:包同步、版本管理、依赖项更新
ci-orchestrator
CI/CD 工作流协调
- 工作流管理:高级
- 测试协调:并行
- 部署:自动化
- 工具:gh pr checks、gh workflow list、gh run list、Bash、TodoWrite、Task
- 用法:
$github ci-orchestrator <CI/CD task> - 最适合:CI/CD 协调、测试管理、部署自动化
security-guardian
安全与合规管理
- 安全扫描:自动化
- 合规检查:持续
- 漏洞管理:主动
- 工具:gh search code、gh issue create、gh secret list、Read、Write
- 用法:
$github security-guardian <security task> - 最适合:安全审计、合规检查、漏洞管理
使用示例
创建协同拉取请求工作流:
$github pr-manager "Review and merge feature$new-integration branch with automated testing and multi-reviewer coordination"
管理仓库同步:
$github sync-coordinator "Synchronize claude-code-flow and ruv-swarm packages, align versions, and update cross-dependencies"
设置自动化问题跟踪:
$github issue-tracker "Create and manage integration issues with automated progress tracking and swarm coordination"
批量操作
所有 GitHub 模式都支持批量操作,以实现最高效率:
并行 GitHub 操作示例:
[Single Message with BatchTool]:
Bash("gh issue create --title 'Feature A' --body '...'")
Bash("gh issue create --title 'Feature B' --body '...'")
Bash("gh pr create --title 'PR 1' --head 'feature-a' --base 'main'")
Bash("gh pr create --title 'PR 2' --head 'feature-b' --base 'main'")
TodoWrite { todos: [todo1, todo2, todo3] }
Bash("git checkout main && git pull")
与 ruv-swarm 集成
所有 GitHub 模式都可通过 ruv-swarm 协调功能增强:
// Initialize swarm for GitHub workflow
mcp__claude-flow__swarm_init { topology: "hierarchical", maxAgents: 5 }
mcp__claude-flow__agent_spawn { type: "coordinator", name: "GitHub Coordinator" }
mcp__claude-flow__agent_spawn { type: "reviewer", name: "Code Reviewer" }
mcp__claude-flow__agent_spawn { type: "tester", name: "QA Agent" }
// Execute GitHub workflow with coordination
mcp__claude-flow__task_orchestrate { task: "GitHub workflow", strategy: "parallel" }
评论
支持 Markdown