github-workflow-automation について
ruv-swarmとClaude-FlowでGitHub Actionsワークフローの生成・管理を支援するスキルです。CI/CDやリポジトリ作業、分析、最適化を扱います。
主な機能
- 01GitHub Actionsワークフローの生成と最適化
- 02プルリクエスト、Issue、リリースの調整
- 03ワークフロー性能と失敗の分析
- 04テスト選択と並列実行
- 05CI、セキュリティ、デプロイ用テンプレート
活用シーン
- 01コードベースからCIパイプラインを作成
- 02複数リポジトリにまたがるリリース調整
- 03専門エージェントによるプルリクエストレビュー
- 04実行失敗やワークフローのボトルネック調査
MCP 対応
Claude-Flowを介したMCPベースの調整方法が記載されており、GitHubワークフロー向けのswarm初期化やエージェント生成を扱います。
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ ruvnet/ ruflo --skill github-workflow-automationインストール後、Claude Code で/github-workflow-automationを入力して読み込まれたか確認します。
詳細
GitHub ワークフロー自動化スキル
概要
このスキルは、AI スウォームによる連携を活用した包括的な GitHub Actions 自動化を提供します。インテリジェントな CI/CD パイプライン、ワークフローのオーケストレーション、リポジトリ管理を統合し、自律的に連携して適応する GitHub ワークフローを実現します。
クイックスタート
💡 基本的な使い方 - クリックして展開<$summary>
GitHub ワークフロー自動化を初期化する
# Start with a simple workflow
npx ruv-swarm actions generate-workflow \
--analyze-codebase \
--detect-languages \
--create-optimal-pipeline
よく使うコマンド
# Optimize existing workflow
npx ruv-swarm actions optimize \
--workflow ".github$workflows$ci.yml" \
--suggest-parallelization
# Analyze failed runs
gh run view <run-id> --json jobs,conclusion | \
npx ruv-swarm actions analyze-failure \
--suggest-fixes
<$details>
主な機能
🤖 スウォームを活用した GitHub モード
利用可能な GitHub 統合モード<$summary>
1. gh-coordinator
GitHub ワークフローのオーケストレーションと連携
- 連携モード: 階層型
- 最大並列操作数: 10
- バッチ最適化: はい
- 最適な用途: 複雑な GitHub ワークフロー、複数リポジトリ間の連携
# Usage example
npx claude-flow@alpha github gh-coordinator \
"Coordinate multi-repo release across 5 repositories"
2. pr-manager
プルリクエストの管理とレビューの連携
- レビューモード: 自動
- 複数レビュアー: はい
- 競合解決: インテリジェント
# Create PR with automated review
gh pr create --title "Feature: New capability" \
--body "Automated PR with swarm review" | \
npx ruv-swarm actions pr-validate \
--spawn-agents "linter,tester,security,docs"
3. issue-tracker
Issue 管理とプロジェクトの連携
- Issue ワークフロー: 自動
- ラベル管理: スマート
- 進捗追跡: リアルタイム
# Create coordinated issue workflow
npx claude-flow@alpha github issue-tracker \
"Manage sprint issues with automated tracking"
4. release-manager
リリースの連携とデプロイ
- リリースパイプライン: 自動
- バージョン管理: セマンティック
- デプロイ: 複数ステージ
# Automated release management
npx claude-flow@alpha github release-manager \
"Create v2.0.0 release with changelog and deployment"
5. repo-architect
リポジトリの構造と整理
- 構造の最適化: はい
- 複数リポジトリのサポート: はい
- テンプレート管理: 高度
# Optimize repository structure
npx claude-flow@alpha github repo-architect \
"Restructure monorepo with optimal organization"
6. code-reviewer
コードレビューと品質保証の自動化
- レビュー品質: 詳細
- セキュリティ分析: はい
- パフォーマンスチェック: 自動
# Automated code review
gh pr view 123 --json files | \
npx ruv-swarm actions pr-validate \
--deep-review \
--security-scan
7. ci-orchestrator
CI/CD パイプラインの連携
- パイプライン管理: 高度
- テスト連携: 並列
- デプロイ: 自動
# Orchestrate CI/CD pipeline
npx claude-flow@alpha github ci-orchestrator \
"Setup parallel test execution with smart caching"
8. security-guardian
セキュリティとコンプライアンスの管理
- セキュリティスキャン: 自動
- コンプライアンスチェック: 継続的
- 脆弱性管理: 先回り型
# Security audit
npx ruv-swarm actions security \
--deep-scan \
--compliance-check \
--create-issues
<$details>
🔧 ワークフローテンプレート
本番環境に対応した GitHub Actions テンプレート<$summary>
1. スウォームを活用したインテリジェント CI
# .github$workflows$swarm-ci.yml
name: Intelligent CI with Swarms
on: [push, pull_request]
jobs:
swarm-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Initialize Swarm
uses: ruvnet$swarm-action@v1
with:
topology: mesh
max-agents: 6
- name: Analyze Changes
run: |
npx ruv-swarm actions analyze \
--commit ${{ github.sha }} \
--suggest-tests \
--optimize-pipeline
2. 複数言語の検出
# .github$workflows$polyglot-swarm.yml
name: Polyglot Project Handler
on: push
jobs:
detect-and-build:
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Detect Languages
id: detect
run: |
npx ruv-swarm actions detect-stack \
--output json > stack.json
- name: Dynamic Build Matrix
run: |
npx ruv-swarm actions create-matrix \
--from stack.json \
--parallel-builds
3. 適応型セキュリティスキャン
# .github$workflows$security-swarm.yml
name: Intelligent Security Scan
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
security-swarm:
runs-on: ubuntu-latest
steps:
- name: Security Analysis Swarm
run: |
SECURITY_ISSUES=$(npx ruv-swarm actions security \
--deep-scan \
--format json)
echo "$SECURITY_ISSUES" | jq -r '.issues[]? | @base64' | while read -r issue; do
_jq() {
echo ${issue} | base64 --decode | jq -r ${1}
}
gh issue create \
--title "$(_jq '.title')" \
--body "$(_jq '.body')" \
--label "security,critical"
done
4. 自己修復型パイプライン
# .github$workflows$self-healing.yml
name: Self-Healing Pipeline
on: workflow_run
jobs:
heal-pipeline:
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
runs-on: ubuntu-latest
steps:
- name: Diagnose and Fix
run: |
npx ruv-swarm actions self-heal \
--run-id ${{ github.event.workflow_run.id }} \
--auto-fix-common \
--create-pr-complex
5. 段階的デプロイ
# .github$workflows$smart-deployment.yml
name: Smart Deployment
on:
push:
branches: [main]
jobs:
progressive-deploy:
runs-on: ubuntu-latest
steps:
- name: Analyze Risk
id: risk
run: |
npx ruv-swarm actions deploy-risk \
--changes ${{ github.sha }} \
--history 30d
- name: Choose Strategy
run: |
npx ruv-swarm actions deploy-strategy \
--risk ${{ steps.risk.outputs.level }} \
--auto-execute
6. パフォーマンスのリグレッション検出
# .github$workflows$performance-guard.yml
name: Performance Guard
on: pull_request
jobs:
perf-swarm:
runs-on: ubuntu-latest
steps:
- name: Performance Analysis
run: |
npx ruv-swarm actions perf-test \
--baseline main \
--threshold 10% \
--auto-profile-regression
7. PR 検証スウォーム
# .github$workflows$pr-validation.yml
name: PR Validation Swarm
on: pull_request
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Multi-Agent Validation
run: |
PR_DATA=$(gh pr view ${{ github.event.pull_request.number }} --json files,labels)
RESULTS=$(npx ruv-swarm actions pr-validate \
--spawn-agents "linter,tester,security,docs" \
--parallel \
--pr-data "$PR_DATA")
gh pr comment ${{ github.event.pull_request.number }} \
--body "$RESULTS"
8. インテリジェントリリース
# .github$workflows$intelligent-release.yml
name: Intelligent Release
on:
push:
tags: ['v*']
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Release Swarm
run: |
npx ruv-swarm actions release \
--analyze-changes \
--generate-notes \
--create-artifacts \
--publish-smart
<$details>
📊 モニタリングと分析
ワークフローの分析と最適化<$summary>
ワークフロー分析
# Analyze workflow performance
npx ruv-swarm actions analytics \
--workflow "ci.yml" \
--period 30d \
--identify-bottlenecks \
--suggest-improvements
コストの最適化
# Optimize GitHub Actions costs
npx ruv-swarm actions cost-optimize \
--analyze-usage \
--suggest-caching \
--recommend-self-hosted
失敗パターンの分析
# Identify failure patterns
npx ruv-swarm actions failure-patterns \
--period 90d \
--classify-failures \
--suggest-preventions
リソース管理
# Optimize resource usage
npx ruv-swarm actions resources \
--analyze-usage \
--suggest-runners \
--cost-optimize
<$details>
高度な機能
🧪 動的なテスト戦略
インテリジェントなテスト選択と実行<$summary>
スマートなテスト選択
# Automatically select relevant tests
- name: Swarm Test Selection
run: |
npx ruv-swarm actions smart-test \
--changed-files ${{ steps.files.outputs.all }} \
--impact-analysis \
--parallel-safe
動的なテストマトリックス
# Generate test matrix from code analysis
jobs:
generate-matrix:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
MATRIX=$(npx ruv-swarm actions test-matrix \
--detect-frameworks \
--optimize-coverage)
echo "matrix=${MATRIX}" >> $GITHUB_OUTPUT
test:
needs: generate-matrix
strategy:
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}}
インテリジェントな並列化
# Determine optimal parallelization
npx ruv-swarm actions parallel-strategy \
--analyze-dependencies \
--time-estimates \
--cost-aware
<$details>
🔮 予測分析
AI を活用したワークフローの予測<$summary>
失敗の予測
# Predict potential failures
npx ruv-swarm actions predict \
--analyze-history \
--identify-risks \
--suggest-preventive
ワークフローの推奨事項
# Get workflow recommendations
npx ruv-swarm actions recommend \
--analyze-repo \
--suggest-workflows \
--industry-best-practices
最適化の自動化
# Continuously optimize workflows
npx ruv-swarm actions auto-optimize \
--monitor-performance \
--apply-improvements \
--track-savings
<$details>
🎯 カスタムアクションの開発
独自のスウォームアクションを作成する<$summary>
カスタムスウォームアクションのテンプレート
// action.yml
name: 'Swarm Custom Action'
description: 'Custom swarm-powered action'
inputs:
task:
description: 'Task for swarm'
required: true
runs:
using: 'node16'
main: 'dist$index.js'
// index.js
const { SwarmAction } = require('ruv-swarm');
async function run() {
const swarm = new SwarmAction({
topology: 'mesh',
agents: ['analyzer', 'optimizer']
});
await swarm.execute(core.getInput('task'));
}
run().catch(error => core.setFailed(error.message));
<$details>
Claude-Flow との統合
🔄 スウォーム連携パターン
MCP ベースの GitHub ワークフロー連携<$summary>
GitHub スウォームを初期化する
// Step 1: Initialize swarm coordination
mcp__claude-flow__swarm_init {
topology: "hierarchical",
maxAgents: 8
}
// Step 2: Spawn specialized agents
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" }
mcp__claude-flow__agent_spawn { type: "analyst", name: "Security Analyst" }
// Step 3: Orchestrate GitHub workflow
mcp__claude-flow__task_orchestrate {
task: "Complete PR review and merge workflow",
strategy: "parallel",
priority: "high"
}
GitHub フックとの統合
# Pre-task: Setup GitHub context
npx claude-flow@alpha hooks pre-task \
--description "PR review workflow" \
--context "pr-123"
# During task: Track progress
npx claude-flow@alpha hooks notify \
--message "Completed security scan" \
--type "github-action"
# Post-task: Export results
npx claude-flow@alpha hooks post-task \
--task-id "pr-review-123" \
--export-github-summary
<$details>
📦 バッチ操作
GitHub 操作の並行実行<$summary>
GitHub CLI コマンドの並列実行
// Single message with all GitHub operations
[Concurrent Execution]:
Bash("gh issue create --title 'Feature A' --body 'Description A' --label 'enhancement'")
Bash("gh issue create --title 'Feature B' --body 'Description B' --label 'enhancement'")
Bash("gh pr create --title 'PR 1' --head 'feature-a' --base 'main'")
Bash("gh pr create --title 'PR 2' --head 'feature-b' --base 'main'")
Bash("gh pr checks 123 --watch")
TodoWrite { todos: [
{content: "Review security scan results", status: "pending"},
{content: "Merge approved PRs", status: "pending"},
{content: "Update changelog", status: "pending"}
]}
<$details>
ベストプラクティス
🏗️ ワークフローの整理
GitHub ワークフローを構成する<$summary>
1. 再利用可能なワークフローを使用する
# .github$workflows$reusable-swarm.yml
name: Reusable Swarm Workflow
on:
workflow_call:
inputs:
topology:
required: true
type: string
jobs:
swarm-task:
runs-on: ubuntu-latest
steps:
- name: Initialize Swarm
run: |
npx ruv-swarm init --topology ${{ inputs.topology }}
2. 適切なキャッシュを実装する
- name: Cache Swarm Dependencies
uses: actions$cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
#### 3. 適切なタイムアウトを設定する
```yaml
jobs:
swarm-task:
timeout-minutes: 30
steps:
- name: Swarm Operation
timeout-minutes: 10
```
4. ワークフローの依存関係を利用する
jobs:
setup:
runs-on: ubuntu-latest
test:
needs: setup
runs-on: ubuntu-latest
deploy:
needs: [setup, test]
runs-on: ubuntu-latest
<$details>
🔒 セキュリティのベストプラクティス
GitHub ワークフローを安全にする<$summary>
1. 設定を安全に保存する
- name: Setup Swarm
env:
SWARM_CONFIG: ${{ secrets.SWARM_CONFIG }}
API_KEY: ${{ secrets.API_KEY }}
run: |
npx ruv-swarm init --config "$SWARM_CONFIG"
2. OIDC 認証を使用する
permissions:
id-token: write
contents: read
- name: Configure AWS Credentials
uses: aws-actions$configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::123456789012:role/GitHubAction
aws-region: us-east-1
3. 最小権限を実装する
permissions:
contents: read
pull-requests: write
issues: write
4. スウォーム操作を監査する
- name: Audit Swarm Actions
run: |
npx ruv-swarm actions audit \
--export-logs \
--compliance-report
<$details>
⚡ パフォーマンス最適化
ワークフローのパフォーマンスを最大化する<$summary>
1. スウォームの依存関係をキャッシュする
- uses: actions$cache@v3
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
2. 適切なランナーサイズを使用する
jobs:
heavy-task:
runs-on: ubuntu-latest-4-cores
steps:
- name: Intensive Swarm Operation
3. 早期終了を実装する
- name: Quick Fail Check
run: |
if ! npx ruv-swarm actions pre-check; then
echo "Pre-check failed, terminating early"
exit 1
fi
4. 並列実行を最適化する
strategy:
matrix:
include:
- runner: ubuntu-latest
task: test
- runner: ubuntu-latest
task: lint
- runner: ubuntu-latest
task: security
max-parallel: 3
<$details>
デバッグとトラブルシューティング
🐛 デバッグツール
GitHub ワークフローの問題をデバッグする<$summary>
デバッグモード
- name: Debug Swarm
run: |
npx ruv-swarm actions debug \
--verbose \
--trace-agents \
--export-logs
env:
ACTIONS_STEP_DEBUG: true
パフォーマンスプロファイリング
# Profile workflow performance
npx ruv-swarm actions profile \
--workflow "ci.yml" \
--identify-slow-steps \
--suggest-optimizations
障害分析
# Analyze failed runs
gh run view <run-id> --json jobs,conclusion | \
npx ruv-swarm actions analyze-failure \
--suggest-fixes \
--auto-retry-flaky
ログ分析
# Download and analyze logs
gh run download <run-id>
npx ruv-swarm actions analyze-logs \
--directory .$logs \
--identify-errors
<$details>
実践的な例
🚀 完全なワークフロー
本番環境で使用可能な統合の例<$summary>
例 1: フルスタックアプリケーションの CI/CD
name: Full-Stack CI/CD with Swarms
on:
push:
branches: [main, develop]
pull_request:
jobs:
initialize:
runs-on: ubuntu-latest
outputs:
swarm-id: ${{ steps.init.outputs.swarm-id }}
steps:
- id: init
run: |
SWARM_ID=$(npx ruv-swarm init --topology mesh --output json | jq -r '.id')
echo "swarm-id=${SWARM_ID}" >> $GITHUB_OUTPUT
backend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Backend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run backend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
frontend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Frontend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run frontend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
security:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Security Scan
run: |
npx ruv-swarm agents spawn --type security \
--task "Security audit" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
deploy:
needs: [backend, frontend, security]
if: github.ref == 'refs$heads$main'
runs-on: ubuntu-latest
steps:
- name: Deploy
run: |
npx ruv-swarm actions deploy \
--strategy progressive \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
例 2: モノレポの管理
name: Monorepo Coordination
on: push
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.detect.outputs.packages }}
steps:
- uses: actions$checkout@v3
with:
fetch-depth: 0
- id: detect
run: |
PACKAGES=$(npx ruv-swarm actions detect-changes \
--monorepo \
--output json)
echo "packages=${PACKAGES}" >> $GITHUB_OUTPUT
build-packages:
needs: detect-changes
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(needs.detect-changes.outputs.packages) }}
steps:
- name: Build Package
run: |
npx ruv-swarm actions build \
--package ${{ matrix.package }} \
--parallel-deps
例 3: マルチリポジトリの同期
# Synchronize multiple repositories
npx claude-flow@alpha github sync-coordinator \
"Synchronize version updates across:
- github.com$org$repo-a
- github.com$org$repo-b
- github.com$org$repo-c
Update dependencies, align versions, create PRs"
<$details>
コマンドリファレンス
📚 クイックコマンドガイド
利用可能なすべてのコマンド<$summary>
ワークフロー生成
npx ruv-swarm actions generate-workflow [options]
--analyze-codebase Analyze repository structure
--detect-languages Detect programming languages
--create-optimal-pipeline Generate optimized workflow
最適化
npx ruv-swarm actions optimize [options]
--workflow <path> Path to workflow file
--suggest-parallelization Suggest parallel execution
--reduce-redundancy Remove redundant steps
--estimate-savings Estimate time$cost savings
分析
npx ruv-swarm actions analyze [options]
--commit <sha> Analyze specific commit
--suggest-tests Suggest test improvements
--optimize-pipeline Optimize pipeline structure
テスト
npx ruv-swarm actions smart-test [options]
--changed-files <files> Files that changed
--impact-analysis Analyze test impact
--parallel-safe Only parallel-safe tests
セキュリティ
npx ruv-swarm actions security [options]
--deep-scan Deep security analysis
--format <format> Output format (json$text)
--create-issues Auto-create GitHub issues
デプロイ
npx ruv-swarm actions deploy [options]
--strategy <type> Deployment strategy
--risk <level> Risk assessment level
--auto-execute Execute automatically
監視
npx ruv-swarm actions analytics [options]
--workflow <name> Workflow to analyze
--period <duration> Analysis period
--identify-bottlenecks Find bottlenecks
--suggest-improvements Improvement suggestions
<$details>
統合チェックリスト
✅ セットアップの検証
セットアップを検証する<$summary>
- GitHub CLI (
gh) がインストールされ、認証済みである
- Git がユーザー認証情報で設定されている
- Node.js v16+ がインストールされている
-
claude-flow@alpha パッケージが利用可能である
- リポジトリに
.github$workflows ディレクトリがある
- リポジトリで GitHub Actions が有効になっている
- 必要なシークレットが設定されている
- ランナーの権限が確認されている
クイックセットアップスクリプト
#!$bin$bash
# setup-github-automation.sh
# Install dependencies
npm install -g claude-flow@alpha
# Verify GitHub CLI
gh auth status || gh auth login
# Create workflow directory
mkdir -p .github$workflows
# Generate initial workflow
npx ruv-swarm actions generate-workflow \
--analyze-codebase \
--create-optimal-pipeline > .github$workflows$ci.yml
echo "✅ GitHub workflow automation setup complete"
<$details>
関連スキル
github-pr-enhancement - 高度な PR 管理
release-coordination - リリースの自動化
swarm-coordination - マルチエージェントのオーケストレーション
ci-cd-optimization - パイプラインの最適化
サポートとドキュメント
- GitHub CLI ドキュメント: https:/$cli.github.com$manual/
- GitHub Actions: https:/$docs.github.com$en$actions
- Claude-Flow: https:/$github.com$ruvnet$claude-flow
- Ruv-Swarm: https:/$github.com$ruvnet$ruv-swarm
バージョン履歴
- v1.0.0 (2025-01-19): スキルの初回統合
- workflow-automation.md (441 行) を統合
- github-modes.md (146 行) を統合
- 段階的開示を追加
- スウォーム連携パターンで強化
- 包括的な例とベストプラクティスを追加
スキルのステータス: ✅ 本番環境対応
最終更新: 2025-01-19
メンテナー: claude-flow チーム
# Start with a simple workflow
npx ruv-swarm actions generate-workflow \
--analyze-codebase \
--detect-languages \
--create-optimal-pipeline
# Optimize existing workflow
npx ruv-swarm actions optimize \
--workflow ".github$workflows$ci.yml" \
--suggest-parallelization
# Analyze failed runs
gh run view <run-id> --json jobs,conclusion | \
npx ruv-swarm actions analyze-failure \
--suggest-fixes
利用可能な GitHub 統合モード<$summary>
1. gh-coordinator
GitHub ワークフローのオーケストレーションと連携
- 連携モード: 階層型
- 最大並列操作数: 10
- バッチ最適化: はい
- 最適な用途: 複雑な GitHub ワークフロー、複数リポジトリ間の連携
# Usage example
npx claude-flow@alpha github gh-coordinator \
"Coordinate multi-repo release across 5 repositories"
2. pr-manager
プルリクエストの管理とレビューの連携
- レビューモード: 自動
- 複数レビュアー: はい
- 競合解決: インテリジェント
# Create PR with automated review
gh pr create --title "Feature: New capability" \
--body "Automated PR with swarm review" | \
npx ruv-swarm actions pr-validate \
--spawn-agents "linter,tester,security,docs"
3. issue-tracker
Issue 管理とプロジェクトの連携
- Issue ワークフロー: 自動
- ラベル管理: スマート
- 進捗追跡: リアルタイム
# Create coordinated issue workflow
npx claude-flow@alpha github issue-tracker \
"Manage sprint issues with automated tracking"
4. release-manager
リリースの連携とデプロイ
- リリースパイプライン: 自動
- バージョン管理: セマンティック
- デプロイ: 複数ステージ
# Automated release management
npx claude-flow@alpha github release-manager \
"Create v2.0.0 release with changelog and deployment"
5. repo-architect
リポジトリの構造と整理
- 構造の最適化: はい
- 複数リポジトリのサポート: はい
- テンプレート管理: 高度
# Optimize repository structure
npx claude-flow@alpha github repo-architect \
"Restructure monorepo with optimal organization"
6. code-reviewer
コードレビューと品質保証の自動化
- レビュー品質: 詳細
- セキュリティ分析: はい
- パフォーマンスチェック: 自動
# Automated code review
gh pr view 123 --json files | \
npx ruv-swarm actions pr-validate \
--deep-review \
--security-scan
7. ci-orchestrator
CI/CD パイプラインの連携
- パイプライン管理: 高度
- テスト連携: 並列
- デプロイ: 自動
# Orchestrate CI/CD pipeline
npx claude-flow@alpha github ci-orchestrator \
"Setup parallel test execution with smart caching"
8. security-guardian
セキュリティとコンプライアンスの管理
- セキュリティスキャン: 自動
- コンプライアンスチェック: 継続的
- 脆弱性管理: 先回り型
# Security audit
npx ruv-swarm actions security \
--deep-scan \
--compliance-check \
--create-issues
<$details>
🔧 ワークフローテンプレート
本番環境に対応した GitHub Actions テンプレート<$summary>
1. スウォームを活用したインテリジェント CI
# .github$workflows$swarm-ci.yml
name: Intelligent CI with Swarms
on: [push, pull_request]
jobs:
swarm-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Initialize Swarm
uses: ruvnet$swarm-action@v1
with:
topology: mesh
max-agents: 6
- name: Analyze Changes
run: |
npx ruv-swarm actions analyze \
--commit ${{ github.sha }} \
--suggest-tests \
--optimize-pipeline
2. 複数言語の検出
# .github$workflows$polyglot-swarm.yml
name: Polyglot Project Handler
on: push
jobs:
detect-and-build:
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Detect Languages
id: detect
run: |
npx ruv-swarm actions detect-stack \
--output json > stack.json
- name: Dynamic Build Matrix
run: |
npx ruv-swarm actions create-matrix \
--from stack.json \
--parallel-builds
3. 適応型セキュリティスキャン
# .github$workflows$security-swarm.yml
name: Intelligent Security Scan
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
security-swarm:
runs-on: ubuntu-latest
steps:
- name: Security Analysis Swarm
run: |
SECURITY_ISSUES=$(npx ruv-swarm actions security \
--deep-scan \
--format json)
echo "$SECURITY_ISSUES" | jq -r '.issues[]? | @base64' | while read -r issue; do
_jq() {
echo ${issue} | base64 --decode | jq -r ${1}
}
gh issue create \
--title "$(_jq '.title')" \
--body "$(_jq '.body')" \
--label "security,critical"
done
4. 自己修復型パイプライン
# .github$workflows$self-healing.yml
name: Self-Healing Pipeline
on: workflow_run
jobs:
heal-pipeline:
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
runs-on: ubuntu-latest
steps:
- name: Diagnose and Fix
run: |
npx ruv-swarm actions self-heal \
--run-id ${{ github.event.workflow_run.id }} \
--auto-fix-common \
--create-pr-complex
5. 段階的デプロイ
# .github$workflows$smart-deployment.yml
name: Smart Deployment
on:
push:
branches: [main]
jobs:
progressive-deploy:
runs-on: ubuntu-latest
steps:
- name: Analyze Risk
id: risk
run: |
npx ruv-swarm actions deploy-risk \
--changes ${{ github.sha }} \
--history 30d
- name: Choose Strategy
run: |
npx ruv-swarm actions deploy-strategy \
--risk ${{ steps.risk.outputs.level }} \
--auto-execute
6. パフォーマンスのリグレッション検出
# .github$workflows$performance-guard.yml
name: Performance Guard
on: pull_request
jobs:
perf-swarm:
runs-on: ubuntu-latest
steps:
- name: Performance Analysis
run: |
npx ruv-swarm actions perf-test \
--baseline main \
--threshold 10% \
--auto-profile-regression
7. PR 検証スウォーム
# .github$workflows$pr-validation.yml
name: PR Validation Swarm
on: pull_request
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Multi-Agent Validation
run: |
PR_DATA=$(gh pr view ${{ github.event.pull_request.number }} --json files,labels)
RESULTS=$(npx ruv-swarm actions pr-validate \
--spawn-agents "linter,tester,security,docs" \
--parallel \
--pr-data "$PR_DATA")
gh pr comment ${{ github.event.pull_request.number }} \
--body "$RESULTS"
8. インテリジェントリリース
# .github$workflows$intelligent-release.yml
name: Intelligent Release
on:
push:
tags: ['v*']
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Release Swarm
run: |
npx ruv-swarm actions release \
--analyze-changes \
--generate-notes \
--create-artifacts \
--publish-smart
<$details>
📊 モニタリングと分析
ワークフローの分析と最適化<$summary>
ワークフロー分析
# Analyze workflow performance
npx ruv-swarm actions analytics \
--workflow "ci.yml" \
--period 30d \
--identify-bottlenecks \
--suggest-improvements
コストの最適化
# Optimize GitHub Actions costs
npx ruv-swarm actions cost-optimize \
--analyze-usage \
--suggest-caching \
--recommend-self-hosted
失敗パターンの分析
# Identify failure patterns
npx ruv-swarm actions failure-patterns \
--period 90d \
--classify-failures \
--suggest-preventions
リソース管理
# Optimize resource usage
npx ruv-swarm actions resources \
--analyze-usage \
--suggest-runners \
--cost-optimize
<$details>
高度な機能
🧪 動的なテスト戦略
インテリジェントなテスト選択と実行<$summary>
スマートなテスト選択
# Automatically select relevant tests
- name: Swarm Test Selection
run: |
npx ruv-swarm actions smart-test \
--changed-files ${{ steps.files.outputs.all }} \
--impact-analysis \
--parallel-safe
動的なテストマトリックス
# Generate test matrix from code analysis
jobs:
generate-matrix:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
MATRIX=$(npx ruv-swarm actions test-matrix \
--detect-frameworks \
--optimize-coverage)
echo "matrix=${MATRIX}" >> $GITHUB_OUTPUT
test:
needs: generate-matrix
strategy:
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}}
インテリジェントな並列化
# Determine optimal parallelization
npx ruv-swarm actions parallel-strategy \
--analyze-dependencies \
--time-estimates \
--cost-aware
<$details>
🔮 予測分析
AI を活用したワークフローの予測<$summary>
失敗の予測
# Predict potential failures
npx ruv-swarm actions predict \
--analyze-history \
--identify-risks \
--suggest-preventive
ワークフローの推奨事項
# Get workflow recommendations
npx ruv-swarm actions recommend \
--analyze-repo \
--suggest-workflows \
--industry-best-practices
最適化の自動化
# Continuously optimize workflows
npx ruv-swarm actions auto-optimize \
--monitor-performance \
--apply-improvements \
--track-savings
<$details>
🎯 カスタムアクションの開発
独自のスウォームアクションを作成する<$summary>
カスタムスウォームアクションのテンプレート
// action.yml
name: 'Swarm Custom Action'
description: 'Custom swarm-powered action'
inputs:
task:
description: 'Task for swarm'
required: true
runs:
using: 'node16'
main: 'dist$index.js'
// index.js
const { SwarmAction } = require('ruv-swarm');
async function run() {
const swarm = new SwarmAction({
topology: 'mesh',
agents: ['analyzer', 'optimizer']
});
await swarm.execute(core.getInput('task'));
}
run().catch(error => core.setFailed(error.message));
<$details>
Claude-Flow との統合
🔄 スウォーム連携パターン
MCP ベースの GitHub ワークフロー連携<$summary>
GitHub スウォームを初期化する
// Step 1: Initialize swarm coordination
mcp__claude-flow__swarm_init {
topology: "hierarchical",
maxAgents: 8
}
// Step 2: Spawn specialized agents
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" }
mcp__claude-flow__agent_spawn { type: "analyst", name: "Security Analyst" }
// Step 3: Orchestrate GitHub workflow
mcp__claude-flow__task_orchestrate {
task: "Complete PR review and merge workflow",
strategy: "parallel",
priority: "high"
}
GitHub フックとの統合
# Pre-task: Setup GitHub context
npx claude-flow@alpha hooks pre-task \
--description "PR review workflow" \
--context "pr-123"
# During task: Track progress
npx claude-flow@alpha hooks notify \
--message "Completed security scan" \
--type "github-action"
# Post-task: Export results
npx claude-flow@alpha hooks post-task \
--task-id "pr-review-123" \
--export-github-summary
<$details>
📦 バッチ操作
GitHub 操作の並行実行<$summary>
GitHub CLI コマンドの並列実行
// Single message with all GitHub operations
[Concurrent Execution]:
Bash("gh issue create --title 'Feature A' --body 'Description A' --label 'enhancement'")
Bash("gh issue create --title 'Feature B' --body 'Description B' --label 'enhancement'")
Bash("gh pr create --title 'PR 1' --head 'feature-a' --base 'main'")
Bash("gh pr create --title 'PR 2' --head 'feature-b' --base 'main'")
Bash("gh pr checks 123 --watch")
TodoWrite { todos: [
{content: "Review security scan results", status: "pending"},
{content: "Merge approved PRs", status: "pending"},
{content: "Update changelog", status: "pending"}
]}
<$details>
ベストプラクティス
🏗️ ワークフローの整理
GitHub ワークフローを構成する<$summary>
1. 再利用可能なワークフローを使用する
# .github$workflows$reusable-swarm.yml
name: Reusable Swarm Workflow
on:
workflow_call:
inputs:
topology:
required: true
type: string
jobs:
swarm-task:
runs-on: ubuntu-latest
steps:
- name: Initialize Swarm
run: |
npx ruv-swarm init --topology ${{ inputs.topology }}
2. 適切なキャッシュを実装する
- name: Cache Swarm Dependencies
uses: actions$cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
#### 3. 適切なタイムアウトを設定する
```yaml
jobs:
swarm-task:
timeout-minutes: 30
steps:
- name: Swarm Operation
timeout-minutes: 10
```
4. ワークフローの依存関係を利用する
jobs:
setup:
runs-on: ubuntu-latest
test:
needs: setup
runs-on: ubuntu-latest
deploy:
needs: [setup, test]
runs-on: ubuntu-latest
<$details>
🔒 セキュリティのベストプラクティス
GitHub ワークフローを安全にする<$summary>
1. 設定を安全に保存する
- name: Setup Swarm
env:
SWARM_CONFIG: ${{ secrets.SWARM_CONFIG }}
API_KEY: ${{ secrets.API_KEY }}
run: |
npx ruv-swarm init --config "$SWARM_CONFIG"
2. OIDC 認証を使用する
permissions:
id-token: write
contents: read
- name: Configure AWS Credentials
uses: aws-actions$configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::123456789012:role/GitHubAction
aws-region: us-east-1
3. 最小権限を実装する
permissions:
contents: read
pull-requests: write
issues: write
4. スウォーム操作を監査する
- name: Audit Swarm Actions
run: |
npx ruv-swarm actions audit \
--export-logs \
--compliance-report
<$details>
⚡ パフォーマンス最適化
ワークフローのパフォーマンスを最大化する<$summary>
1. スウォームの依存関係をキャッシュする
- uses: actions$cache@v3
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
2. 適切なランナーサイズを使用する
jobs:
heavy-task:
runs-on: ubuntu-latest-4-cores
steps:
- name: Intensive Swarm Operation
3. 早期終了を実装する
- name: Quick Fail Check
run: |
if ! npx ruv-swarm actions pre-check; then
echo "Pre-check failed, terminating early"
exit 1
fi
4. 並列実行を最適化する
strategy:
matrix:
include:
- runner: ubuntu-latest
task: test
- runner: ubuntu-latest
task: lint
- runner: ubuntu-latest
task: security
max-parallel: 3
<$details>
デバッグとトラブルシューティング
🐛 デバッグツール
GitHub ワークフローの問題をデバッグする<$summary>
デバッグモード
- name: Debug Swarm
run: |
npx ruv-swarm actions debug \
--verbose \
--trace-agents \
--export-logs
env:
ACTIONS_STEP_DEBUG: true
パフォーマンスプロファイリング
# Profile workflow performance
npx ruv-swarm actions profile \
--workflow "ci.yml" \
--identify-slow-steps \
--suggest-optimizations
障害分析
# Analyze failed runs
gh run view <run-id> --json jobs,conclusion | \
npx ruv-swarm actions analyze-failure \
--suggest-fixes \
--auto-retry-flaky
ログ分析
# Download and analyze logs
gh run download <run-id>
npx ruv-swarm actions analyze-logs \
--directory .$logs \
--identify-errors
<$details>
実践的な例
🚀 完全なワークフロー
本番環境で使用可能な統合の例<$summary>
例 1: フルスタックアプリケーションの CI/CD
name: Full-Stack CI/CD with Swarms
on:
push:
branches: [main, develop]
pull_request:
jobs:
initialize:
runs-on: ubuntu-latest
outputs:
swarm-id: ${{ steps.init.outputs.swarm-id }}
steps:
- id: init
run: |
SWARM_ID=$(npx ruv-swarm init --topology mesh --output json | jq -r '.id')
echo "swarm-id=${SWARM_ID}" >> $GITHUB_OUTPUT
backend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Backend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run backend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
frontend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Frontend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run frontend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
security:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Security Scan
run: |
npx ruv-swarm agents spawn --type security \
--task "Security audit" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
deploy:
needs: [backend, frontend, security]
if: github.ref == 'refs$heads$main'
runs-on: ubuntu-latest
steps:
- name: Deploy
run: |
npx ruv-swarm actions deploy \
--strategy progressive \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
例 2: モノレポの管理
name: Monorepo Coordination
on: push
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.detect.outputs.packages }}
steps:
- uses: actions$checkout@v3
with:
fetch-depth: 0
- id: detect
run: |
PACKAGES=$(npx ruv-swarm actions detect-changes \
--monorepo \
--output json)
echo "packages=${PACKAGES}" >> $GITHUB_OUTPUT
build-packages:
needs: detect-changes
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(needs.detect-changes.outputs.packages) }}
steps:
- name: Build Package
run: |
npx ruv-swarm actions build \
--package ${{ matrix.package }} \
--parallel-deps
例 3: マルチリポジトリの同期
# Synchronize multiple repositories
npx claude-flow@alpha github sync-coordinator \
"Synchronize version updates across:
- github.com$org$repo-a
- github.com$org$repo-b
- github.com$org$repo-c
Update dependencies, align versions, create PRs"
<$details>
コマンドリファレンス
📚 クイックコマンドガイド
利用可能なすべてのコマンド<$summary>
ワークフロー生成
npx ruv-swarm actions generate-workflow [options]
--analyze-codebase Analyze repository structure
--detect-languages Detect programming languages
--create-optimal-pipeline Generate optimized workflow
最適化
npx ruv-swarm actions optimize [options]
--workflow <path> Path to workflow file
--suggest-parallelization Suggest parallel execution
--reduce-redundancy Remove redundant steps
--estimate-savings Estimate time$cost savings
分析
npx ruv-swarm actions analyze [options]
--commit <sha> Analyze specific commit
--suggest-tests Suggest test improvements
--optimize-pipeline Optimize pipeline structure
テスト
npx ruv-swarm actions smart-test [options]
--changed-files <files> Files that changed
--impact-analysis Analyze test impact
--parallel-safe Only parallel-safe tests
セキュリティ
npx ruv-swarm actions security [options]
--deep-scan Deep security analysis
--format <format> Output format (json$text)
--create-issues Auto-create GitHub issues
デプロイ
npx ruv-swarm actions deploy [options]
--strategy <type> Deployment strategy
--risk <level> Risk assessment level
--auto-execute Execute automatically
監視
npx ruv-swarm actions analytics [options]
--workflow <name> Workflow to analyze
--period <duration> Analysis period
--identify-bottlenecks Find bottlenecks
--suggest-improvements Improvement suggestions
<$details>
統合チェックリスト
✅ セットアップの検証
セットアップを検証する<$summary>
- GitHub CLI (
gh) がインストールされ、認証済みである
- Git がユーザー認証情報で設定されている
- Node.js v16+ がインストールされている
-
claude-flow@alpha パッケージが利用可能である
- リポジトリに
.github$workflows ディレクトリがある
- リポジトリで GitHub Actions が有効になっている
- 必要なシークレットが設定されている
- ランナーの権限が確認されている
クイックセットアップスクリプト
#!$bin$bash
# setup-github-automation.sh
# Install dependencies
npm install -g claude-flow@alpha
# Verify GitHub CLI
gh auth status || gh auth login
# Create workflow directory
mkdir -p .github$workflows
# Generate initial workflow
npx ruv-swarm actions generate-workflow \
--analyze-codebase \
--create-optimal-pipeline > .github$workflows$ci.yml
echo "✅ GitHub workflow automation setup complete"
<$details>
関連スキル
github-pr-enhancement - 高度な PR 管理
release-coordination - リリースの自動化
swarm-coordination - マルチエージェントのオーケストレーション
ci-cd-optimization - パイプラインの最適化
サポートとドキュメント
- GitHub CLI ドキュメント: https:/$cli.github.com$manual/
- GitHub Actions: https:/$docs.github.com$en$actions
- Claude-Flow: https:/$github.com$ruvnet$claude-flow
- Ruv-Swarm: https:/$github.com$ruvnet$ruv-swarm
バージョン履歴
- v1.0.0 (2025-01-19): スキルの初回統合
- workflow-automation.md (441 行) を統合
- github-modes.md (146 行) を統合
- 段階的開示を追加
- スウォーム連携パターンで強化
- 包括的な例とベストプラクティスを追加
スキルのステータス: ✅ 本番環境対応
最終更新: 2025-01-19
メンテナー: claude-flow チーム
# Usage example
npx claude-flow@alpha github gh-coordinator \
"Coordinate multi-repo release across 5 repositories"
# Create PR with automated review
gh pr create --title "Feature: New capability" \
--body "Automated PR with swarm review" | \
npx ruv-swarm actions pr-validate \
--spawn-agents "linter,tester,security,docs"
# Create coordinated issue workflow
npx claude-flow@alpha github issue-tracker \
"Manage sprint issues with automated tracking"
# Automated release management
npx claude-flow@alpha github release-manager \
"Create v2.0.0 release with changelog and deployment"
# Optimize repository structure
npx claude-flow@alpha github repo-architect \
"Restructure monorepo with optimal organization"
# Automated code review
gh pr view 123 --json files | \
npx ruv-swarm actions pr-validate \
--deep-review \
--security-scan
# Orchestrate CI/CD pipeline
npx claude-flow@alpha github ci-orchestrator \
"Setup parallel test execution with smart caching"
# Security audit
npx ruv-swarm actions security \
--deep-scan \
--compliance-check \
--create-issues
本番環境に対応した GitHub Actions テンプレート<$summary>
1. スウォームを活用したインテリジェント CI
# .github$workflows$swarm-ci.yml
name: Intelligent CI with Swarms
on: [push, pull_request]
jobs:
swarm-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Initialize Swarm
uses: ruvnet$swarm-action@v1
with:
topology: mesh
max-agents: 6
- name: Analyze Changes
run: |
npx ruv-swarm actions analyze \
--commit ${{ github.sha }} \
--suggest-tests \
--optimize-pipeline
2. 複数言語の検出
# .github$workflows$polyglot-swarm.yml
name: Polyglot Project Handler
on: push
jobs:
detect-and-build:
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Detect Languages
id: detect
run: |
npx ruv-swarm actions detect-stack \
--output json > stack.json
- name: Dynamic Build Matrix
run: |
npx ruv-swarm actions create-matrix \
--from stack.json \
--parallel-builds
3. 適応型セキュリティスキャン
# .github$workflows$security-swarm.yml
name: Intelligent Security Scan
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
security-swarm:
runs-on: ubuntu-latest
steps:
- name: Security Analysis Swarm
run: |
SECURITY_ISSUES=$(npx ruv-swarm actions security \
--deep-scan \
--format json)
echo "$SECURITY_ISSUES" | jq -r '.issues[]? | @base64' | while read -r issue; do
_jq() {
echo ${issue} | base64 --decode | jq -r ${1}
}
gh issue create \
--title "$(_jq '.title')" \
--body "$(_jq '.body')" \
--label "security,critical"
done
4. 自己修復型パイプライン
# .github$workflows$self-healing.yml
name: Self-Healing Pipeline
on: workflow_run
jobs:
heal-pipeline:
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
runs-on: ubuntu-latest
steps:
- name: Diagnose and Fix
run: |
npx ruv-swarm actions self-heal \
--run-id ${{ github.event.workflow_run.id }} \
--auto-fix-common \
--create-pr-complex
5. 段階的デプロイ
# .github$workflows$smart-deployment.yml
name: Smart Deployment
on:
push:
branches: [main]
jobs:
progressive-deploy:
runs-on: ubuntu-latest
steps:
- name: Analyze Risk
id: risk
run: |
npx ruv-swarm actions deploy-risk \
--changes ${{ github.sha }} \
--history 30d
- name: Choose Strategy
run: |
npx ruv-swarm actions deploy-strategy \
--risk ${{ steps.risk.outputs.level }} \
--auto-execute
6. パフォーマンスのリグレッション検出
# .github$workflows$performance-guard.yml
name: Performance Guard
on: pull_request
jobs:
perf-swarm:
runs-on: ubuntu-latest
steps:
- name: Performance Analysis
run: |
npx ruv-swarm actions perf-test \
--baseline main \
--threshold 10% \
--auto-profile-regression
7. PR 検証スウォーム
# .github$workflows$pr-validation.yml
name: PR Validation Swarm
on: pull_request
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Multi-Agent Validation
run: |
PR_DATA=$(gh pr view ${{ github.event.pull_request.number }} --json files,labels)
RESULTS=$(npx ruv-swarm actions pr-validate \
--spawn-agents "linter,tester,security,docs" \
--parallel \
--pr-data "$PR_DATA")
gh pr comment ${{ github.event.pull_request.number }} \
--body "$RESULTS"
8. インテリジェントリリース
# .github$workflows$intelligent-release.yml
name: Intelligent Release
on:
push:
tags: ['v*']
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Release Swarm
run: |
npx ruv-swarm actions release \
--analyze-changes \
--generate-notes \
--create-artifacts \
--publish-smart
<$details>
📊 モニタリングと分析
ワークフローの分析と最適化<$summary>
ワークフロー分析
# Analyze workflow performance
npx ruv-swarm actions analytics \
--workflow "ci.yml" \
--period 30d \
--identify-bottlenecks \
--suggest-improvements
コストの最適化
# Optimize GitHub Actions costs
npx ruv-swarm actions cost-optimize \
--analyze-usage \
--suggest-caching \
--recommend-self-hosted
失敗パターンの分析
# Identify failure patterns
npx ruv-swarm actions failure-patterns \
--period 90d \
--classify-failures \
--suggest-preventions
リソース管理
# Optimize resource usage
npx ruv-swarm actions resources \
--analyze-usage \
--suggest-runners \
--cost-optimize
<$details>
高度な機能
🧪 動的なテスト戦略
インテリジェントなテスト選択と実行<$summary>
スマートなテスト選択
# Automatically select relevant tests
- name: Swarm Test Selection
run: |
npx ruv-swarm actions smart-test \
--changed-files ${{ steps.files.outputs.all }} \
--impact-analysis \
--parallel-safe
動的なテストマトリックス
# Generate test matrix from code analysis
jobs:
generate-matrix:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
MATRIX=$(npx ruv-swarm actions test-matrix \
--detect-frameworks \
--optimize-coverage)
echo "matrix=${MATRIX}" >> $GITHUB_OUTPUT
test:
needs: generate-matrix
strategy:
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}}
インテリジェントな並列化
# Determine optimal parallelization
npx ruv-swarm actions parallel-strategy \
--analyze-dependencies \
--time-estimates \
--cost-aware
<$details>
🔮 予測分析
AI を活用したワークフローの予測<$summary>
失敗の予測
# Predict potential failures
npx ruv-swarm actions predict \
--analyze-history \
--identify-risks \
--suggest-preventive
ワークフローの推奨事項
# Get workflow recommendations
npx ruv-swarm actions recommend \
--analyze-repo \
--suggest-workflows \
--industry-best-practices
最適化の自動化
# Continuously optimize workflows
npx ruv-swarm actions auto-optimize \
--monitor-performance \
--apply-improvements \
--track-savings
<$details>
🎯 カスタムアクションの開発
独自のスウォームアクションを作成する<$summary>
カスタムスウォームアクションのテンプレート
// action.yml
name: 'Swarm Custom Action'
description: 'Custom swarm-powered action'
inputs:
task:
description: 'Task for swarm'
required: true
runs:
using: 'node16'
main: 'dist$index.js'
// index.js
const { SwarmAction } = require('ruv-swarm');
async function run() {
const swarm = new SwarmAction({
topology: 'mesh',
agents: ['analyzer', 'optimizer']
});
await swarm.execute(core.getInput('task'));
}
run().catch(error => core.setFailed(error.message));
<$details>
Claude-Flow との統合
🔄 スウォーム連携パターン
MCP ベースの GitHub ワークフロー連携<$summary>
GitHub スウォームを初期化する
// Step 1: Initialize swarm coordination
mcp__claude-flow__swarm_init {
topology: "hierarchical",
maxAgents: 8
}
// Step 2: Spawn specialized agents
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" }
mcp__claude-flow__agent_spawn { type: "analyst", name: "Security Analyst" }
// Step 3: Orchestrate GitHub workflow
mcp__claude-flow__task_orchestrate {
task: "Complete PR review and merge workflow",
strategy: "parallel",
priority: "high"
}
GitHub フックとの統合
# Pre-task: Setup GitHub context
npx claude-flow@alpha hooks pre-task \
--description "PR review workflow" \
--context "pr-123"
# During task: Track progress
npx claude-flow@alpha hooks notify \
--message "Completed security scan" \
--type "github-action"
# Post-task: Export results
npx claude-flow@alpha hooks post-task \
--task-id "pr-review-123" \
--export-github-summary
<$details>
📦 バッチ操作
GitHub 操作の並行実行<$summary>
GitHub CLI コマンドの並列実行
// Single message with all GitHub operations
[Concurrent Execution]:
Bash("gh issue create --title 'Feature A' --body 'Description A' --label 'enhancement'")
Bash("gh issue create --title 'Feature B' --body 'Description B' --label 'enhancement'")
Bash("gh pr create --title 'PR 1' --head 'feature-a' --base 'main'")
Bash("gh pr create --title 'PR 2' --head 'feature-b' --base 'main'")
Bash("gh pr checks 123 --watch")
TodoWrite { todos: [
{content: "Review security scan results", status: "pending"},
{content: "Merge approved PRs", status: "pending"},
{content: "Update changelog", status: "pending"}
]}
<$details>
ベストプラクティス
🏗️ ワークフローの整理
GitHub ワークフローを構成する<$summary>
1. 再利用可能なワークフローを使用する
# .github$workflows$reusable-swarm.yml
name: Reusable Swarm Workflow
on:
workflow_call:
inputs:
topology:
required: true
type: string
jobs:
swarm-task:
runs-on: ubuntu-latest
steps:
- name: Initialize Swarm
run: |
npx ruv-swarm init --topology ${{ inputs.topology }}
2. 適切なキャッシュを実装する
- name: Cache Swarm Dependencies
uses: actions$cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
#### 3. 適切なタイムアウトを設定する
```yaml
jobs:
swarm-task:
timeout-minutes: 30
steps:
- name: Swarm Operation
timeout-minutes: 10
```
4. ワークフローの依存関係を利用する
jobs:
setup:
runs-on: ubuntu-latest
test:
needs: setup
runs-on: ubuntu-latest
deploy:
needs: [setup, test]
runs-on: ubuntu-latest
<$details>
🔒 セキュリティのベストプラクティス
GitHub ワークフローを安全にする<$summary>
1. 設定を安全に保存する
- name: Setup Swarm
env:
SWARM_CONFIG: ${{ secrets.SWARM_CONFIG }}
API_KEY: ${{ secrets.API_KEY }}
run: |
npx ruv-swarm init --config "$SWARM_CONFIG"
2. OIDC 認証を使用する
permissions:
id-token: write
contents: read
- name: Configure AWS Credentials
uses: aws-actions$configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::123456789012:role/GitHubAction
aws-region: us-east-1
3. 最小権限を実装する
permissions:
contents: read
pull-requests: write
issues: write
4. スウォーム操作を監査する
- name: Audit Swarm Actions
run: |
npx ruv-swarm actions audit \
--export-logs \
--compliance-report
<$details>
⚡ パフォーマンス最適化
ワークフローのパフォーマンスを最大化する<$summary>
1. スウォームの依存関係をキャッシュする
- uses: actions$cache@v3
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
2. 適切なランナーサイズを使用する
jobs:
heavy-task:
runs-on: ubuntu-latest-4-cores
steps:
- name: Intensive Swarm Operation
3. 早期終了を実装する
- name: Quick Fail Check
run: |
if ! npx ruv-swarm actions pre-check; then
echo "Pre-check failed, terminating early"
exit 1
fi
4. 並列実行を最適化する
strategy:
matrix:
include:
- runner: ubuntu-latest
task: test
- runner: ubuntu-latest
task: lint
- runner: ubuntu-latest
task: security
max-parallel: 3
<$details>
デバッグとトラブルシューティング
🐛 デバッグツール
GitHub ワークフローの問題をデバッグする<$summary>
デバッグモード
- name: Debug Swarm
run: |
npx ruv-swarm actions debug \
--verbose \
--trace-agents \
--export-logs
env:
ACTIONS_STEP_DEBUG: true
パフォーマンスプロファイリング
# Profile workflow performance
npx ruv-swarm actions profile \
--workflow "ci.yml" \
--identify-slow-steps \
--suggest-optimizations
障害分析
# Analyze failed runs
gh run view <run-id> --json jobs,conclusion | \
npx ruv-swarm actions analyze-failure \
--suggest-fixes \
--auto-retry-flaky
ログ分析
# Download and analyze logs
gh run download <run-id>
npx ruv-swarm actions analyze-logs \
--directory .$logs \
--identify-errors
<$details>
実践的な例
🚀 完全なワークフロー
本番環境で使用可能な統合の例<$summary>
例 1: フルスタックアプリケーションの CI/CD
name: Full-Stack CI/CD with Swarms
on:
push:
branches: [main, develop]
pull_request:
jobs:
initialize:
runs-on: ubuntu-latest
outputs:
swarm-id: ${{ steps.init.outputs.swarm-id }}
steps:
- id: init
run: |
SWARM_ID=$(npx ruv-swarm init --topology mesh --output json | jq -r '.id')
echo "swarm-id=${SWARM_ID}" >> $GITHUB_OUTPUT
backend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Backend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run backend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
frontend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Frontend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run frontend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
security:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Security Scan
run: |
npx ruv-swarm agents spawn --type security \
--task "Security audit" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
deploy:
needs: [backend, frontend, security]
if: github.ref == 'refs$heads$main'
runs-on: ubuntu-latest
steps:
- name: Deploy
run: |
npx ruv-swarm actions deploy \
--strategy progressive \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
例 2: モノレポの管理
name: Monorepo Coordination
on: push
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.detect.outputs.packages }}
steps:
- uses: actions$checkout@v3
with:
fetch-depth: 0
- id: detect
run: |
PACKAGES=$(npx ruv-swarm actions detect-changes \
--monorepo \
--output json)
echo "packages=${PACKAGES}" >> $GITHUB_OUTPUT
build-packages:
needs: detect-changes
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(needs.detect-changes.outputs.packages) }}
steps:
- name: Build Package
run: |
npx ruv-swarm actions build \
--package ${{ matrix.package }} \
--parallel-deps
例 3: マルチリポジトリの同期
# Synchronize multiple repositories
npx claude-flow@alpha github sync-coordinator \
"Synchronize version updates across:
- github.com$org$repo-a
- github.com$org$repo-b
- github.com$org$repo-c
Update dependencies, align versions, create PRs"
<$details>
コマンドリファレンス
📚 クイックコマンドガイド
利用可能なすべてのコマンド<$summary>
ワークフロー生成
npx ruv-swarm actions generate-workflow [options]
--analyze-codebase Analyze repository structure
--detect-languages Detect programming languages
--create-optimal-pipeline Generate optimized workflow
最適化
npx ruv-swarm actions optimize [options]
--workflow <path> Path to workflow file
--suggest-parallelization Suggest parallel execution
--reduce-redundancy Remove redundant steps
--estimate-savings Estimate time$cost savings
分析
npx ruv-swarm actions analyze [options]
--commit <sha> Analyze specific commit
--suggest-tests Suggest test improvements
--optimize-pipeline Optimize pipeline structure
テスト
npx ruv-swarm actions smart-test [options]
--changed-files <files> Files that changed
--impact-analysis Analyze test impact
--parallel-safe Only parallel-safe tests
セキュリティ
npx ruv-swarm actions security [options]
--deep-scan Deep security analysis
--format <format> Output format (json$text)
--create-issues Auto-create GitHub issues
デプロイ
npx ruv-swarm actions deploy [options]
--strategy <type> Deployment strategy
--risk <level> Risk assessment level
--auto-execute Execute automatically
監視
npx ruv-swarm actions analytics [options]
--workflow <name> Workflow to analyze
--period <duration> Analysis period
--identify-bottlenecks Find bottlenecks
--suggest-improvements Improvement suggestions
<$details>
統合チェックリスト
✅ セットアップの検証
セットアップを検証する<$summary>
- GitHub CLI (
gh) がインストールされ、認証済みである
- Git がユーザー認証情報で設定されている
- Node.js v16+ がインストールされている
-
claude-flow@alpha パッケージが利用可能である
- リポジトリに
.github$workflows ディレクトリがある
- リポジトリで GitHub Actions が有効になっている
- 必要なシークレットが設定されている
- ランナーの権限が確認されている
クイックセットアップスクリプト
#!$bin$bash
# setup-github-automation.sh
# Install dependencies
npm install -g claude-flow@alpha
# Verify GitHub CLI
gh auth status || gh auth login
# Create workflow directory
mkdir -p .github$workflows
# Generate initial workflow
npx ruv-swarm actions generate-workflow \
--analyze-codebase \
--create-optimal-pipeline > .github$workflows$ci.yml
echo "✅ GitHub workflow automation setup complete"
<$details>
関連スキル
github-pr-enhancement - 高度な PR 管理
release-coordination - リリースの自動化
swarm-coordination - マルチエージェントのオーケストレーション
ci-cd-optimization - パイプラインの最適化
サポートとドキュメント
- GitHub CLI ドキュメント: https:/$cli.github.com$manual/
- GitHub Actions: https:/$docs.github.com$en$actions
- Claude-Flow: https:/$github.com$ruvnet$claude-flow
- Ruv-Swarm: https:/$github.com$ruvnet$ruv-swarm
バージョン履歴
- v1.0.0 (2025-01-19): スキルの初回統合
- workflow-automation.md (441 行) を統合
- github-modes.md (146 行) を統合
- 段階的開示を追加
- スウォーム連携パターンで強化
- 包括的な例とベストプラクティスを追加
スキルのステータス: ✅ 本番環境対応
最終更新: 2025-01-19
メンテナー: claude-flow チーム
# .github$workflows$swarm-ci.yml
name: Intelligent CI with Swarms
on: [push, pull_request]
jobs:
swarm-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Initialize Swarm
uses: ruvnet$swarm-action@v1
with:
topology: mesh
max-agents: 6
- name: Analyze Changes
run: |
npx ruv-swarm actions analyze \
--commit ${{ github.sha }} \
--suggest-tests \
--optimize-pipeline
# .github$workflows$polyglot-swarm.yml
name: Polyglot Project Handler
on: push
jobs:
detect-and-build:
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Detect Languages
id: detect
run: |
npx ruv-swarm actions detect-stack \
--output json > stack.json
- name: Dynamic Build Matrix
run: |
npx ruv-swarm actions create-matrix \
--from stack.json \
--parallel-builds
# .github$workflows$security-swarm.yml
name: Intelligent Security Scan
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
security-swarm:
runs-on: ubuntu-latest
steps:
- name: Security Analysis Swarm
run: |
SECURITY_ISSUES=$(npx ruv-swarm actions security \
--deep-scan \
--format json)
echo "$SECURITY_ISSUES" | jq -r '.issues[]? | @base64' | while read -r issue; do
_jq() {
echo ${issue} | base64 --decode | jq -r ${1}
}
gh issue create \
--title "$(_jq '.title')" \
--body "$(_jq '.body')" \
--label "security,critical"
done
# .github$workflows$self-healing.yml
name: Self-Healing Pipeline
on: workflow_run
jobs:
heal-pipeline:
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
runs-on: ubuntu-latest
steps:
- name: Diagnose and Fix
run: |
npx ruv-swarm actions self-heal \
--run-id ${{ github.event.workflow_run.id }} \
--auto-fix-common \
--create-pr-complex
# .github$workflows$smart-deployment.yml
name: Smart Deployment
on:
push:
branches: [main]
jobs:
progressive-deploy:
runs-on: ubuntu-latest
steps:
- name: Analyze Risk
id: risk
run: |
npx ruv-swarm actions deploy-risk \
--changes ${{ github.sha }} \
--history 30d
- name: Choose Strategy
run: |
npx ruv-swarm actions deploy-strategy \
--risk ${{ steps.risk.outputs.level }} \
--auto-execute
# .github$workflows$performance-guard.yml
name: Performance Guard
on: pull_request
jobs:
perf-swarm:
runs-on: ubuntu-latest
steps:
- name: Performance Analysis
run: |
npx ruv-swarm actions perf-test \
--baseline main \
--threshold 10% \
--auto-profile-regression
# .github$workflows$pr-validation.yml
name: PR Validation Swarm
on: pull_request
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Multi-Agent Validation
run: |
PR_DATA=$(gh pr view ${{ github.event.pull_request.number }} --json files,labels)
RESULTS=$(npx ruv-swarm actions pr-validate \
--spawn-agents "linter,tester,security,docs" \
--parallel \
--pr-data "$PR_DATA")
gh pr comment ${{ github.event.pull_request.number }} \
--body "$RESULTS"
# .github$workflows$intelligent-release.yml
name: Intelligent Release
on:
push:
tags: ['v*']
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Release Swarm
run: |
npx ruv-swarm actions release \
--analyze-changes \
--generate-notes \
--create-artifacts \
--publish-smart
ワークフローの分析と最適化<$summary>
ワークフロー分析
# Analyze workflow performance
npx ruv-swarm actions analytics \
--workflow "ci.yml" \
--period 30d \
--identify-bottlenecks \
--suggest-improvements
コストの最適化
# Optimize GitHub Actions costs
npx ruv-swarm actions cost-optimize \
--analyze-usage \
--suggest-caching \
--recommend-self-hosted
失敗パターンの分析
# Identify failure patterns
npx ruv-swarm actions failure-patterns \
--period 90d \
--classify-failures \
--suggest-preventions
リソース管理
# Optimize resource usage
npx ruv-swarm actions resources \
--analyze-usage \
--suggest-runners \
--cost-optimize
<$details>
高度な機能
🧪 動的なテスト戦略
インテリジェントなテスト選択と実行<$summary>
スマートなテスト選択
# Automatically select relevant tests
- name: Swarm Test Selection
run: |
npx ruv-swarm actions smart-test \
--changed-files ${{ steps.files.outputs.all }} \
--impact-analysis \
--parallel-safe
動的なテストマトリックス
# Generate test matrix from code analysis
jobs:
generate-matrix:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
MATRIX=$(npx ruv-swarm actions test-matrix \
--detect-frameworks \
--optimize-coverage)
echo "matrix=${MATRIX}" >> $GITHUB_OUTPUT
test:
needs: generate-matrix
strategy:
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}}
インテリジェントな並列化
# Determine optimal parallelization
npx ruv-swarm actions parallel-strategy \
--analyze-dependencies \
--time-estimates \
--cost-aware
<$details>
🔮 予測分析
AI を活用したワークフローの予測<$summary>
失敗の予測
# Predict potential failures
npx ruv-swarm actions predict \
--analyze-history \
--identify-risks \
--suggest-preventive
ワークフローの推奨事項
# Get workflow recommendations
npx ruv-swarm actions recommend \
--analyze-repo \
--suggest-workflows \
--industry-best-practices
最適化の自動化
# Continuously optimize workflows
npx ruv-swarm actions auto-optimize \
--monitor-performance \
--apply-improvements \
--track-savings
<$details>
🎯 カスタムアクションの開発
独自のスウォームアクションを作成する<$summary>
カスタムスウォームアクションのテンプレート
// action.yml
name: 'Swarm Custom Action'
description: 'Custom swarm-powered action'
inputs:
task:
description: 'Task for swarm'
required: true
runs:
using: 'node16'
main: 'dist$index.js'
// index.js
const { SwarmAction } = require('ruv-swarm');
async function run() {
const swarm = new SwarmAction({
topology: 'mesh',
agents: ['analyzer', 'optimizer']
});
await swarm.execute(core.getInput('task'));
}
run().catch(error => core.setFailed(error.message));
<$details>
Claude-Flow との統合
🔄 スウォーム連携パターン
MCP ベースの GitHub ワークフロー連携<$summary>
GitHub スウォームを初期化する
// Step 1: Initialize swarm coordination
mcp__claude-flow__swarm_init {
topology: "hierarchical",
maxAgents: 8
}
// Step 2: Spawn specialized agents
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" }
mcp__claude-flow__agent_spawn { type: "analyst", name: "Security Analyst" }
// Step 3: Orchestrate GitHub workflow
mcp__claude-flow__task_orchestrate {
task: "Complete PR review and merge workflow",
strategy: "parallel",
priority: "high"
}
GitHub フックとの統合
# Pre-task: Setup GitHub context
npx claude-flow@alpha hooks pre-task \
--description "PR review workflow" \
--context "pr-123"
# During task: Track progress
npx claude-flow@alpha hooks notify \
--message "Completed security scan" \
--type "github-action"
# Post-task: Export results
npx claude-flow@alpha hooks post-task \
--task-id "pr-review-123" \
--export-github-summary
<$details>
📦 バッチ操作
GitHub 操作の並行実行<$summary>
GitHub CLI コマンドの並列実行
// Single message with all GitHub operations
[Concurrent Execution]:
Bash("gh issue create --title 'Feature A' --body 'Description A' --label 'enhancement'")
Bash("gh issue create --title 'Feature B' --body 'Description B' --label 'enhancement'")
Bash("gh pr create --title 'PR 1' --head 'feature-a' --base 'main'")
Bash("gh pr create --title 'PR 2' --head 'feature-b' --base 'main'")
Bash("gh pr checks 123 --watch")
TodoWrite { todos: [
{content: "Review security scan results", status: "pending"},
{content: "Merge approved PRs", status: "pending"},
{content: "Update changelog", status: "pending"}
]}
<$details>
ベストプラクティス
🏗️ ワークフローの整理
GitHub ワークフローを構成する<$summary>
1. 再利用可能なワークフローを使用する
# .github$workflows$reusable-swarm.yml
name: Reusable Swarm Workflow
on:
workflow_call:
inputs:
topology:
required: true
type: string
jobs:
swarm-task:
runs-on: ubuntu-latest
steps:
- name: Initialize Swarm
run: |
npx ruv-swarm init --topology ${{ inputs.topology }}
2. 適切なキャッシュを実装する
- name: Cache Swarm Dependencies
uses: actions$cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
#### 3. 適切なタイムアウトを設定する
```yaml
jobs:
swarm-task:
timeout-minutes: 30
steps:
- name: Swarm Operation
timeout-minutes: 10
```
4. ワークフローの依存関係を利用する
jobs:
setup:
runs-on: ubuntu-latest
test:
needs: setup
runs-on: ubuntu-latest
deploy:
needs: [setup, test]
runs-on: ubuntu-latest
<$details>
🔒 セキュリティのベストプラクティス
GitHub ワークフローを安全にする<$summary>
1. 設定を安全に保存する
- name: Setup Swarm
env:
SWARM_CONFIG: ${{ secrets.SWARM_CONFIG }}
API_KEY: ${{ secrets.API_KEY }}
run: |
npx ruv-swarm init --config "$SWARM_CONFIG"
2. OIDC 認証を使用する
permissions:
id-token: write
contents: read
- name: Configure AWS Credentials
uses: aws-actions$configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::123456789012:role/GitHubAction
aws-region: us-east-1
3. 最小権限を実装する
permissions:
contents: read
pull-requests: write
issues: write
4. スウォーム操作を監査する
- name: Audit Swarm Actions
run: |
npx ruv-swarm actions audit \
--export-logs \
--compliance-report
<$details>
⚡ パフォーマンス最適化
ワークフローのパフォーマンスを最大化する<$summary>
1. スウォームの依存関係をキャッシュする
- uses: actions$cache@v3
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
2. 適切なランナーサイズを使用する
jobs:
heavy-task:
runs-on: ubuntu-latest-4-cores
steps:
- name: Intensive Swarm Operation
3. 早期終了を実装する
- name: Quick Fail Check
run: |
if ! npx ruv-swarm actions pre-check; then
echo "Pre-check failed, terminating early"
exit 1
fi
4. 並列実行を最適化する
strategy:
matrix:
include:
- runner: ubuntu-latest
task: test
- runner: ubuntu-latest
task: lint
- runner: ubuntu-latest
task: security
max-parallel: 3
<$details>
デバッグとトラブルシューティング
🐛 デバッグツール
GitHub ワークフローの問題をデバッグする<$summary>
デバッグモード
- name: Debug Swarm
run: |
npx ruv-swarm actions debug \
--verbose \
--trace-agents \
--export-logs
env:
ACTIONS_STEP_DEBUG: true
パフォーマンスプロファイリング
# Profile workflow performance
npx ruv-swarm actions profile \
--workflow "ci.yml" \
--identify-slow-steps \
--suggest-optimizations
障害分析
# Analyze failed runs
gh run view <run-id> --json jobs,conclusion | \
npx ruv-swarm actions analyze-failure \
--suggest-fixes \
--auto-retry-flaky
ログ分析
# Download and analyze logs
gh run download <run-id>
npx ruv-swarm actions analyze-logs \
--directory .$logs \
--identify-errors
<$details>
実践的な例
🚀 完全なワークフロー
本番環境で使用可能な統合の例<$summary>
例 1: フルスタックアプリケーションの CI/CD
name: Full-Stack CI/CD with Swarms
on:
push:
branches: [main, develop]
pull_request:
jobs:
initialize:
runs-on: ubuntu-latest
outputs:
swarm-id: ${{ steps.init.outputs.swarm-id }}
steps:
- id: init
run: |
SWARM_ID=$(npx ruv-swarm init --topology mesh --output json | jq -r '.id')
echo "swarm-id=${SWARM_ID}" >> $GITHUB_OUTPUT
backend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Backend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run backend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
frontend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Frontend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run frontend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
security:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Security Scan
run: |
npx ruv-swarm agents spawn --type security \
--task "Security audit" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
deploy:
needs: [backend, frontend, security]
if: github.ref == 'refs$heads$main'
runs-on: ubuntu-latest
steps:
- name: Deploy
run: |
npx ruv-swarm actions deploy \
--strategy progressive \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
例 2: モノレポの管理
name: Monorepo Coordination
on: push
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.detect.outputs.packages }}
steps:
- uses: actions$checkout@v3
with:
fetch-depth: 0
- id: detect
run: |
PACKAGES=$(npx ruv-swarm actions detect-changes \
--monorepo \
--output json)
echo "packages=${PACKAGES}" >> $GITHUB_OUTPUT
build-packages:
needs: detect-changes
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(needs.detect-changes.outputs.packages) }}
steps:
- name: Build Package
run: |
npx ruv-swarm actions build \
--package ${{ matrix.package }} \
--parallel-deps
例 3: マルチリポジトリの同期
# Synchronize multiple repositories
npx claude-flow@alpha github sync-coordinator \
"Synchronize version updates across:
- github.com$org$repo-a
- github.com$org$repo-b
- github.com$org$repo-c
Update dependencies, align versions, create PRs"
<$details>
コマンドリファレンス
📚 クイックコマンドガイド
利用可能なすべてのコマンド<$summary>
ワークフロー生成
npx ruv-swarm actions generate-workflow [options]
--analyze-codebase Analyze repository structure
--detect-languages Detect programming languages
--create-optimal-pipeline Generate optimized workflow
最適化
npx ruv-swarm actions optimize [options]
--workflow <path> Path to workflow file
--suggest-parallelization Suggest parallel execution
--reduce-redundancy Remove redundant steps
--estimate-savings Estimate time$cost savings
分析
npx ruv-swarm actions analyze [options]
--commit <sha> Analyze specific commit
--suggest-tests Suggest test improvements
--optimize-pipeline Optimize pipeline structure
テスト
npx ruv-swarm actions smart-test [options]
--changed-files <files> Files that changed
--impact-analysis Analyze test impact
--parallel-safe Only parallel-safe tests
セキュリティ
npx ruv-swarm actions security [options]
--deep-scan Deep security analysis
--format <format> Output format (json$text)
--create-issues Auto-create GitHub issues
デプロイ
npx ruv-swarm actions deploy [options]
--strategy <type> Deployment strategy
--risk <level> Risk assessment level
--auto-execute Execute automatically
監視
npx ruv-swarm actions analytics [options]
--workflow <name> Workflow to analyze
--period <duration> Analysis period
--identify-bottlenecks Find bottlenecks
--suggest-improvements Improvement suggestions
<$details>
統合チェックリスト
✅ セットアップの検証
セットアップを検証する<$summary>
- GitHub CLI (
gh) がインストールされ、認証済みである
- Git がユーザー認証情報で設定されている
- Node.js v16+ がインストールされている
-
claude-flow@alpha パッケージが利用可能である
- リポジトリに
.github$workflows ディレクトリがある
- リポジトリで GitHub Actions が有効になっている
- 必要なシークレットが設定されている
- ランナーの権限が確認されている
クイックセットアップスクリプト
#!$bin$bash
# setup-github-automation.sh
# Install dependencies
npm install -g claude-flow@alpha
# Verify GitHub CLI
gh auth status || gh auth login
# Create workflow directory
mkdir -p .github$workflows
# Generate initial workflow
npx ruv-swarm actions generate-workflow \
--analyze-codebase \
--create-optimal-pipeline > .github$workflows$ci.yml
echo "✅ GitHub workflow automation setup complete"
<$details>
関連スキル
github-pr-enhancement - 高度な PR 管理
release-coordination - リリースの自動化
swarm-coordination - マルチエージェントのオーケストレーション
ci-cd-optimization - パイプラインの最適化
サポートとドキュメント
- GitHub CLI ドキュメント: https:/$cli.github.com$manual/
- GitHub Actions: https:/$docs.github.com$en$actions
- Claude-Flow: https:/$github.com$ruvnet$claude-flow
- Ruv-Swarm: https:/$github.com$ruvnet$ruv-swarm
バージョン履歴
- v1.0.0 (2025-01-19): スキルの初回統合
- workflow-automation.md (441 行) を統合
- github-modes.md (146 行) を統合
- 段階的開示を追加
- スウォーム連携パターンで強化
- 包括的な例とベストプラクティスを追加
スキルのステータス: ✅ 本番環境対応
最終更新: 2025-01-19
メンテナー: claude-flow チーム
# Analyze workflow performance
npx ruv-swarm actions analytics \
--workflow "ci.yml" \
--period 30d \
--identify-bottlenecks \
--suggest-improvements
# Optimize GitHub Actions costs
npx ruv-swarm actions cost-optimize \
--analyze-usage \
--suggest-caching \
--recommend-self-hosted
# Identify failure patterns
npx ruv-swarm actions failure-patterns \
--period 90d \
--classify-failures \
--suggest-preventions
# Optimize resource usage
npx ruv-swarm actions resources \
--analyze-usage \
--suggest-runners \
--cost-optimize
インテリジェントなテスト選択と実行<$summary>
スマートなテスト選択
# Automatically select relevant tests
- name: Swarm Test Selection
run: |
npx ruv-swarm actions smart-test \
--changed-files ${{ steps.files.outputs.all }} \
--impact-analysis \
--parallel-safe
動的なテストマトリックス
# Generate test matrix from code analysis
jobs:
generate-matrix:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
MATRIX=$(npx ruv-swarm actions test-matrix \
--detect-frameworks \
--optimize-coverage)
echo "matrix=${MATRIX}" >> $GITHUB_OUTPUT
test:
needs: generate-matrix
strategy:
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}}
インテリジェントな並列化
# Determine optimal parallelization
npx ruv-swarm actions parallel-strategy \
--analyze-dependencies \
--time-estimates \
--cost-aware
<$details>
🔮 予測分析
AI を活用したワークフローの予測<$summary>
失敗の予測
# Predict potential failures
npx ruv-swarm actions predict \
--analyze-history \
--identify-risks \
--suggest-preventive
ワークフローの推奨事項
# Get workflow recommendations
npx ruv-swarm actions recommend \
--analyze-repo \
--suggest-workflows \
--industry-best-practices
最適化の自動化
# Continuously optimize workflows
npx ruv-swarm actions auto-optimize \
--monitor-performance \
--apply-improvements \
--track-savings
<$details>
🎯 カスタムアクションの開発
独自のスウォームアクションを作成する<$summary>
カスタムスウォームアクションのテンプレート
// action.yml
name: 'Swarm Custom Action'
description: 'Custom swarm-powered action'
inputs:
task:
description: 'Task for swarm'
required: true
runs:
using: 'node16'
main: 'dist$index.js'
// index.js
const { SwarmAction } = require('ruv-swarm');
async function run() {
const swarm = new SwarmAction({
topology: 'mesh',
agents: ['analyzer', 'optimizer']
});
await swarm.execute(core.getInput('task'));
}
run().catch(error => core.setFailed(error.message));
<$details>
Claude-Flow との統合
🔄 スウォーム連携パターン
MCP ベースの GitHub ワークフロー連携<$summary>
GitHub スウォームを初期化する
// Step 1: Initialize swarm coordination
mcp__claude-flow__swarm_init {
topology: "hierarchical",
maxAgents: 8
}
// Step 2: Spawn specialized agents
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" }
mcp__claude-flow__agent_spawn { type: "analyst", name: "Security Analyst" }
// Step 3: Orchestrate GitHub workflow
mcp__claude-flow__task_orchestrate {
task: "Complete PR review and merge workflow",
strategy: "parallel",
priority: "high"
}
GitHub フックとの統合
# Pre-task: Setup GitHub context
npx claude-flow@alpha hooks pre-task \
--description "PR review workflow" \
--context "pr-123"
# During task: Track progress
npx claude-flow@alpha hooks notify \
--message "Completed security scan" \
--type "github-action"
# Post-task: Export results
npx claude-flow@alpha hooks post-task \
--task-id "pr-review-123" \
--export-github-summary
<$details>
📦 バッチ操作
GitHub 操作の並行実行<$summary>
GitHub CLI コマンドの並列実行
// Single message with all GitHub operations
[Concurrent Execution]:
Bash("gh issue create --title 'Feature A' --body 'Description A' --label 'enhancement'")
Bash("gh issue create --title 'Feature B' --body 'Description B' --label 'enhancement'")
Bash("gh pr create --title 'PR 1' --head 'feature-a' --base 'main'")
Bash("gh pr create --title 'PR 2' --head 'feature-b' --base 'main'")
Bash("gh pr checks 123 --watch")
TodoWrite { todos: [
{content: "Review security scan results", status: "pending"},
{content: "Merge approved PRs", status: "pending"},
{content: "Update changelog", status: "pending"}
]}
<$details>
ベストプラクティス
🏗️ ワークフローの整理
GitHub ワークフローを構成する<$summary>
1. 再利用可能なワークフローを使用する
# .github$workflows$reusable-swarm.yml
name: Reusable Swarm Workflow
on:
workflow_call:
inputs:
topology:
required: true
type: string
jobs:
swarm-task:
runs-on: ubuntu-latest
steps:
- name: Initialize Swarm
run: |
npx ruv-swarm init --topology ${{ inputs.topology }}
2. 適切なキャッシュを実装する
- name: Cache Swarm Dependencies
uses: actions$cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
#### 3. 適切なタイムアウトを設定する
```yaml
jobs:
swarm-task:
timeout-minutes: 30
steps:
- name: Swarm Operation
timeout-minutes: 10
```
4. ワークフローの依存関係を利用する
jobs:
setup:
runs-on: ubuntu-latest
test:
needs: setup
runs-on: ubuntu-latest
deploy:
needs: [setup, test]
runs-on: ubuntu-latest
<$details>
🔒 セキュリティのベストプラクティス
GitHub ワークフローを安全にする<$summary>
1. 設定を安全に保存する
- name: Setup Swarm
env:
SWARM_CONFIG: ${{ secrets.SWARM_CONFIG }}
API_KEY: ${{ secrets.API_KEY }}
run: |
npx ruv-swarm init --config "$SWARM_CONFIG"
2. OIDC 認証を使用する
permissions:
id-token: write
contents: read
- name: Configure AWS Credentials
uses: aws-actions$configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::123456789012:role/GitHubAction
aws-region: us-east-1
3. 最小権限を実装する
permissions:
contents: read
pull-requests: write
issues: write
4. スウォーム操作を監査する
- name: Audit Swarm Actions
run: |
npx ruv-swarm actions audit \
--export-logs \
--compliance-report
<$details>
⚡ パフォーマンス最適化
ワークフローのパフォーマンスを最大化する<$summary>
1. スウォームの依存関係をキャッシュする
- uses: actions$cache@v3
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
2. 適切なランナーサイズを使用する
jobs:
heavy-task:
runs-on: ubuntu-latest-4-cores
steps:
- name: Intensive Swarm Operation
3. 早期終了を実装する
- name: Quick Fail Check
run: |
if ! npx ruv-swarm actions pre-check; then
echo "Pre-check failed, terminating early"
exit 1
fi
4. 並列実行を最適化する
strategy:
matrix:
include:
- runner: ubuntu-latest
task: test
- runner: ubuntu-latest
task: lint
- runner: ubuntu-latest
task: security
max-parallel: 3
<$details>
デバッグとトラブルシューティング
🐛 デバッグツール
GitHub ワークフローの問題をデバッグする<$summary>
デバッグモード
- name: Debug Swarm
run: |
npx ruv-swarm actions debug \
--verbose \
--trace-agents \
--export-logs
env:
ACTIONS_STEP_DEBUG: true
パフォーマンスプロファイリング
# Profile workflow performance
npx ruv-swarm actions profile \
--workflow "ci.yml" \
--identify-slow-steps \
--suggest-optimizations
障害分析
# Analyze failed runs
gh run view <run-id> --json jobs,conclusion | \
npx ruv-swarm actions analyze-failure \
--suggest-fixes \
--auto-retry-flaky
ログ分析
# Download and analyze logs
gh run download <run-id>
npx ruv-swarm actions analyze-logs \
--directory .$logs \
--identify-errors
<$details>
実践的な例
🚀 完全なワークフロー
本番環境で使用可能な統合の例<$summary>
例 1: フルスタックアプリケーションの CI/CD
name: Full-Stack CI/CD with Swarms
on:
push:
branches: [main, develop]
pull_request:
jobs:
initialize:
runs-on: ubuntu-latest
outputs:
swarm-id: ${{ steps.init.outputs.swarm-id }}
steps:
- id: init
run: |
SWARM_ID=$(npx ruv-swarm init --topology mesh --output json | jq -r '.id')
echo "swarm-id=${SWARM_ID}" >> $GITHUB_OUTPUT
backend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Backend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run backend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
frontend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Frontend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run frontend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
security:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Security Scan
run: |
npx ruv-swarm agents spawn --type security \
--task "Security audit" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
deploy:
needs: [backend, frontend, security]
if: github.ref == 'refs$heads$main'
runs-on: ubuntu-latest
steps:
- name: Deploy
run: |
npx ruv-swarm actions deploy \
--strategy progressive \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
例 2: モノレポの管理
name: Monorepo Coordination
on: push
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.detect.outputs.packages }}
steps:
- uses: actions$checkout@v3
with:
fetch-depth: 0
- id: detect
run: |
PACKAGES=$(npx ruv-swarm actions detect-changes \
--monorepo \
--output json)
echo "packages=${PACKAGES}" >> $GITHUB_OUTPUT
build-packages:
needs: detect-changes
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(needs.detect-changes.outputs.packages) }}
steps:
- name: Build Package
run: |
npx ruv-swarm actions build \
--package ${{ matrix.package }} \
--parallel-deps
例 3: マルチリポジトリの同期
# Synchronize multiple repositories
npx claude-flow@alpha github sync-coordinator \
"Synchronize version updates across:
- github.com$org$repo-a
- github.com$org$repo-b
- github.com$org$repo-c
Update dependencies, align versions, create PRs"
<$details>
コマンドリファレンス
📚 クイックコマンドガイド
利用可能なすべてのコマンド<$summary>
ワークフロー生成
npx ruv-swarm actions generate-workflow [options]
--analyze-codebase Analyze repository structure
--detect-languages Detect programming languages
--create-optimal-pipeline Generate optimized workflow
最適化
npx ruv-swarm actions optimize [options]
--workflow <path> Path to workflow file
--suggest-parallelization Suggest parallel execution
--reduce-redundancy Remove redundant steps
--estimate-savings Estimate time$cost savings
分析
npx ruv-swarm actions analyze [options]
--commit <sha> Analyze specific commit
--suggest-tests Suggest test improvements
--optimize-pipeline Optimize pipeline structure
テスト
npx ruv-swarm actions smart-test [options]
--changed-files <files> Files that changed
--impact-analysis Analyze test impact
--parallel-safe Only parallel-safe tests
セキュリティ
npx ruv-swarm actions security [options]
--deep-scan Deep security analysis
--format <format> Output format (json$text)
--create-issues Auto-create GitHub issues
デプロイ
npx ruv-swarm actions deploy [options]
--strategy <type> Deployment strategy
--risk <level> Risk assessment level
--auto-execute Execute automatically
監視
npx ruv-swarm actions analytics [options]
--workflow <name> Workflow to analyze
--period <duration> Analysis period
--identify-bottlenecks Find bottlenecks
--suggest-improvements Improvement suggestions
<$details>
統合チェックリスト
✅ セットアップの検証
セットアップを検証する<$summary>
- GitHub CLI (
gh) がインストールされ、認証済みである
- Git がユーザー認証情報で設定されている
- Node.js v16+ がインストールされている
-
claude-flow@alpha パッケージが利用可能である
- リポジトリに
.github$workflows ディレクトリがある
- リポジトリで GitHub Actions が有効になっている
- 必要なシークレットが設定されている
- ランナーの権限が確認されている
クイックセットアップスクリプト
#!$bin$bash
# setup-github-automation.sh
# Install dependencies
npm install -g claude-flow@alpha
# Verify GitHub CLI
gh auth status || gh auth login
# Create workflow directory
mkdir -p .github$workflows
# Generate initial workflow
npx ruv-swarm actions generate-workflow \
--analyze-codebase \
--create-optimal-pipeline > .github$workflows$ci.yml
echo "✅ GitHub workflow automation setup complete"
<$details>
関連スキル
github-pr-enhancement - 高度な PR 管理
release-coordination - リリースの自動化
swarm-coordination - マルチエージェントのオーケストレーション
ci-cd-optimization - パイプラインの最適化
サポートとドキュメント
- GitHub CLI ドキュメント: https:/$cli.github.com$manual/
- GitHub Actions: https:/$docs.github.com$en$actions
- Claude-Flow: https:/$github.com$ruvnet$claude-flow
- Ruv-Swarm: https:/$github.com$ruvnet$ruv-swarm
バージョン履歴
- v1.0.0 (2025-01-19): スキルの初回統合
- workflow-automation.md (441 行) を統合
- github-modes.md (146 行) を統合
- 段階的開示を追加
- スウォーム連携パターンで強化
- 包括的な例とベストプラクティスを追加
スキルのステータス: ✅ 本番環境対応
最終更新: 2025-01-19
メンテナー: claude-flow チーム
# Automatically select relevant tests
- name: Swarm Test Selection
run: |
npx ruv-swarm actions smart-test \
--changed-files ${{ steps.files.outputs.all }} \
--impact-analysis \
--parallel-safe
# Generate test matrix from code analysis
jobs:
generate-matrix:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
MATRIX=$(npx ruv-swarm actions test-matrix \
--detect-frameworks \
--optimize-coverage)
echo "matrix=${MATRIX}" >> $GITHUB_OUTPUT
test:
needs: generate-matrix
strategy:
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}}
# Determine optimal parallelization
npx ruv-swarm actions parallel-strategy \
--analyze-dependencies \
--time-estimates \
--cost-aware
AI を活用したワークフローの予測<$summary>
失敗の予測
# Predict potential failures
npx ruv-swarm actions predict \
--analyze-history \
--identify-risks \
--suggest-preventive
ワークフローの推奨事項
# Get workflow recommendations
npx ruv-swarm actions recommend \
--analyze-repo \
--suggest-workflows \
--industry-best-practices
最適化の自動化
# Continuously optimize workflows
npx ruv-swarm actions auto-optimize \
--monitor-performance \
--apply-improvements \
--track-savings
<$details>
🎯 カスタムアクションの開発
独自のスウォームアクションを作成する<$summary>
カスタムスウォームアクションのテンプレート
// action.yml
name: 'Swarm Custom Action'
description: 'Custom swarm-powered action'
inputs:
task:
description: 'Task for swarm'
required: true
runs:
using: 'node16'
main: 'dist$index.js'
// index.js
const { SwarmAction } = require('ruv-swarm');
async function run() {
const swarm = new SwarmAction({
topology: 'mesh',
agents: ['analyzer', 'optimizer']
});
await swarm.execute(core.getInput('task'));
}
run().catch(error => core.setFailed(error.message));
<$details>
Claude-Flow との統合
🔄 スウォーム連携パターン
MCP ベースの GitHub ワークフロー連携<$summary>
GitHub スウォームを初期化する
// Step 1: Initialize swarm coordination
mcp__claude-flow__swarm_init {
topology: "hierarchical",
maxAgents: 8
}
// Step 2: Spawn specialized agents
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" }
mcp__claude-flow__agent_spawn { type: "analyst", name: "Security Analyst" }
// Step 3: Orchestrate GitHub workflow
mcp__claude-flow__task_orchestrate {
task: "Complete PR review and merge workflow",
strategy: "parallel",
priority: "high"
}
GitHub フックとの統合
# Pre-task: Setup GitHub context
npx claude-flow@alpha hooks pre-task \
--description "PR review workflow" \
--context "pr-123"
# During task: Track progress
npx claude-flow@alpha hooks notify \
--message "Completed security scan" \
--type "github-action"
# Post-task: Export results
npx claude-flow@alpha hooks post-task \
--task-id "pr-review-123" \
--export-github-summary
<$details>
📦 バッチ操作
GitHub 操作の並行実行<$summary>
GitHub CLI コマンドの並列実行
// Single message with all GitHub operations
[Concurrent Execution]:
Bash("gh issue create --title 'Feature A' --body 'Description A' --label 'enhancement'")
Bash("gh issue create --title 'Feature B' --body 'Description B' --label 'enhancement'")
Bash("gh pr create --title 'PR 1' --head 'feature-a' --base 'main'")
Bash("gh pr create --title 'PR 2' --head 'feature-b' --base 'main'")
Bash("gh pr checks 123 --watch")
TodoWrite { todos: [
{content: "Review security scan results", status: "pending"},
{content: "Merge approved PRs", status: "pending"},
{content: "Update changelog", status: "pending"}
]}
<$details>
ベストプラクティス
🏗️ ワークフローの整理
GitHub ワークフローを構成する<$summary>
1. 再利用可能なワークフローを使用する
# .github$workflows$reusable-swarm.yml
name: Reusable Swarm Workflow
on:
workflow_call:
inputs:
topology:
required: true
type: string
jobs:
swarm-task:
runs-on: ubuntu-latest
steps:
- name: Initialize Swarm
run: |
npx ruv-swarm init --topology ${{ inputs.topology }}
2. 適切なキャッシュを実装する
- name: Cache Swarm Dependencies
uses: actions$cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
#### 3. 適切なタイムアウトを設定する
```yaml
jobs:
swarm-task:
timeout-minutes: 30
steps:
- name: Swarm Operation
timeout-minutes: 10
```
4. ワークフローの依存関係を利用する
jobs:
setup:
runs-on: ubuntu-latest
test:
needs: setup
runs-on: ubuntu-latest
deploy:
needs: [setup, test]
runs-on: ubuntu-latest
<$details>
🔒 セキュリティのベストプラクティス
GitHub ワークフローを安全にする<$summary>
1. 設定を安全に保存する
- name: Setup Swarm
env:
SWARM_CONFIG: ${{ secrets.SWARM_CONFIG }}
API_KEY: ${{ secrets.API_KEY }}
run: |
npx ruv-swarm init --config "$SWARM_CONFIG"
2. OIDC 認証を使用する
permissions:
id-token: write
contents: read
- name: Configure AWS Credentials
uses: aws-actions$configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::123456789012:role/GitHubAction
aws-region: us-east-1
3. 最小権限を実装する
permissions:
contents: read
pull-requests: write
issues: write
4. スウォーム操作を監査する
- name: Audit Swarm Actions
run: |
npx ruv-swarm actions audit \
--export-logs \
--compliance-report
<$details>
⚡ パフォーマンス最適化
ワークフローのパフォーマンスを最大化する<$summary>
1. スウォームの依存関係をキャッシュする
- uses: actions$cache@v3
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
2. 適切なランナーサイズを使用する
jobs:
heavy-task:
runs-on: ubuntu-latest-4-cores
steps:
- name: Intensive Swarm Operation
3. 早期終了を実装する
- name: Quick Fail Check
run: |
if ! npx ruv-swarm actions pre-check; then
echo "Pre-check failed, terminating early"
exit 1
fi
4. 並列実行を最適化する
strategy:
matrix:
include:
- runner: ubuntu-latest
task: test
- runner: ubuntu-latest
task: lint
- runner: ubuntu-latest
task: security
max-parallel: 3
<$details>
デバッグとトラブルシューティング
🐛 デバッグツール
GitHub ワークフローの問題をデバッグする<$summary>
デバッグモード
- name: Debug Swarm
run: |
npx ruv-swarm actions debug \
--verbose \
--trace-agents \
--export-logs
env:
ACTIONS_STEP_DEBUG: true
パフォーマンスプロファイリング
# Profile workflow performance
npx ruv-swarm actions profile \
--workflow "ci.yml" \
--identify-slow-steps \
--suggest-optimizations
障害分析
# Analyze failed runs
gh run view <run-id> --json jobs,conclusion | \
npx ruv-swarm actions analyze-failure \
--suggest-fixes \
--auto-retry-flaky
ログ分析
# Download and analyze logs
gh run download <run-id>
npx ruv-swarm actions analyze-logs \
--directory .$logs \
--identify-errors
<$details>
実践的な例
🚀 完全なワークフロー
本番環境で使用可能な統合の例<$summary>
例 1: フルスタックアプリケーションの CI/CD
name: Full-Stack CI/CD with Swarms
on:
push:
branches: [main, develop]
pull_request:
jobs:
initialize:
runs-on: ubuntu-latest
outputs:
swarm-id: ${{ steps.init.outputs.swarm-id }}
steps:
- id: init
run: |
SWARM_ID=$(npx ruv-swarm init --topology mesh --output json | jq -r '.id')
echo "swarm-id=${SWARM_ID}" >> $GITHUB_OUTPUT
backend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Backend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run backend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
frontend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Frontend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run frontend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
security:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Security Scan
run: |
npx ruv-swarm agents spawn --type security \
--task "Security audit" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
deploy:
needs: [backend, frontend, security]
if: github.ref == 'refs$heads$main'
runs-on: ubuntu-latest
steps:
- name: Deploy
run: |
npx ruv-swarm actions deploy \
--strategy progressive \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
例 2: モノレポの管理
name: Monorepo Coordination
on: push
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.detect.outputs.packages }}
steps:
- uses: actions$checkout@v3
with:
fetch-depth: 0
- id: detect
run: |
PACKAGES=$(npx ruv-swarm actions detect-changes \
--monorepo \
--output json)
echo "packages=${PACKAGES}" >> $GITHUB_OUTPUT
build-packages:
needs: detect-changes
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(needs.detect-changes.outputs.packages) }}
steps:
- name: Build Package
run: |
npx ruv-swarm actions build \
--package ${{ matrix.package }} \
--parallel-deps
例 3: マルチリポジトリの同期
# Synchronize multiple repositories
npx claude-flow@alpha github sync-coordinator \
"Synchronize version updates across:
- github.com$org$repo-a
- github.com$org$repo-b
- github.com$org$repo-c
Update dependencies, align versions, create PRs"
<$details>
コマンドリファレンス
📚 クイックコマンドガイド
利用可能なすべてのコマンド<$summary>
ワークフロー生成
npx ruv-swarm actions generate-workflow [options]
--analyze-codebase Analyze repository structure
--detect-languages Detect programming languages
--create-optimal-pipeline Generate optimized workflow
最適化
npx ruv-swarm actions optimize [options]
--workflow <path> Path to workflow file
--suggest-parallelization Suggest parallel execution
--reduce-redundancy Remove redundant steps
--estimate-savings Estimate time$cost savings
分析
npx ruv-swarm actions analyze [options]
--commit <sha> Analyze specific commit
--suggest-tests Suggest test improvements
--optimize-pipeline Optimize pipeline structure
テスト
npx ruv-swarm actions smart-test [options]
--changed-files <files> Files that changed
--impact-analysis Analyze test impact
--parallel-safe Only parallel-safe tests
セキュリティ
npx ruv-swarm actions security [options]
--deep-scan Deep security analysis
--format <format> Output format (json$text)
--create-issues Auto-create GitHub issues
デプロイ
npx ruv-swarm actions deploy [options]
--strategy <type> Deployment strategy
--risk <level> Risk assessment level
--auto-execute Execute automatically
監視
npx ruv-swarm actions analytics [options]
--workflow <name> Workflow to analyze
--period <duration> Analysis period
--identify-bottlenecks Find bottlenecks
--suggest-improvements Improvement suggestions
<$details>
統合チェックリスト
✅ セットアップの検証
セットアップを検証する<$summary>
- GitHub CLI (
gh) がインストールされ、認証済みである
- Git がユーザー認証情報で設定されている
- Node.js v16+ がインストールされている
-
claude-flow@alpha パッケージが利用可能である
- リポジトリに
.github$workflows ディレクトリがある
- リポジトリで GitHub Actions が有効になっている
- 必要なシークレットが設定されている
- ランナーの権限が確認されている
クイックセットアップスクリプト
#!$bin$bash
# setup-github-automation.sh
# Install dependencies
npm install -g claude-flow@alpha
# Verify GitHub CLI
gh auth status || gh auth login
# Create workflow directory
mkdir -p .github$workflows
# Generate initial workflow
npx ruv-swarm actions generate-workflow \
--analyze-codebase \
--create-optimal-pipeline > .github$workflows$ci.yml
echo "✅ GitHub workflow automation setup complete"
<$details>
関連スキル
github-pr-enhancement - 高度な PR 管理
release-coordination - リリースの自動化
swarm-coordination - マルチエージェントのオーケストレーション
ci-cd-optimization - パイプラインの最適化
サポートとドキュメント
- GitHub CLI ドキュメント: https:/$cli.github.com$manual/
- GitHub Actions: https:/$docs.github.com$en$actions
- Claude-Flow: https:/$github.com$ruvnet$claude-flow
- Ruv-Swarm: https:/$github.com$ruvnet$ruv-swarm
バージョン履歴
- v1.0.0 (2025-01-19): スキルの初回統合
- workflow-automation.md (441 行) を統合
- github-modes.md (146 行) を統合
- 段階的開示を追加
- スウォーム連携パターンで強化
- 包括的な例とベストプラクティスを追加
スキルのステータス: ✅ 本番環境対応
最終更新: 2025-01-19
メンテナー: claude-flow チーム
# Predict potential failures
npx ruv-swarm actions predict \
--analyze-history \
--identify-risks \
--suggest-preventive
# Get workflow recommendations
npx ruv-swarm actions recommend \
--analyze-repo \
--suggest-workflows \
--industry-best-practices
# Continuously optimize workflows
npx ruv-swarm actions auto-optimize \
--monitor-performance \
--apply-improvements \
--track-savings
独自のスウォームアクションを作成する<$summary>
カスタムスウォームアクションのテンプレート
// action.yml
name: 'Swarm Custom Action'
description: 'Custom swarm-powered action'
inputs:
task:
description: 'Task for swarm'
required: true
runs:
using: 'node16'
main: 'dist$index.js'
// index.js
const { SwarmAction } = require('ruv-swarm');
async function run() {
const swarm = new SwarmAction({
topology: 'mesh',
agents: ['analyzer', 'optimizer']
});
await swarm.execute(core.getInput('task'));
}
run().catch(error => core.setFailed(error.message));
<$details>
Claude-Flow との統合
🔄 スウォーム連携パターン
MCP ベースの GitHub ワークフロー連携<$summary>
GitHub スウォームを初期化する
// Step 1: Initialize swarm coordination
mcp__claude-flow__swarm_init {
topology: "hierarchical",
maxAgents: 8
}
// Step 2: Spawn specialized agents
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" }
mcp__claude-flow__agent_spawn { type: "analyst", name: "Security Analyst" }
// Step 3: Orchestrate GitHub workflow
mcp__claude-flow__task_orchestrate {
task: "Complete PR review and merge workflow",
strategy: "parallel",
priority: "high"
}
GitHub フックとの統合
# Pre-task: Setup GitHub context
npx claude-flow@alpha hooks pre-task \
--description "PR review workflow" \
--context "pr-123"
# During task: Track progress
npx claude-flow@alpha hooks notify \
--message "Completed security scan" \
--type "github-action"
# Post-task: Export results
npx claude-flow@alpha hooks post-task \
--task-id "pr-review-123" \
--export-github-summary
<$details>
📦 バッチ操作
GitHub 操作の並行実行<$summary>
GitHub CLI コマンドの並列実行
// Single message with all GitHub operations
[Concurrent Execution]:
Bash("gh issue create --title 'Feature A' --body 'Description A' --label 'enhancement'")
Bash("gh issue create --title 'Feature B' --body 'Description B' --label 'enhancement'")
Bash("gh pr create --title 'PR 1' --head 'feature-a' --base 'main'")
Bash("gh pr create --title 'PR 2' --head 'feature-b' --base 'main'")
Bash("gh pr checks 123 --watch")
TodoWrite { todos: [
{content: "Review security scan results", status: "pending"},
{content: "Merge approved PRs", status: "pending"},
{content: "Update changelog", status: "pending"}
]}
<$details>
ベストプラクティス
🏗️ ワークフローの整理
GitHub ワークフローを構成する<$summary>
1. 再利用可能なワークフローを使用する
# .github$workflows$reusable-swarm.yml
name: Reusable Swarm Workflow
on:
workflow_call:
inputs:
topology:
required: true
type: string
jobs:
swarm-task:
runs-on: ubuntu-latest
steps:
- name: Initialize Swarm
run: |
npx ruv-swarm init --topology ${{ inputs.topology }}
2. 適切なキャッシュを実装する
- name: Cache Swarm Dependencies
uses: actions$cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
#### 3. 適切なタイムアウトを設定する
```yaml
jobs:
swarm-task:
timeout-minutes: 30
steps:
- name: Swarm Operation
timeout-minutes: 10
```
4. ワークフローの依存関係を利用する
jobs:
setup:
runs-on: ubuntu-latest
test:
needs: setup
runs-on: ubuntu-latest
deploy:
needs: [setup, test]
runs-on: ubuntu-latest
<$details>
🔒 セキュリティのベストプラクティス
GitHub ワークフローを安全にする<$summary>
1. 設定を安全に保存する
- name: Setup Swarm
env:
SWARM_CONFIG: ${{ secrets.SWARM_CONFIG }}
API_KEY: ${{ secrets.API_KEY }}
run: |
npx ruv-swarm init --config "$SWARM_CONFIG"
2. OIDC 認証を使用する
permissions:
id-token: write
contents: read
- name: Configure AWS Credentials
uses: aws-actions$configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::123456789012:role/GitHubAction
aws-region: us-east-1
3. 最小権限を実装する
permissions:
contents: read
pull-requests: write
issues: write
4. スウォーム操作を監査する
- name: Audit Swarm Actions
run: |
npx ruv-swarm actions audit \
--export-logs \
--compliance-report
<$details>
⚡ パフォーマンス最適化
ワークフローのパフォーマンスを最大化する<$summary>
1. スウォームの依存関係をキャッシュする
- uses: actions$cache@v3
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
2. 適切なランナーサイズを使用する
jobs:
heavy-task:
runs-on: ubuntu-latest-4-cores
steps:
- name: Intensive Swarm Operation
3. 早期終了を実装する
- name: Quick Fail Check
run: |
if ! npx ruv-swarm actions pre-check; then
echo "Pre-check failed, terminating early"
exit 1
fi
4. 並列実行を最適化する
strategy:
matrix:
include:
- runner: ubuntu-latest
task: test
- runner: ubuntu-latest
task: lint
- runner: ubuntu-latest
task: security
max-parallel: 3
<$details>
デバッグとトラブルシューティング
🐛 デバッグツール
GitHub ワークフローの問題をデバッグする<$summary>
デバッグモード
- name: Debug Swarm
run: |
npx ruv-swarm actions debug \
--verbose \
--trace-agents \
--export-logs
env:
ACTIONS_STEP_DEBUG: true
パフォーマンスプロファイリング
# Profile workflow performance
npx ruv-swarm actions profile \
--workflow "ci.yml" \
--identify-slow-steps \
--suggest-optimizations
障害分析
# Analyze failed runs
gh run view <run-id> --json jobs,conclusion | \
npx ruv-swarm actions analyze-failure \
--suggest-fixes \
--auto-retry-flaky
ログ分析
# Download and analyze logs
gh run download <run-id>
npx ruv-swarm actions analyze-logs \
--directory .$logs \
--identify-errors
<$details>
実践的な例
🚀 完全なワークフロー
本番環境で使用可能な統合の例<$summary>
例 1: フルスタックアプリケーションの CI/CD
name: Full-Stack CI/CD with Swarms
on:
push:
branches: [main, develop]
pull_request:
jobs:
initialize:
runs-on: ubuntu-latest
outputs:
swarm-id: ${{ steps.init.outputs.swarm-id }}
steps:
- id: init
run: |
SWARM_ID=$(npx ruv-swarm init --topology mesh --output json | jq -r '.id')
echo "swarm-id=${SWARM_ID}" >> $GITHUB_OUTPUT
backend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Backend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run backend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
frontend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Frontend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run frontend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
security:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Security Scan
run: |
npx ruv-swarm agents spawn --type security \
--task "Security audit" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
deploy:
needs: [backend, frontend, security]
if: github.ref == 'refs$heads$main'
runs-on: ubuntu-latest
steps:
- name: Deploy
run: |
npx ruv-swarm actions deploy \
--strategy progressive \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
例 2: モノレポの管理
name: Monorepo Coordination
on: push
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.detect.outputs.packages }}
steps:
- uses: actions$checkout@v3
with:
fetch-depth: 0
- id: detect
run: |
PACKAGES=$(npx ruv-swarm actions detect-changes \
--monorepo \
--output json)
echo "packages=${PACKAGES}" >> $GITHUB_OUTPUT
build-packages:
needs: detect-changes
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(needs.detect-changes.outputs.packages) }}
steps:
- name: Build Package
run: |
npx ruv-swarm actions build \
--package ${{ matrix.package }} \
--parallel-deps
例 3: マルチリポジトリの同期
# Synchronize multiple repositories
npx claude-flow@alpha github sync-coordinator \
"Synchronize version updates across:
- github.com$org$repo-a
- github.com$org$repo-b
- github.com$org$repo-c
Update dependencies, align versions, create PRs"
<$details>
コマンドリファレンス
📚 クイックコマンドガイド
利用可能なすべてのコマンド<$summary>
ワークフロー生成
npx ruv-swarm actions generate-workflow [options]
--analyze-codebase Analyze repository structure
--detect-languages Detect programming languages
--create-optimal-pipeline Generate optimized workflow
最適化
npx ruv-swarm actions optimize [options]
--workflow <path> Path to workflow file
--suggest-parallelization Suggest parallel execution
--reduce-redundancy Remove redundant steps
--estimate-savings Estimate time$cost savings
分析
npx ruv-swarm actions analyze [options]
--commit <sha> Analyze specific commit
--suggest-tests Suggest test improvements
--optimize-pipeline Optimize pipeline structure
テスト
npx ruv-swarm actions smart-test [options]
--changed-files <files> Files that changed
--impact-analysis Analyze test impact
--parallel-safe Only parallel-safe tests
セキュリティ
npx ruv-swarm actions security [options]
--deep-scan Deep security analysis
--format <format> Output format (json$text)
--create-issues Auto-create GitHub issues
デプロイ
npx ruv-swarm actions deploy [options]
--strategy <type> Deployment strategy
--risk <level> Risk assessment level
--auto-execute Execute automatically
監視
npx ruv-swarm actions analytics [options]
--workflow <name> Workflow to analyze
--period <duration> Analysis period
--identify-bottlenecks Find bottlenecks
--suggest-improvements Improvement suggestions
<$details>
統合チェックリスト
✅ セットアップの検証
セットアップを検証する<$summary>
- GitHub CLI (
gh) がインストールされ、認証済みである
- Git がユーザー認証情報で設定されている
- Node.js v16+ がインストールされている
-
claude-flow@alpha パッケージが利用可能である
- リポジトリに
.github$workflows ディレクトリがある
- リポジトリで GitHub Actions が有効になっている
- 必要なシークレットが設定されている
- ランナーの権限が確認されている
クイックセットアップスクリプト
#!$bin$bash
# setup-github-automation.sh
# Install dependencies
npm install -g claude-flow@alpha
# Verify GitHub CLI
gh auth status || gh auth login
# Create workflow directory
mkdir -p .github$workflows
# Generate initial workflow
npx ruv-swarm actions generate-workflow \
--analyze-codebase \
--create-optimal-pipeline > .github$workflows$ci.yml
echo "✅ GitHub workflow automation setup complete"
<$details>
関連スキル
github-pr-enhancement - 高度な PR 管理
release-coordination - リリースの自動化
swarm-coordination - マルチエージェントのオーケストレーション
ci-cd-optimization - パイプラインの最適化
サポートとドキュメント
- GitHub CLI ドキュメント: https:/$cli.github.com$manual/
- GitHub Actions: https:/$docs.github.com$en$actions
- Claude-Flow: https:/$github.com$ruvnet$claude-flow
- Ruv-Swarm: https:/$github.com$ruvnet$ruv-swarm
バージョン履歴
- v1.0.0 (2025-01-19): スキルの初回統合
- workflow-automation.md (441 行) を統合
- github-modes.md (146 行) を統合
- 段階的開示を追加
- スウォーム連携パターンで強化
- 包括的な例とベストプラクティスを追加
スキルのステータス: ✅ 本番環境対応
最終更新: 2025-01-19
メンテナー: claude-flow チーム
// action.yml
name: 'Swarm Custom Action'
description: 'Custom swarm-powered action'
inputs:
task:
description: 'Task for swarm'
required: true
runs:
using: 'node16'
main: 'dist$index.js'
// index.js
const { SwarmAction } = require('ruv-swarm');
async function run() {
const swarm = new SwarmAction({
topology: 'mesh',
agents: ['analyzer', 'optimizer']
});
await swarm.execute(core.getInput('task'));
}
run().catch(error => core.setFailed(error.message));
MCP ベースの GitHub ワークフロー連携<$summary>
GitHub スウォームを初期化する
// Step 1: Initialize swarm coordination
mcp__claude-flow__swarm_init {
topology: "hierarchical",
maxAgents: 8
}
// Step 2: Spawn specialized agents
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" }
mcp__claude-flow__agent_spawn { type: "analyst", name: "Security Analyst" }
// Step 3: Orchestrate GitHub workflow
mcp__claude-flow__task_orchestrate {
task: "Complete PR review and merge workflow",
strategy: "parallel",
priority: "high"
}
GitHub フックとの統合
# Pre-task: Setup GitHub context
npx claude-flow@alpha hooks pre-task \
--description "PR review workflow" \
--context "pr-123"
# During task: Track progress
npx claude-flow@alpha hooks notify \
--message "Completed security scan" \
--type "github-action"
# Post-task: Export results
npx claude-flow@alpha hooks post-task \
--task-id "pr-review-123" \
--export-github-summary
<$details>
📦 バッチ操作
GitHub 操作の並行実行<$summary>
GitHub CLI コマンドの並列実行
// Single message with all GitHub operations
[Concurrent Execution]:
Bash("gh issue create --title 'Feature A' --body 'Description A' --label 'enhancement'")
Bash("gh issue create --title 'Feature B' --body 'Description B' --label 'enhancement'")
Bash("gh pr create --title 'PR 1' --head 'feature-a' --base 'main'")
Bash("gh pr create --title 'PR 2' --head 'feature-b' --base 'main'")
Bash("gh pr checks 123 --watch")
TodoWrite { todos: [
{content: "Review security scan results", status: "pending"},
{content: "Merge approved PRs", status: "pending"},
{content: "Update changelog", status: "pending"}
]}
<$details>
ベストプラクティス
🏗️ ワークフローの整理
GitHub ワークフローを構成する<$summary>
1. 再利用可能なワークフローを使用する
# .github$workflows$reusable-swarm.yml
name: Reusable Swarm Workflow
on:
workflow_call:
inputs:
topology:
required: true
type: string
jobs:
swarm-task:
runs-on: ubuntu-latest
steps:
- name: Initialize Swarm
run: |
npx ruv-swarm init --topology ${{ inputs.topology }}
2. 適切なキャッシュを実装する
- name: Cache Swarm Dependencies
uses: actions$cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
#### 3. 適切なタイムアウトを設定する
```yaml
jobs:
swarm-task:
timeout-minutes: 30
steps:
- name: Swarm Operation
timeout-minutes: 10
```
4. ワークフローの依存関係を利用する
jobs:
setup:
runs-on: ubuntu-latest
test:
needs: setup
runs-on: ubuntu-latest
deploy:
needs: [setup, test]
runs-on: ubuntu-latest
<$details>
🔒 セキュリティのベストプラクティス
GitHub ワークフローを安全にする<$summary>
1. 設定を安全に保存する
- name: Setup Swarm
env:
SWARM_CONFIG: ${{ secrets.SWARM_CONFIG }}
API_KEY: ${{ secrets.API_KEY }}
run: |
npx ruv-swarm init --config "$SWARM_CONFIG"
2. OIDC 認証を使用する
permissions:
id-token: write
contents: read
- name: Configure AWS Credentials
uses: aws-actions$configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::123456789012:role/GitHubAction
aws-region: us-east-1
3. 最小権限を実装する
permissions:
contents: read
pull-requests: write
issues: write
4. スウォーム操作を監査する
- name: Audit Swarm Actions
run: |
npx ruv-swarm actions audit \
--export-logs \
--compliance-report
<$details>
⚡ パフォーマンス最適化
ワークフローのパフォーマンスを最大化する<$summary>
1. スウォームの依存関係をキャッシュする
- uses: actions$cache@v3
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
2. 適切なランナーサイズを使用する
jobs:
heavy-task:
runs-on: ubuntu-latest-4-cores
steps:
- name: Intensive Swarm Operation
3. 早期終了を実装する
- name: Quick Fail Check
run: |
if ! npx ruv-swarm actions pre-check; then
echo "Pre-check failed, terminating early"
exit 1
fi
4. 並列実行を最適化する
strategy:
matrix:
include:
- runner: ubuntu-latest
task: test
- runner: ubuntu-latest
task: lint
- runner: ubuntu-latest
task: security
max-parallel: 3
<$details>
デバッグとトラブルシューティング
🐛 デバッグツール
GitHub ワークフローの問題をデバッグする<$summary>
デバッグモード
- name: Debug Swarm
run: |
npx ruv-swarm actions debug \
--verbose \
--trace-agents \
--export-logs
env:
ACTIONS_STEP_DEBUG: true
パフォーマンスプロファイリング
# Profile workflow performance
npx ruv-swarm actions profile \
--workflow "ci.yml" \
--identify-slow-steps \
--suggest-optimizations
障害分析
# Analyze failed runs
gh run view <run-id> --json jobs,conclusion | \
npx ruv-swarm actions analyze-failure \
--suggest-fixes \
--auto-retry-flaky
ログ分析
# Download and analyze logs
gh run download <run-id>
npx ruv-swarm actions analyze-logs \
--directory .$logs \
--identify-errors
<$details>
実践的な例
🚀 完全なワークフロー
本番環境で使用可能な統合の例<$summary>
例 1: フルスタックアプリケーションの CI/CD
name: Full-Stack CI/CD with Swarms
on:
push:
branches: [main, develop]
pull_request:
jobs:
initialize:
runs-on: ubuntu-latest
outputs:
swarm-id: ${{ steps.init.outputs.swarm-id }}
steps:
- id: init
run: |
SWARM_ID=$(npx ruv-swarm init --topology mesh --output json | jq -r '.id')
echo "swarm-id=${SWARM_ID}" >> $GITHUB_OUTPUT
backend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Backend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run backend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
frontend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Frontend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run frontend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
security:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Security Scan
run: |
npx ruv-swarm agents spawn --type security \
--task "Security audit" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
deploy:
needs: [backend, frontend, security]
if: github.ref == 'refs$heads$main'
runs-on: ubuntu-latest
steps:
- name: Deploy
run: |
npx ruv-swarm actions deploy \
--strategy progressive \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
例 2: モノレポの管理
name: Monorepo Coordination
on: push
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.detect.outputs.packages }}
steps:
- uses: actions$checkout@v3
with:
fetch-depth: 0
- id: detect
run: |
PACKAGES=$(npx ruv-swarm actions detect-changes \
--monorepo \
--output json)
echo "packages=${PACKAGES}" >> $GITHUB_OUTPUT
build-packages:
needs: detect-changes
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(needs.detect-changes.outputs.packages) }}
steps:
- name: Build Package
run: |
npx ruv-swarm actions build \
--package ${{ matrix.package }} \
--parallel-deps
例 3: マルチリポジトリの同期
# Synchronize multiple repositories
npx claude-flow@alpha github sync-coordinator \
"Synchronize version updates across:
- github.com$org$repo-a
- github.com$org$repo-b
- github.com$org$repo-c
Update dependencies, align versions, create PRs"
<$details>
コマンドリファレンス
📚 クイックコマンドガイド
利用可能なすべてのコマンド<$summary>
ワークフロー生成
npx ruv-swarm actions generate-workflow [options]
--analyze-codebase Analyze repository structure
--detect-languages Detect programming languages
--create-optimal-pipeline Generate optimized workflow
最適化
npx ruv-swarm actions optimize [options]
--workflow <path> Path to workflow file
--suggest-parallelization Suggest parallel execution
--reduce-redundancy Remove redundant steps
--estimate-savings Estimate time$cost savings
分析
npx ruv-swarm actions analyze [options]
--commit <sha> Analyze specific commit
--suggest-tests Suggest test improvements
--optimize-pipeline Optimize pipeline structure
テスト
npx ruv-swarm actions smart-test [options]
--changed-files <files> Files that changed
--impact-analysis Analyze test impact
--parallel-safe Only parallel-safe tests
セキュリティ
npx ruv-swarm actions security [options]
--deep-scan Deep security analysis
--format <format> Output format (json$text)
--create-issues Auto-create GitHub issues
デプロイ
npx ruv-swarm actions deploy [options]
--strategy <type> Deployment strategy
--risk <level> Risk assessment level
--auto-execute Execute automatically
監視
npx ruv-swarm actions analytics [options]
--workflow <name> Workflow to analyze
--period <duration> Analysis period
--identify-bottlenecks Find bottlenecks
--suggest-improvements Improvement suggestions
<$details>
統合チェックリスト
✅ セットアップの検証
セットアップを検証する<$summary>
- GitHub CLI (
gh) がインストールされ、認証済みである
- Git がユーザー認証情報で設定されている
- Node.js v16+ がインストールされている
-
claude-flow@alpha パッケージが利用可能である
- リポジトリに
.github$workflows ディレクトリがある
- リポジトリで GitHub Actions が有効になっている
- 必要なシークレットが設定されている
- ランナーの権限が確認されている
クイックセットアップスクリプト
#!$bin$bash
# setup-github-automation.sh
# Install dependencies
npm install -g claude-flow@alpha
# Verify GitHub CLI
gh auth status || gh auth login
# Create workflow directory
mkdir -p .github$workflows
# Generate initial workflow
npx ruv-swarm actions generate-workflow \
--analyze-codebase \
--create-optimal-pipeline > .github$workflows$ci.yml
echo "✅ GitHub workflow automation setup complete"
<$details>
関連スキル
github-pr-enhancement - 高度な PR 管理
release-coordination - リリースの自動化
swarm-coordination - マルチエージェントのオーケストレーション
ci-cd-optimization - パイプラインの最適化
サポートとドキュメント
- GitHub CLI ドキュメント: https:/$cli.github.com$manual/
- GitHub Actions: https:/$docs.github.com$en$actions
- Claude-Flow: https:/$github.com$ruvnet$claude-flow
- Ruv-Swarm: https:/$github.com$ruvnet$ruv-swarm
バージョン履歴
- v1.0.0 (2025-01-19): スキルの初回統合
- workflow-automation.md (441 行) を統合
- github-modes.md (146 行) を統合
- 段階的開示を追加
- スウォーム連携パターンで強化
- 包括的な例とベストプラクティスを追加
スキルのステータス: ✅ 本番環境対応
最終更新: 2025-01-19
メンテナー: claude-flow チーム
// Step 1: Initialize swarm coordination
mcp__claude-flow__swarm_init {
topology: "hierarchical",
maxAgents: 8
}
// Step 2: Spawn specialized agents
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" }
mcp__claude-flow__agent_spawn { type: "analyst", name: "Security Analyst" }
// Step 3: Orchestrate GitHub workflow
mcp__claude-flow__task_orchestrate {
task: "Complete PR review and merge workflow",
strategy: "parallel",
priority: "high"
}
# Pre-task: Setup GitHub context
npx claude-flow@alpha hooks pre-task \
--description "PR review workflow" \
--context "pr-123"
# During task: Track progress
npx claude-flow@alpha hooks notify \
--message "Completed security scan" \
--type "github-action"
# Post-task: Export results
npx claude-flow@alpha hooks post-task \
--task-id "pr-review-123" \
--export-github-summary
GitHub 操作の並行実行<$summary>
GitHub CLI コマンドの並列実行
// Single message with all GitHub operations
[Concurrent Execution]:
Bash("gh issue create --title 'Feature A' --body 'Description A' --label 'enhancement'")
Bash("gh issue create --title 'Feature B' --body 'Description B' --label 'enhancement'")
Bash("gh pr create --title 'PR 1' --head 'feature-a' --base 'main'")
Bash("gh pr create --title 'PR 2' --head 'feature-b' --base 'main'")
Bash("gh pr checks 123 --watch")
TodoWrite { todos: [
{content: "Review security scan results", status: "pending"},
{content: "Merge approved PRs", status: "pending"},
{content: "Update changelog", status: "pending"}
]}
<$details>
ベストプラクティス
🏗️ ワークフローの整理
GitHub ワークフローを構成する<$summary>
1. 再利用可能なワークフローを使用する
# .github$workflows$reusable-swarm.yml
name: Reusable Swarm Workflow
on:
workflow_call:
inputs:
topology:
required: true
type: string
jobs:
swarm-task:
runs-on: ubuntu-latest
steps:
- name: Initialize Swarm
run: |
npx ruv-swarm init --topology ${{ inputs.topology }}
2. 適切なキャッシュを実装する
- name: Cache Swarm Dependencies
uses: actions$cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
#### 3. 適切なタイムアウトを設定する
```yaml
jobs:
swarm-task:
timeout-minutes: 30
steps:
- name: Swarm Operation
timeout-minutes: 10
```
4. ワークフローの依存関係を利用する
jobs:
setup:
runs-on: ubuntu-latest
test:
needs: setup
runs-on: ubuntu-latest
deploy:
needs: [setup, test]
runs-on: ubuntu-latest
<$details>
🔒 セキュリティのベストプラクティス
GitHub ワークフローを安全にする<$summary>
1. 設定を安全に保存する
- name: Setup Swarm
env:
SWARM_CONFIG: ${{ secrets.SWARM_CONFIG }}
API_KEY: ${{ secrets.API_KEY }}
run: |
npx ruv-swarm init --config "$SWARM_CONFIG"
2. OIDC 認証を使用する
permissions:
id-token: write
contents: read
- name: Configure AWS Credentials
uses: aws-actions$configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::123456789012:role/GitHubAction
aws-region: us-east-1
3. 最小権限を実装する
permissions:
contents: read
pull-requests: write
issues: write
4. スウォーム操作を監査する
- name: Audit Swarm Actions
run: |
npx ruv-swarm actions audit \
--export-logs \
--compliance-report
<$details>
⚡ パフォーマンス最適化
ワークフローのパフォーマンスを最大化する<$summary>
1. スウォームの依存関係をキャッシュする
- uses: actions$cache@v3
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
2. 適切なランナーサイズを使用する
jobs:
heavy-task:
runs-on: ubuntu-latest-4-cores
steps:
- name: Intensive Swarm Operation
3. 早期終了を実装する
- name: Quick Fail Check
run: |
if ! npx ruv-swarm actions pre-check; then
echo "Pre-check failed, terminating early"
exit 1
fi
4. 並列実行を最適化する
strategy:
matrix:
include:
- runner: ubuntu-latest
task: test
- runner: ubuntu-latest
task: lint
- runner: ubuntu-latest
task: security
max-parallel: 3
<$details>
デバッグとトラブルシューティング
🐛 デバッグツール
GitHub ワークフローの問題をデバッグする<$summary>
デバッグモード
- name: Debug Swarm
run: |
npx ruv-swarm actions debug \
--verbose \
--trace-agents \
--export-logs
env:
ACTIONS_STEP_DEBUG: true
パフォーマンスプロファイリング
# Profile workflow performance
npx ruv-swarm actions profile \
--workflow "ci.yml" \
--identify-slow-steps \
--suggest-optimizations
障害分析
# Analyze failed runs
gh run view <run-id> --json jobs,conclusion | \
npx ruv-swarm actions analyze-failure \
--suggest-fixes \
--auto-retry-flaky
ログ分析
# Download and analyze logs
gh run download <run-id>
npx ruv-swarm actions analyze-logs \
--directory .$logs \
--identify-errors
<$details>
実践的な例
🚀 完全なワークフロー
本番環境で使用可能な統合の例<$summary>
例 1: フルスタックアプリケーションの CI/CD
name: Full-Stack CI/CD with Swarms
on:
push:
branches: [main, develop]
pull_request:
jobs:
initialize:
runs-on: ubuntu-latest
outputs:
swarm-id: ${{ steps.init.outputs.swarm-id }}
steps:
- id: init
run: |
SWARM_ID=$(npx ruv-swarm init --topology mesh --output json | jq -r '.id')
echo "swarm-id=${SWARM_ID}" >> $GITHUB_OUTPUT
backend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Backend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run backend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
frontend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Frontend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run frontend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
security:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Security Scan
run: |
npx ruv-swarm agents spawn --type security \
--task "Security audit" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
deploy:
needs: [backend, frontend, security]
if: github.ref == 'refs$heads$main'
runs-on: ubuntu-latest
steps:
- name: Deploy
run: |
npx ruv-swarm actions deploy \
--strategy progressive \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
例 2: モノレポの管理
name: Monorepo Coordination
on: push
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.detect.outputs.packages }}
steps:
- uses: actions$checkout@v3
with:
fetch-depth: 0
- id: detect
run: |
PACKAGES=$(npx ruv-swarm actions detect-changes \
--monorepo \
--output json)
echo "packages=${PACKAGES}" >> $GITHUB_OUTPUT
build-packages:
needs: detect-changes
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(needs.detect-changes.outputs.packages) }}
steps:
- name: Build Package
run: |
npx ruv-swarm actions build \
--package ${{ matrix.package }} \
--parallel-deps
例 3: マルチリポジトリの同期
# Synchronize multiple repositories
npx claude-flow@alpha github sync-coordinator \
"Synchronize version updates across:
- github.com$org$repo-a
- github.com$org$repo-b
- github.com$org$repo-c
Update dependencies, align versions, create PRs"
<$details>
コマンドリファレンス
📚 クイックコマンドガイド
利用可能なすべてのコマンド<$summary>
ワークフロー生成
npx ruv-swarm actions generate-workflow [options]
--analyze-codebase Analyze repository structure
--detect-languages Detect programming languages
--create-optimal-pipeline Generate optimized workflow
最適化
npx ruv-swarm actions optimize [options]
--workflow <path> Path to workflow file
--suggest-parallelization Suggest parallel execution
--reduce-redundancy Remove redundant steps
--estimate-savings Estimate time$cost savings
分析
npx ruv-swarm actions analyze [options]
--commit <sha> Analyze specific commit
--suggest-tests Suggest test improvements
--optimize-pipeline Optimize pipeline structure
テスト
npx ruv-swarm actions smart-test [options]
--changed-files <files> Files that changed
--impact-analysis Analyze test impact
--parallel-safe Only parallel-safe tests
セキュリティ
npx ruv-swarm actions security [options]
--deep-scan Deep security analysis
--format <format> Output format (json$text)
--create-issues Auto-create GitHub issues
デプロイ
npx ruv-swarm actions deploy [options]
--strategy <type> Deployment strategy
--risk <level> Risk assessment level
--auto-execute Execute automatically
監視
npx ruv-swarm actions analytics [options]
--workflow <name> Workflow to analyze
--period <duration> Analysis period
--identify-bottlenecks Find bottlenecks
--suggest-improvements Improvement suggestions
<$details>
統合チェックリスト
✅ セットアップの検証
セットアップを検証する<$summary>
- GitHub CLI (
gh) がインストールされ、認証済みである
- Git がユーザー認証情報で設定されている
- Node.js v16+ がインストールされている
-
claude-flow@alpha パッケージが利用可能である
- リポジトリに
.github$workflows ディレクトリがある
- リポジトリで GitHub Actions が有効になっている
- 必要なシークレットが設定されている
- ランナーの権限が確認されている
クイックセットアップスクリプト
#!$bin$bash
# setup-github-automation.sh
# Install dependencies
npm install -g claude-flow@alpha
# Verify GitHub CLI
gh auth status || gh auth login
# Create workflow directory
mkdir -p .github$workflows
# Generate initial workflow
npx ruv-swarm actions generate-workflow \
--analyze-codebase \
--create-optimal-pipeline > .github$workflows$ci.yml
echo "✅ GitHub workflow automation setup complete"
<$details>
関連スキル
github-pr-enhancement - 高度な PR 管理
release-coordination - リリースの自動化
swarm-coordination - マルチエージェントのオーケストレーション
ci-cd-optimization - パイプラインの最適化
サポートとドキュメント
- GitHub CLI ドキュメント: https:/$cli.github.com$manual/
- GitHub Actions: https:/$docs.github.com$en$actions
- Claude-Flow: https:/$github.com$ruvnet$claude-flow
- Ruv-Swarm: https:/$github.com$ruvnet$ruv-swarm
バージョン履歴
- v1.0.0 (2025-01-19): スキルの初回統合
- workflow-automation.md (441 行) を統合
- github-modes.md (146 行) を統合
- 段階的開示を追加
- スウォーム連携パターンで強化
- 包括的な例とベストプラクティスを追加
スキルのステータス: ✅ 本番環境対応
最終更新: 2025-01-19
メンテナー: claude-flow チーム
// Single message with all GitHub operations
[Concurrent Execution]:
Bash("gh issue create --title 'Feature A' --body 'Description A' --label 'enhancement'")
Bash("gh issue create --title 'Feature B' --body 'Description B' --label 'enhancement'")
Bash("gh pr create --title 'PR 1' --head 'feature-a' --base 'main'")
Bash("gh pr create --title 'PR 2' --head 'feature-b' --base 'main'")
Bash("gh pr checks 123 --watch")
TodoWrite { todos: [
{content: "Review security scan results", status: "pending"},
{content: "Merge approved PRs", status: "pending"},
{content: "Update changelog", status: "pending"}
]}
GitHub ワークフローを構成する<$summary>
1. 再利用可能なワークフローを使用する
# .github$workflows$reusable-swarm.yml
name: Reusable Swarm Workflow
on:
workflow_call:
inputs:
topology:
required: true
type: string
jobs:
swarm-task:
runs-on: ubuntu-latest
steps:
- name: Initialize Swarm
run: |
npx ruv-swarm init --topology ${{ inputs.topology }}
2. 適切なキャッシュを実装する
- name: Cache Swarm Dependencies
uses: actions$cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
#### 3. 適切なタイムアウトを設定する
```yaml
jobs:
swarm-task:
timeout-minutes: 30
steps:
- name: Swarm Operation
timeout-minutes: 10
```
4. ワークフローの依存関係を利用する
jobs:
setup:
runs-on: ubuntu-latest
test:
needs: setup
runs-on: ubuntu-latest
deploy:
needs: [setup, test]
runs-on: ubuntu-latest
<$details>
🔒 セキュリティのベストプラクティス
GitHub ワークフローを安全にする<$summary>
1. 設定を安全に保存する
- name: Setup Swarm
env:
SWARM_CONFIG: ${{ secrets.SWARM_CONFIG }}
API_KEY: ${{ secrets.API_KEY }}
run: |
npx ruv-swarm init --config "$SWARM_CONFIG"
2. OIDC 認証を使用する
permissions:
id-token: write
contents: read
- name: Configure AWS Credentials
uses: aws-actions$configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::123456789012:role/GitHubAction
aws-region: us-east-1
3. 最小権限を実装する
permissions:
contents: read
pull-requests: write
issues: write
4. スウォーム操作を監査する
- name: Audit Swarm Actions
run: |
npx ruv-swarm actions audit \
--export-logs \
--compliance-report
<$details>
⚡ パフォーマンス最適化
ワークフローのパフォーマンスを最大化する<$summary>
1. スウォームの依存関係をキャッシュする
- uses: actions$cache@v3
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
2. 適切なランナーサイズを使用する
jobs:
heavy-task:
runs-on: ubuntu-latest-4-cores
steps:
- name: Intensive Swarm Operation
3. 早期終了を実装する
- name: Quick Fail Check
run: |
if ! npx ruv-swarm actions pre-check; then
echo "Pre-check failed, terminating early"
exit 1
fi
4. 並列実行を最適化する
strategy:
matrix:
include:
- runner: ubuntu-latest
task: test
- runner: ubuntu-latest
task: lint
- runner: ubuntu-latest
task: security
max-parallel: 3
<$details>
デバッグとトラブルシューティング
🐛 デバッグツール
GitHub ワークフローの問題をデバッグする<$summary>
デバッグモード
- name: Debug Swarm
run: |
npx ruv-swarm actions debug \
--verbose \
--trace-agents \
--export-logs
env:
ACTIONS_STEP_DEBUG: true
パフォーマンスプロファイリング
# Profile workflow performance
npx ruv-swarm actions profile \
--workflow "ci.yml" \
--identify-slow-steps \
--suggest-optimizations
障害分析
# Analyze failed runs
gh run view <run-id> --json jobs,conclusion | \
npx ruv-swarm actions analyze-failure \
--suggest-fixes \
--auto-retry-flaky
ログ分析
# Download and analyze logs
gh run download <run-id>
npx ruv-swarm actions analyze-logs \
--directory .$logs \
--identify-errors
<$details>
実践的な例
🚀 完全なワークフロー
本番環境で使用可能な統合の例<$summary>
例 1: フルスタックアプリケーションの CI/CD
name: Full-Stack CI/CD with Swarms
on:
push:
branches: [main, develop]
pull_request:
jobs:
initialize:
runs-on: ubuntu-latest
outputs:
swarm-id: ${{ steps.init.outputs.swarm-id }}
steps:
- id: init
run: |
SWARM_ID=$(npx ruv-swarm init --topology mesh --output json | jq -r '.id')
echo "swarm-id=${SWARM_ID}" >> $GITHUB_OUTPUT
backend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Backend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run backend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
frontend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Frontend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run frontend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
security:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Security Scan
run: |
npx ruv-swarm agents spawn --type security \
--task "Security audit" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
deploy:
needs: [backend, frontend, security]
if: github.ref == 'refs$heads$main'
runs-on: ubuntu-latest
steps:
- name: Deploy
run: |
npx ruv-swarm actions deploy \
--strategy progressive \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
例 2: モノレポの管理
name: Monorepo Coordination
on: push
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.detect.outputs.packages }}
steps:
- uses: actions$checkout@v3
with:
fetch-depth: 0
- id: detect
run: |
PACKAGES=$(npx ruv-swarm actions detect-changes \
--monorepo \
--output json)
echo "packages=${PACKAGES}" >> $GITHUB_OUTPUT
build-packages:
needs: detect-changes
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(needs.detect-changes.outputs.packages) }}
steps:
- name: Build Package
run: |
npx ruv-swarm actions build \
--package ${{ matrix.package }} \
--parallel-deps
例 3: マルチリポジトリの同期
# Synchronize multiple repositories
npx claude-flow@alpha github sync-coordinator \
"Synchronize version updates across:
- github.com$org$repo-a
- github.com$org$repo-b
- github.com$org$repo-c
Update dependencies, align versions, create PRs"
<$details>
コマンドリファレンス
📚 クイックコマンドガイド
利用可能なすべてのコマンド<$summary>
ワークフロー生成
npx ruv-swarm actions generate-workflow [options]
--analyze-codebase Analyze repository structure
--detect-languages Detect programming languages
--create-optimal-pipeline Generate optimized workflow
最適化
npx ruv-swarm actions optimize [options]
--workflow <path> Path to workflow file
--suggest-parallelization Suggest parallel execution
--reduce-redundancy Remove redundant steps
--estimate-savings Estimate time$cost savings
分析
npx ruv-swarm actions analyze [options]
--commit <sha> Analyze specific commit
--suggest-tests Suggest test improvements
--optimize-pipeline Optimize pipeline structure
テスト
npx ruv-swarm actions smart-test [options]
--changed-files <files> Files that changed
--impact-analysis Analyze test impact
--parallel-safe Only parallel-safe tests
セキュリティ
npx ruv-swarm actions security [options]
--deep-scan Deep security analysis
--format <format> Output format (json$text)
--create-issues Auto-create GitHub issues
デプロイ
npx ruv-swarm actions deploy [options]
--strategy <type> Deployment strategy
--risk <level> Risk assessment level
--auto-execute Execute automatically
監視
npx ruv-swarm actions analytics [options]
--workflow <name> Workflow to analyze
--period <duration> Analysis period
--identify-bottlenecks Find bottlenecks
--suggest-improvements Improvement suggestions
<$details>
統合チェックリスト
✅ セットアップの検証
セットアップを検証する<$summary>
- GitHub CLI (
gh) がインストールされ、認証済みである
- Git がユーザー認証情報で設定されている
- Node.js v16+ がインストールされている
-
claude-flow@alpha パッケージが利用可能である
- リポジトリに
.github$workflows ディレクトリがある
- リポジトリで GitHub Actions が有効になっている
- 必要なシークレットが設定されている
- ランナーの権限が確認されている
クイックセットアップスクリプト
#!$bin$bash
# setup-github-automation.sh
# Install dependencies
npm install -g claude-flow@alpha
# Verify GitHub CLI
gh auth status || gh auth login
# Create workflow directory
mkdir -p .github$workflows
# Generate initial workflow
npx ruv-swarm actions generate-workflow \
--analyze-codebase \
--create-optimal-pipeline > .github$workflows$ci.yml
echo "✅ GitHub workflow automation setup complete"
<$details>
関連スキル
github-pr-enhancement - 高度な PR 管理
release-coordination - リリースの自動化
swarm-coordination - マルチエージェントのオーケストレーション
ci-cd-optimization - パイプラインの最適化
サポートとドキュメント
- GitHub CLI ドキュメント: https:/$cli.github.com$manual/
- GitHub Actions: https:/$docs.github.com$en$actions
- Claude-Flow: https:/$github.com$ruvnet$claude-flow
- Ruv-Swarm: https:/$github.com$ruvnet$ruv-swarm
バージョン履歴
- v1.0.0 (2025-01-19): スキルの初回統合
- workflow-automation.md (441 行) を統合
- github-modes.md (146 行) を統合
- 段階的開示を追加
- スウォーム連携パターンで強化
- 包括的な例とベストプラクティスを追加
スキルのステータス: ✅ 本番環境対応
最終更新: 2025-01-19
メンテナー: claude-flow チーム
# .github$workflows$reusable-swarm.yml
name: Reusable Swarm Workflow
on:
workflow_call:
inputs:
topology:
required: true
type: string
jobs:
swarm-task:
runs-on: ubuntu-latest
steps:
- name: Initialize Swarm
run: |
npx ruv-swarm init --topology ${{ inputs.topology }}
- name: Cache Swarm Dependencies
uses: actions$cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
jobs:
setup:
runs-on: ubuntu-latest
test:
needs: setup
runs-on: ubuntu-latest
deploy:
needs: [setup, test]
runs-on: ubuntu-latest
GitHub ワークフローを安全にする<$summary>
1. 設定を安全に保存する
- name: Setup Swarm
env:
SWARM_CONFIG: ${{ secrets.SWARM_CONFIG }}
API_KEY: ${{ secrets.API_KEY }}
run: |
npx ruv-swarm init --config "$SWARM_CONFIG"
2. OIDC 認証を使用する
permissions:
id-token: write
contents: read
- name: Configure AWS Credentials
uses: aws-actions$configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::123456789012:role/GitHubAction
aws-region: us-east-1
3. 最小権限を実装する
permissions:
contents: read
pull-requests: write
issues: write
4. スウォーム操作を監査する
- name: Audit Swarm Actions
run: |
npx ruv-swarm actions audit \
--export-logs \
--compliance-report
<$details>
⚡ パフォーマンス最適化
ワークフローのパフォーマンスを最大化する<$summary>
1. スウォームの依存関係をキャッシュする
- uses: actions$cache@v3
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
2. 適切なランナーサイズを使用する
jobs:
heavy-task:
runs-on: ubuntu-latest-4-cores
steps:
- name: Intensive Swarm Operation
3. 早期終了を実装する
- name: Quick Fail Check
run: |
if ! npx ruv-swarm actions pre-check; then
echo "Pre-check failed, terminating early"
exit 1
fi
4. 並列実行を最適化する
strategy:
matrix:
include:
- runner: ubuntu-latest
task: test
- runner: ubuntu-latest
task: lint
- runner: ubuntu-latest
task: security
max-parallel: 3
<$details>
デバッグとトラブルシューティング
🐛 デバッグツール
GitHub ワークフローの問題をデバッグする<$summary>
デバッグモード
- name: Debug Swarm
run: |
npx ruv-swarm actions debug \
--verbose \
--trace-agents \
--export-logs
env:
ACTIONS_STEP_DEBUG: true
パフォーマンスプロファイリング
# Profile workflow performance
npx ruv-swarm actions profile \
--workflow "ci.yml" \
--identify-slow-steps \
--suggest-optimizations
障害分析
# Analyze failed runs
gh run view <run-id> --json jobs,conclusion | \
npx ruv-swarm actions analyze-failure \
--suggest-fixes \
--auto-retry-flaky
ログ分析
# Download and analyze logs
gh run download <run-id>
npx ruv-swarm actions analyze-logs \
--directory .$logs \
--identify-errors
<$details>
実践的な例
🚀 完全なワークフロー
本番環境で使用可能な統合の例<$summary>
例 1: フルスタックアプリケーションの CI/CD
name: Full-Stack CI/CD with Swarms
on:
push:
branches: [main, develop]
pull_request:
jobs:
initialize:
runs-on: ubuntu-latest
outputs:
swarm-id: ${{ steps.init.outputs.swarm-id }}
steps:
- id: init
run: |
SWARM_ID=$(npx ruv-swarm init --topology mesh --output json | jq -r '.id')
echo "swarm-id=${SWARM_ID}" >> $GITHUB_OUTPUT
backend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Backend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run backend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
frontend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Frontend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run frontend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
security:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Security Scan
run: |
npx ruv-swarm agents spawn --type security \
--task "Security audit" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
deploy:
needs: [backend, frontend, security]
if: github.ref == 'refs$heads$main'
runs-on: ubuntu-latest
steps:
- name: Deploy
run: |
npx ruv-swarm actions deploy \
--strategy progressive \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
例 2: モノレポの管理
name: Monorepo Coordination
on: push
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.detect.outputs.packages }}
steps:
- uses: actions$checkout@v3
with:
fetch-depth: 0
- id: detect
run: |
PACKAGES=$(npx ruv-swarm actions detect-changes \
--monorepo \
--output json)
echo "packages=${PACKAGES}" >> $GITHUB_OUTPUT
build-packages:
needs: detect-changes
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(needs.detect-changes.outputs.packages) }}
steps:
- name: Build Package
run: |
npx ruv-swarm actions build \
--package ${{ matrix.package }} \
--parallel-deps
例 3: マルチリポジトリの同期
# Synchronize multiple repositories
npx claude-flow@alpha github sync-coordinator \
"Synchronize version updates across:
- github.com$org$repo-a
- github.com$org$repo-b
- github.com$org$repo-c
Update dependencies, align versions, create PRs"
<$details>
コマンドリファレンス
📚 クイックコマンドガイド
利用可能なすべてのコマンド<$summary>
ワークフロー生成
npx ruv-swarm actions generate-workflow [options]
--analyze-codebase Analyze repository structure
--detect-languages Detect programming languages
--create-optimal-pipeline Generate optimized workflow
最適化
npx ruv-swarm actions optimize [options]
--workflow <path> Path to workflow file
--suggest-parallelization Suggest parallel execution
--reduce-redundancy Remove redundant steps
--estimate-savings Estimate time$cost savings
分析
npx ruv-swarm actions analyze [options]
--commit <sha> Analyze specific commit
--suggest-tests Suggest test improvements
--optimize-pipeline Optimize pipeline structure
テスト
npx ruv-swarm actions smart-test [options]
--changed-files <files> Files that changed
--impact-analysis Analyze test impact
--parallel-safe Only parallel-safe tests
セキュリティ
npx ruv-swarm actions security [options]
--deep-scan Deep security analysis
--format <format> Output format (json$text)
--create-issues Auto-create GitHub issues
デプロイ
npx ruv-swarm actions deploy [options]
--strategy <type> Deployment strategy
--risk <level> Risk assessment level
--auto-execute Execute automatically
監視
npx ruv-swarm actions analytics [options]
--workflow <name> Workflow to analyze
--period <duration> Analysis period
--identify-bottlenecks Find bottlenecks
--suggest-improvements Improvement suggestions
<$details>
統合チェックリスト
✅ セットアップの検証
セットアップを検証する<$summary>
- GitHub CLI (
gh) がインストールされ、認証済みである
- Git がユーザー認証情報で設定されている
- Node.js v16+ がインストールされている
-
claude-flow@alpha パッケージが利用可能である
- リポジトリに
.github$workflows ディレクトリがある
- リポジトリで GitHub Actions が有効になっている
- 必要なシークレットが設定されている
- ランナーの権限が確認されている
クイックセットアップスクリプト
#!$bin$bash
# setup-github-automation.sh
# Install dependencies
npm install -g claude-flow@alpha
# Verify GitHub CLI
gh auth status || gh auth login
# Create workflow directory
mkdir -p .github$workflows
# Generate initial workflow
npx ruv-swarm actions generate-workflow \
--analyze-codebase \
--create-optimal-pipeline > .github$workflows$ci.yml
echo "✅ GitHub workflow automation setup complete"
<$details>
関連スキル
github-pr-enhancement - 高度な PR 管理
release-coordination - リリースの自動化
swarm-coordination - マルチエージェントのオーケストレーション
ci-cd-optimization - パイプラインの最適化
サポートとドキュメント
- GitHub CLI ドキュメント: https:/$cli.github.com$manual/
- GitHub Actions: https:/$docs.github.com$en$actions
- Claude-Flow: https:/$github.com$ruvnet$claude-flow
- Ruv-Swarm: https:/$github.com$ruvnet$ruv-swarm
バージョン履歴
- v1.0.0 (2025-01-19): スキルの初回統合
- workflow-automation.md (441 行) を統合
- github-modes.md (146 行) を統合
- 段階的開示を追加
- スウォーム連携パターンで強化
- 包括的な例とベストプラクティスを追加
スキルのステータス: ✅ 本番環境対応
最終更新: 2025-01-19
メンテナー: claude-flow チーム
- name: Setup Swarm
env:
SWARM_CONFIG: ${{ secrets.SWARM_CONFIG }}
API_KEY: ${{ secrets.API_KEY }}
run: |
npx ruv-swarm init --config "$SWARM_CONFIG"
permissions:
id-token: write
contents: read
- name: Configure AWS Credentials
uses: aws-actions$configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::123456789012:role/GitHubAction
aws-region: us-east-1
permissions:
contents: read
pull-requests: write
issues: write
- name: Audit Swarm Actions
run: |
npx ruv-swarm actions audit \
--export-logs \
--compliance-report
ワークフローのパフォーマンスを最大化する<$summary>
1. スウォームの依存関係をキャッシュする
- uses: actions$cache@v3
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
2. 適切なランナーサイズを使用する
jobs:
heavy-task:
runs-on: ubuntu-latest-4-cores
steps:
- name: Intensive Swarm Operation
3. 早期終了を実装する
- name: Quick Fail Check
run: |
if ! npx ruv-swarm actions pre-check; then
echo "Pre-check failed, terminating early"
exit 1
fi
4. 並列実行を最適化する
strategy:
matrix:
include:
- runner: ubuntu-latest
task: test
- runner: ubuntu-latest
task: lint
- runner: ubuntu-latest
task: security
max-parallel: 3
<$details>
デバッグとトラブルシューティング
🐛 デバッグツール
GitHub ワークフローの問題をデバッグする<$summary>
デバッグモード
- name: Debug Swarm
run: |
npx ruv-swarm actions debug \
--verbose \
--trace-agents \
--export-logs
env:
ACTIONS_STEP_DEBUG: true
パフォーマンスプロファイリング
# Profile workflow performance
npx ruv-swarm actions profile \
--workflow "ci.yml" \
--identify-slow-steps \
--suggest-optimizations
障害分析
# Analyze failed runs
gh run view <run-id> --json jobs,conclusion | \
npx ruv-swarm actions analyze-failure \
--suggest-fixes \
--auto-retry-flaky
ログ分析
# Download and analyze logs
gh run download <run-id>
npx ruv-swarm actions analyze-logs \
--directory .$logs \
--identify-errors
<$details>
実践的な例
🚀 完全なワークフロー
本番環境で使用可能な統合の例<$summary>
例 1: フルスタックアプリケーションの CI/CD
name: Full-Stack CI/CD with Swarms
on:
push:
branches: [main, develop]
pull_request:
jobs:
initialize:
runs-on: ubuntu-latest
outputs:
swarm-id: ${{ steps.init.outputs.swarm-id }}
steps:
- id: init
run: |
SWARM_ID=$(npx ruv-swarm init --topology mesh --output json | jq -r '.id')
echo "swarm-id=${SWARM_ID}" >> $GITHUB_OUTPUT
backend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Backend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run backend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
frontend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Frontend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run frontend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
security:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Security Scan
run: |
npx ruv-swarm agents spawn --type security \
--task "Security audit" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
deploy:
needs: [backend, frontend, security]
if: github.ref == 'refs$heads$main'
runs-on: ubuntu-latest
steps:
- name: Deploy
run: |
npx ruv-swarm actions deploy \
--strategy progressive \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
例 2: モノレポの管理
name: Monorepo Coordination
on: push
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.detect.outputs.packages }}
steps:
- uses: actions$checkout@v3
with:
fetch-depth: 0
- id: detect
run: |
PACKAGES=$(npx ruv-swarm actions detect-changes \
--monorepo \
--output json)
echo "packages=${PACKAGES}" >> $GITHUB_OUTPUT
build-packages:
needs: detect-changes
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(needs.detect-changes.outputs.packages) }}
steps:
- name: Build Package
run: |
npx ruv-swarm actions build \
--package ${{ matrix.package }} \
--parallel-deps
例 3: マルチリポジトリの同期
# Synchronize multiple repositories
npx claude-flow@alpha github sync-coordinator \
"Synchronize version updates across:
- github.com$org$repo-a
- github.com$org$repo-b
- github.com$org$repo-c
Update dependencies, align versions, create PRs"
<$details>
コマンドリファレンス
📚 クイックコマンドガイド
利用可能なすべてのコマンド<$summary>
ワークフロー生成
npx ruv-swarm actions generate-workflow [options]
--analyze-codebase Analyze repository structure
--detect-languages Detect programming languages
--create-optimal-pipeline Generate optimized workflow
最適化
npx ruv-swarm actions optimize [options]
--workflow <path> Path to workflow file
--suggest-parallelization Suggest parallel execution
--reduce-redundancy Remove redundant steps
--estimate-savings Estimate time$cost savings
分析
npx ruv-swarm actions analyze [options]
--commit <sha> Analyze specific commit
--suggest-tests Suggest test improvements
--optimize-pipeline Optimize pipeline structure
テスト
npx ruv-swarm actions smart-test [options]
--changed-files <files> Files that changed
--impact-analysis Analyze test impact
--parallel-safe Only parallel-safe tests
セキュリティ
npx ruv-swarm actions security [options]
--deep-scan Deep security analysis
--format <format> Output format (json$text)
--create-issues Auto-create GitHub issues
デプロイ
npx ruv-swarm actions deploy [options]
--strategy <type> Deployment strategy
--risk <level> Risk assessment level
--auto-execute Execute automatically
監視
npx ruv-swarm actions analytics [options]
--workflow <name> Workflow to analyze
--period <duration> Analysis period
--identify-bottlenecks Find bottlenecks
--suggest-improvements Improvement suggestions
<$details>
統合チェックリスト
✅ セットアップの検証
セットアップを検証する<$summary>
- GitHub CLI (
gh) がインストールされ、認証済みである
- Git がユーザー認証情報で設定されている
- Node.js v16+ がインストールされている
-
claude-flow@alpha パッケージが利用可能である
- リポジトリに
.github$workflows ディレクトリがある
- リポジトリで GitHub Actions が有効になっている
- 必要なシークレットが設定されている
- ランナーの権限が確認されている
クイックセットアップスクリプト
#!$bin$bash
# setup-github-automation.sh
# Install dependencies
npm install -g claude-flow@alpha
# Verify GitHub CLI
gh auth status || gh auth login
# Create workflow directory
mkdir -p .github$workflows
# Generate initial workflow
npx ruv-swarm actions generate-workflow \
--analyze-codebase \
--create-optimal-pipeline > .github$workflows$ci.yml
echo "✅ GitHub workflow automation setup complete"
<$details>
関連スキル
github-pr-enhancement - 高度な PR 管理
release-coordination - リリースの自動化
swarm-coordination - マルチエージェントのオーケストレーション
ci-cd-optimization - パイプラインの最適化
サポートとドキュメント
- GitHub CLI ドキュメント: https:/$cli.github.com$manual/
- GitHub Actions: https:/$docs.github.com$en$actions
- Claude-Flow: https:/$github.com$ruvnet$claude-flow
- Ruv-Swarm: https:/$github.com$ruvnet$ruv-swarm
バージョン履歴
- v1.0.0 (2025-01-19): スキルの初回統合
- workflow-automation.md (441 行) を統合
- github-modes.md (146 行) を統合
- 段階的開示を追加
- スウォーム連携パターンで強化
- 包括的な例とベストプラクティスを追加
スキルのステータス: ✅ 本番環境対応
最終更新: 2025-01-19
メンテナー: claude-flow チーム
- uses: actions$cache@v3
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-swarm-${{ hashFiles('**$package-lock.json') }}
jobs:
heavy-task:
runs-on: ubuntu-latest-4-cores
steps:
- name: Intensive Swarm Operation
- name: Quick Fail Check
run: |
if ! npx ruv-swarm actions pre-check; then
echo "Pre-check failed, terminating early"
exit 1
fi
strategy:
matrix:
include:
- runner: ubuntu-latest
task: test
- runner: ubuntu-latest
task: lint
- runner: ubuntu-latest
task: security
max-parallel: 3
GitHub ワークフローの問題をデバッグする<$summary>
デバッグモード
- name: Debug Swarm
run: |
npx ruv-swarm actions debug \
--verbose \
--trace-agents \
--export-logs
env:
ACTIONS_STEP_DEBUG: true
パフォーマンスプロファイリング
# Profile workflow performance
npx ruv-swarm actions profile \
--workflow "ci.yml" \
--identify-slow-steps \
--suggest-optimizations
障害分析
# Analyze failed runs
gh run view <run-id> --json jobs,conclusion | \
npx ruv-swarm actions analyze-failure \
--suggest-fixes \
--auto-retry-flaky
ログ分析
# Download and analyze logs
gh run download <run-id>
npx ruv-swarm actions analyze-logs \
--directory .$logs \
--identify-errors
<$details>
実践的な例
🚀 完全なワークフロー
本番環境で使用可能な統合の例<$summary>
例 1: フルスタックアプリケーションの CI/CD
name: Full-Stack CI/CD with Swarms
on:
push:
branches: [main, develop]
pull_request:
jobs:
initialize:
runs-on: ubuntu-latest
outputs:
swarm-id: ${{ steps.init.outputs.swarm-id }}
steps:
- id: init
run: |
SWARM_ID=$(npx ruv-swarm init --topology mesh --output json | jq -r '.id')
echo "swarm-id=${SWARM_ID}" >> $GITHUB_OUTPUT
backend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Backend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run backend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
frontend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Frontend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run frontend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
security:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Security Scan
run: |
npx ruv-swarm agents spawn --type security \
--task "Security audit" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
deploy:
needs: [backend, frontend, security]
if: github.ref == 'refs$heads$main'
runs-on: ubuntu-latest
steps:
- name: Deploy
run: |
npx ruv-swarm actions deploy \
--strategy progressive \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
例 2: モノレポの管理
name: Monorepo Coordination
on: push
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.detect.outputs.packages }}
steps:
- uses: actions$checkout@v3
with:
fetch-depth: 0
- id: detect
run: |
PACKAGES=$(npx ruv-swarm actions detect-changes \
--monorepo \
--output json)
echo "packages=${PACKAGES}" >> $GITHUB_OUTPUT
build-packages:
needs: detect-changes
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(needs.detect-changes.outputs.packages) }}
steps:
- name: Build Package
run: |
npx ruv-swarm actions build \
--package ${{ matrix.package }} \
--parallel-deps
例 3: マルチリポジトリの同期
# Synchronize multiple repositories
npx claude-flow@alpha github sync-coordinator \
"Synchronize version updates across:
- github.com$org$repo-a
- github.com$org$repo-b
- github.com$org$repo-c
Update dependencies, align versions, create PRs"
<$details>
コマンドリファレンス
📚 クイックコマンドガイド
利用可能なすべてのコマンド<$summary>
ワークフロー生成
npx ruv-swarm actions generate-workflow [options]
--analyze-codebase Analyze repository structure
--detect-languages Detect programming languages
--create-optimal-pipeline Generate optimized workflow
最適化
npx ruv-swarm actions optimize [options]
--workflow <path> Path to workflow file
--suggest-parallelization Suggest parallel execution
--reduce-redundancy Remove redundant steps
--estimate-savings Estimate time$cost savings
分析
npx ruv-swarm actions analyze [options]
--commit <sha> Analyze specific commit
--suggest-tests Suggest test improvements
--optimize-pipeline Optimize pipeline structure
テスト
npx ruv-swarm actions smart-test [options]
--changed-files <files> Files that changed
--impact-analysis Analyze test impact
--parallel-safe Only parallel-safe tests
セキュリティ
npx ruv-swarm actions security [options]
--deep-scan Deep security analysis
--format <format> Output format (json$text)
--create-issues Auto-create GitHub issues
デプロイ
npx ruv-swarm actions deploy [options]
--strategy <type> Deployment strategy
--risk <level> Risk assessment level
--auto-execute Execute automatically
監視
npx ruv-swarm actions analytics [options]
--workflow <name> Workflow to analyze
--period <duration> Analysis period
--identify-bottlenecks Find bottlenecks
--suggest-improvements Improvement suggestions
<$details>
統合チェックリスト
✅ セットアップの検証
セットアップを検証する<$summary>
- GitHub CLI (
gh) がインストールされ、認証済みである
- Git がユーザー認証情報で設定されている
- Node.js v16+ がインストールされている
-
claude-flow@alpha パッケージが利用可能である
- リポジトリに
.github$workflows ディレクトリがある
- リポジトリで GitHub Actions が有効になっている
- 必要なシークレットが設定されている
- ランナーの権限が確認されている
クイックセットアップスクリプト
#!$bin$bash
# setup-github-automation.sh
# Install dependencies
npm install -g claude-flow@alpha
# Verify GitHub CLI
gh auth status || gh auth login
# Create workflow directory
mkdir -p .github$workflows
# Generate initial workflow
npx ruv-swarm actions generate-workflow \
--analyze-codebase \
--create-optimal-pipeline > .github$workflows$ci.yml
echo "✅ GitHub workflow automation setup complete"
<$details>
関連スキル
github-pr-enhancement - 高度な PR 管理
release-coordination - リリースの自動化
swarm-coordination - マルチエージェントのオーケストレーション
ci-cd-optimization - パイプラインの最適化
サポートとドキュメント
- GitHub CLI ドキュメント: https:/$cli.github.com$manual/
- GitHub Actions: https:/$docs.github.com$en$actions
- Claude-Flow: https:/$github.com$ruvnet$claude-flow
- Ruv-Swarm: https:/$github.com$ruvnet$ruv-swarm
バージョン履歴
- v1.0.0 (2025-01-19): スキルの初回統合
- workflow-automation.md (441 行) を統合
- github-modes.md (146 行) を統合
- 段階的開示を追加
- スウォーム連携パターンで強化
- 包括的な例とベストプラクティスを追加
スキルのステータス: ✅ 本番環境対応
最終更新: 2025-01-19
メンテナー: claude-flow チーム
- name: Debug Swarm
run: |
npx ruv-swarm actions debug \
--verbose \
--trace-agents \
--export-logs
env:
ACTIONS_STEP_DEBUG: true
# Profile workflow performance
npx ruv-swarm actions profile \
--workflow "ci.yml" \
--identify-slow-steps \
--suggest-optimizations
# Analyze failed runs
gh run view <run-id> --json jobs,conclusion | \
npx ruv-swarm actions analyze-failure \
--suggest-fixes \
--auto-retry-flaky
# Download and analyze logs
gh run download <run-id>
npx ruv-swarm actions analyze-logs \
--directory .$logs \
--identify-errors
本番環境で使用可能な統合の例<$summary>
例 1: フルスタックアプリケーションの CI/CD
name: Full-Stack CI/CD with Swarms
on:
push:
branches: [main, develop]
pull_request:
jobs:
initialize:
runs-on: ubuntu-latest
outputs:
swarm-id: ${{ steps.init.outputs.swarm-id }}
steps:
- id: init
run: |
SWARM_ID=$(npx ruv-swarm init --topology mesh --output json | jq -r '.id')
echo "swarm-id=${SWARM_ID}" >> $GITHUB_OUTPUT
backend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Backend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run backend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
frontend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Frontend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run frontend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
security:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Security Scan
run: |
npx ruv-swarm agents spawn --type security \
--task "Security audit" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
deploy:
needs: [backend, frontend, security]
if: github.ref == 'refs$heads$main'
runs-on: ubuntu-latest
steps:
- name: Deploy
run: |
npx ruv-swarm actions deploy \
--strategy progressive \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
例 2: モノレポの管理
name: Monorepo Coordination
on: push
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.detect.outputs.packages }}
steps:
- uses: actions$checkout@v3
with:
fetch-depth: 0
- id: detect
run: |
PACKAGES=$(npx ruv-swarm actions detect-changes \
--monorepo \
--output json)
echo "packages=${PACKAGES}" >> $GITHUB_OUTPUT
build-packages:
needs: detect-changes
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(needs.detect-changes.outputs.packages) }}
steps:
- name: Build Package
run: |
npx ruv-swarm actions build \
--package ${{ matrix.package }} \
--parallel-deps
例 3: マルチリポジトリの同期
# Synchronize multiple repositories
npx claude-flow@alpha github sync-coordinator \
"Synchronize version updates across:
- github.com$org$repo-a
- github.com$org$repo-b
- github.com$org$repo-c
Update dependencies, align versions, create PRs"
<$details>
コマンドリファレンス
📚 クイックコマンドガイド
利用可能なすべてのコマンド<$summary>
ワークフロー生成
npx ruv-swarm actions generate-workflow [options]
--analyze-codebase Analyze repository structure
--detect-languages Detect programming languages
--create-optimal-pipeline Generate optimized workflow
最適化
npx ruv-swarm actions optimize [options]
--workflow <path> Path to workflow file
--suggest-parallelization Suggest parallel execution
--reduce-redundancy Remove redundant steps
--estimate-savings Estimate time$cost savings
分析
npx ruv-swarm actions analyze [options]
--commit <sha> Analyze specific commit
--suggest-tests Suggest test improvements
--optimize-pipeline Optimize pipeline structure
テスト
npx ruv-swarm actions smart-test [options]
--changed-files <files> Files that changed
--impact-analysis Analyze test impact
--parallel-safe Only parallel-safe tests
セキュリティ
npx ruv-swarm actions security [options]
--deep-scan Deep security analysis
--format <format> Output format (json$text)
--create-issues Auto-create GitHub issues
デプロイ
npx ruv-swarm actions deploy [options]
--strategy <type> Deployment strategy
--risk <level> Risk assessment level
--auto-execute Execute automatically
監視
npx ruv-swarm actions analytics [options]
--workflow <name> Workflow to analyze
--period <duration> Analysis period
--identify-bottlenecks Find bottlenecks
--suggest-improvements Improvement suggestions
<$details>
統合チェックリスト
✅ セットアップの検証
セットアップを検証する<$summary>
- GitHub CLI (
gh) がインストールされ、認証済みである
- Git がユーザー認証情報で設定されている
- Node.js v16+ がインストールされている
-
claude-flow@alpha パッケージが利用可能である
- リポジトリに
.github$workflows ディレクトリがある
- リポジトリで GitHub Actions が有効になっている
- 必要なシークレットが設定されている
- ランナーの権限が確認されている
クイックセットアップスクリプト
#!$bin$bash
# setup-github-automation.sh
# Install dependencies
npm install -g claude-flow@alpha
# Verify GitHub CLI
gh auth status || gh auth login
# Create workflow directory
mkdir -p .github$workflows
# Generate initial workflow
npx ruv-swarm actions generate-workflow \
--analyze-codebase \
--create-optimal-pipeline > .github$workflows$ci.yml
echo "✅ GitHub workflow automation setup complete"
<$details>
関連スキル
github-pr-enhancement - 高度な PR 管理
release-coordination - リリースの自動化
swarm-coordination - マルチエージェントのオーケストレーション
ci-cd-optimization - パイプラインの最適化
サポートとドキュメント
- GitHub CLI ドキュメント: https:/$cli.github.com$manual/
- GitHub Actions: https:/$docs.github.com$en$actions
- Claude-Flow: https:/$github.com$ruvnet$claude-flow
- Ruv-Swarm: https:/$github.com$ruvnet$ruv-swarm
バージョン履歴
- v1.0.0 (2025-01-19): スキルの初回統合
- workflow-automation.md (441 行) を統合
- github-modes.md (146 行) を統合
- 段階的開示を追加
- スウォーム連携パターンで強化
- 包括的な例とベストプラクティスを追加
スキルのステータス: ✅ 本番環境対応
最終更新: 2025-01-19
メンテナー: claude-flow チーム
name: Full-Stack CI/CD with Swarms
on:
push:
branches: [main, develop]
pull_request:
jobs:
initialize:
runs-on: ubuntu-latest
outputs:
swarm-id: ${{ steps.init.outputs.swarm-id }}
steps:
- id: init
run: |
SWARM_ID=$(npx ruv-swarm init --topology mesh --output json | jq -r '.id')
echo "swarm-id=${SWARM_ID}" >> $GITHUB_OUTPUT
backend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Backend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run backend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
frontend:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Frontend Tests
run: |
npx ruv-swarm agents spawn --type tester \
--task "Run frontend test suite" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
security:
needs: initialize
runs-on: ubuntu-latest
steps:
- uses: actions$checkout@v3
- name: Security Scan
run: |
npx ruv-swarm agents spawn --type security \
--task "Security audit" \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
deploy:
needs: [backend, frontend, security]
if: github.ref == 'refs$heads$main'
runs-on: ubuntu-latest
steps:
- name: Deploy
run: |
npx ruv-swarm actions deploy \
--strategy progressive \
--swarm-id ${{ needs.initialize.outputs.swarm-id }}
name: Monorepo Coordination
on: push
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.detect.outputs.packages }}
steps:
- uses: actions$checkout@v3
with:
fetch-depth: 0
- id: detect
run: |
PACKAGES=$(npx ruv-swarm actions detect-changes \
--monorepo \
--output json)
echo "packages=${PACKAGES}" >> $GITHUB_OUTPUT
build-packages:
needs: detect-changes
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(needs.detect-changes.outputs.packages) }}
steps:
- name: Build Package
run: |
npx ruv-swarm actions build \
--package ${{ matrix.package }} \
--parallel-deps
# Synchronize multiple repositories
npx claude-flow@alpha github sync-coordinator \
"Synchronize version updates across:
- github.com$org$repo-a
- github.com$org$repo-b
- github.com$org$repo-c
Update dependencies, align versions, create PRs"
利用可能なすべてのコマンド<$summary>
ワークフロー生成
npx ruv-swarm actions generate-workflow [options]
--analyze-codebase Analyze repository structure
--detect-languages Detect programming languages
--create-optimal-pipeline Generate optimized workflow
最適化
npx ruv-swarm actions optimize [options]
--workflow <path> Path to workflow file
--suggest-parallelization Suggest parallel execution
--reduce-redundancy Remove redundant steps
--estimate-savings Estimate time$cost savings
分析
npx ruv-swarm actions analyze [options]
--commit <sha> Analyze specific commit
--suggest-tests Suggest test improvements
--optimize-pipeline Optimize pipeline structure
テスト
npx ruv-swarm actions smart-test [options]
--changed-files <files> Files that changed
--impact-analysis Analyze test impact
--parallel-safe Only parallel-safe tests
セキュリティ
npx ruv-swarm actions security [options]
--deep-scan Deep security analysis
--format <format> Output format (json$text)
--create-issues Auto-create GitHub issues
デプロイ
npx ruv-swarm actions deploy [options]
--strategy <type> Deployment strategy
--risk <level> Risk assessment level
--auto-execute Execute automatically
監視
npx ruv-swarm actions analytics [options]
--workflow <name> Workflow to analyze
--period <duration> Analysis period
--identify-bottlenecks Find bottlenecks
--suggest-improvements Improvement suggestions
<$details>
統合チェックリスト
✅ セットアップの検証
セットアップを検証する<$summary>
- GitHub CLI (
gh) がインストールされ、認証済みである
- Git がユーザー認証情報で設定されている
- Node.js v16+ がインストールされている
-
claude-flow@alpha パッケージが利用可能である
- リポジトリに
.github$workflows ディレクトリがある
- リポジトリで GitHub Actions が有効になっている
- 必要なシークレットが設定されている
- ランナーの権限が確認されている
クイックセットアップスクリプト
#!$bin$bash
# setup-github-automation.sh
# Install dependencies
npm install -g claude-flow@alpha
# Verify GitHub CLI
gh auth status || gh auth login
# Create workflow directory
mkdir -p .github$workflows
# Generate initial workflow
npx ruv-swarm actions generate-workflow \
--analyze-codebase \
--create-optimal-pipeline > .github$workflows$ci.yml
echo "✅ GitHub workflow automation setup complete"
<$details>
関連スキル
github-pr-enhancement - 高度な PR 管理
release-coordination - リリースの自動化
swarm-coordination - マルチエージェントのオーケストレーション
ci-cd-optimization - パイプラインの最適化
サポートとドキュメント
- GitHub CLI ドキュメント: https:/$cli.github.com$manual/
- GitHub Actions: https:/$docs.github.com$en$actions
- Claude-Flow: https:/$github.com$ruvnet$claude-flow
- Ruv-Swarm: https:/$github.com$ruvnet$ruv-swarm
バージョン履歴
- v1.0.0 (2025-01-19): スキルの初回統合
- workflow-automation.md (441 行) を統合
- github-modes.md (146 行) を統合
- 段階的開示を追加
- スウォーム連携パターンで強化
- 包括的な例とベストプラクティスを追加
スキルのステータス: ✅ 本番環境対応
最終更新: 2025-01-19
メンテナー: claude-flow チーム
npx ruv-swarm actions generate-workflow [options]
--analyze-codebase Analyze repository structure
--detect-languages Detect programming languages
--create-optimal-pipeline Generate optimized workflow
npx ruv-swarm actions optimize [options]
--workflow <path> Path to workflow file
--suggest-parallelization Suggest parallel execution
--reduce-redundancy Remove redundant steps
--estimate-savings Estimate time$cost savings
npx ruv-swarm actions analyze [options]
--commit <sha> Analyze specific commit
--suggest-tests Suggest test improvements
--optimize-pipeline Optimize pipeline structure
npx ruv-swarm actions smart-test [options]
--changed-files <files> Files that changed
--impact-analysis Analyze test impact
--parallel-safe Only parallel-safe tests
npx ruv-swarm actions security [options]
--deep-scan Deep security analysis
--format <format> Output format (json$text)
--create-issues Auto-create GitHub issues
npx ruv-swarm actions deploy [options]
--strategy <type> Deployment strategy
--risk <level> Risk assessment level
--auto-execute Execute automatically
npx ruv-swarm actions analytics [options]
--workflow <name> Workflow to analyze
--period <duration> Analysis period
--identify-bottlenecks Find bottlenecks
--suggest-improvements Improvement suggestions
セットアップを検証する<$summary>
- GitHub CLI (
gh) がインストールされ、認証済みである
- Git がユーザー認証情報で設定されている
- Node.js v16+ がインストールされている
-
claude-flow@alpha パッケージが利用可能である
- リポジトリに
.github$workflows ディレクトリがある
- リポジトリで GitHub Actions が有効になっている
- 必要なシークレットが設定されている
- ランナーの権限が確認されている
クイックセットアップスクリプト
#!$bin$bash
# setup-github-automation.sh
# Install dependencies
npm install -g claude-flow@alpha
# Verify GitHub CLI
gh auth status || gh auth login
# Create workflow directory
mkdir -p .github$workflows
# Generate initial workflow
npx ruv-swarm actions generate-workflow \
--analyze-codebase \
--create-optimal-pipeline > .github$workflows$ci.yml
echo "✅ GitHub workflow automation setup complete"
<$details>
関連スキル
github-pr-enhancement - 高度な PR 管理
release-coordination - リリースの自動化
swarm-coordination - マルチエージェントのオーケストレーション
ci-cd-optimization - パイプラインの最適化
サポートとドキュメント
- GitHub CLI ドキュメント: https:/$cli.github.com$manual/
- GitHub Actions: https:/$docs.github.com$en$actions
- Claude-Flow: https:/$github.com$ruvnet$claude-flow
- Ruv-Swarm: https:/$github.com$ruvnet$ruv-swarm
バージョン履歴
- v1.0.0 (2025-01-19): スキルの初回統合
- workflow-automation.md (441 行) を統合
- github-modes.md (146 行) を統合
- 段階的開示を追加
- スウォーム連携パターンで強化
- 包括的な例とベストプラクティスを追加
スキルのステータス: ✅ 本番環境対応
最終更新: 2025-01-19
メンテナー: claude-flow チーム
gh) がインストールされ、認証済みであるclaude-flow@alpha パッケージが利用可能である.github$workflows ディレクトリがある#!$bin$bash
# setup-github-automation.sh
# Install dependencies
npm install -g claude-flow@alpha
# Verify GitHub CLI
gh auth status || gh auth login
# Create workflow directory
mkdir -p .github$workflows
# Generate initial workflow
npx ruv-swarm actions generate-workflow \
--analyze-codebase \
--create-optimal-pipeline > .github$workflows$ci.yml
echo "✅ GitHub workflow automation setup complete"
github-pr-enhancement - 高度な PR 管理release-coordination - リリースの自動化swarm-coordination - マルチエージェントのオーケストレーションci-cd-optimization - パイプラインの最適化- workflow-automation.md (441 行) を統合
- github-modes.md (146 行) を統合
- 段階的開示を追加
- スウォーム連携パターンで強化
- 包括的な例とベストプラクティスを追加
コメント
Markdown 対応