jpskill.com
💬 コミュニケーション コミュニティ

cascade-orchestrator

複数のマイクロスキルを連携させ、条件分岐や並列実行を組み合わせた複雑なワークフローを構築し、GeminiやCodexなどのモデルを使い分けながら、処理状況の記録や監査も行える高度な業務プロセスを自動化するSkill。

📜 元の英語説明(参考)

Creates sophisticated workflow cascades coordinating multiple micro-skills with sequential pipelines, parallel execution, conditional branching, and Codex sandbox iteration. Enhanced with multi-model routing (Gemini/Codex), ruv-swarm coordination, memory persistence, and audit-pipeline patterns for production workflows.

🇯🇵 日本人クリエイター向け解説

一言でいうと

複数のマイクロスキルを連携させ、条件分岐や並列実行を組み合わせた複雑なワークフローを構築し、GeminiやCodexなどのモデルを使い分けながら、処理状況の記録や監査も行える高度な業務プロセスを自動化するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o cascade-orchestrator.zip https://jpskill.com/download/18736.zip && unzip -o cascade-orchestrator.zip && rm cascade-orchestrator.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18736.zip -OutFile "$d\cascade-orchestrator.zip"; Expand-Archive "$d\cascade-orchestrator.zip" -DestinationPath $d -Force; ri "$d\cascade-orchestrator.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して cascade-orchestrator.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → cascade-orchestrator フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Cascade Orchestrator (拡張版)

概要

複数のマイクロスキルを連携させてまとまりのあるプロセスにするワークフロー(カスケード)を管理します。この拡張版では、Codexサンドボックスのイテレーション、マルチモデルルーティング、ruv-swarm連携、ステージを跨いだメモリの永続化が統合されています。

理念: 構成可能な卓越性

複雑な機能は、単純で明確に定義されたコンポーネントを組み合わせることで生まれます。

拡張された機能:

  • Codex Sandbox Iteration: 隔離された環境での失敗を自動修正 (audit-pipeline由来)
  • Multi-Model Routing: ステージの要件に基づいてGemini/Codexを使用
  • Swarm Coordination: ruv-swarm MCPによる並列実行
  • Memory Persistence: ステージを跨いでコンテキストを維持
  • GitHub Integration: CI/CDパイプラインの自動化

主要な原則:

  1. 関心の分離 (マイクロスキルは実行、カスケードは連携)
  2. 構成による再利用性
  3. 柔軟なオーケストレーションパターン
  4. 宣言的なワークフロー定義
  5. インテリジェントなモデル選択

Cascadeアーキテクチャ (拡張版)

定義レイヤー

拡張されたステージタイプ:

stages:
  - type: sequential     # 順番に実行
  - type: parallel       # 同時実行
  - type: conditional    # ランタイム条件に基づく
  - type: codex-sandbox  # NEW: 自動修正による反復テスト
  - type: multi-model    # NEW: インテリジェントなAIルーティング
  - type: swarm-parallel # NEW: ruv-swarmによる連携

拡張されたデータフロー:

data_flow:
  - stage_output: 前のステージの結果
  - shared_memory: ステージを跨いで永続化
  - multi_model_context: AI固有のフォーマット
  - codex_sandbox_state: 隔離されたテスト環境

高度なエラー処理:

error_handling:
  - retry_with_backoff
  - fallback_to_alternative
  - codex_auto_fix        # NEW: Codexによる自動修正
  - model_switching       # NEW: 別のAIを試す
  - swarm_recovery        # NEW: タスクを再分配

実行エンジン (拡張版)

AI選択によるステージスケジューリング:

for stage in cascade.stages:
    if stage.type == "codex-sandbox":
        execute_with_codex_iteration(stage)
    elif stage.type == "multi-model":
        model = select_optimal_model(stage.task)
        execute_on_model(stage, model)
    elif stage.type == "swarm-parallel":
        execute_via_ruv_swarm(stage)
    else:
        execute_standard(stage)

Codex Sandboxイテレーションループ:

def execute_with_codex_iteration(stage):
    """
    audit-pipeline Phase 2由来: functionality-auditパターン
    """
    results = execute_tests(stage.tests)

    for test in failed_tests(results):
        iteration = 0
        max_iterations = 5

        while test.failed and iteration < max_iterations:
            # Codexをサンドボックスで起動
            fix = spawn_codex_auto(
                task=f"Fix test failure: {test.error}",
                sandbox=True,
                context=test.context
            )

            # 再テスト
            test.result = rerun_test(test)
            iteration += 1

            if test.passed:
                apply_fix_to_main(fix)
                break

        if still_failed(test):
            escalate_to_user(test)

    return aggregate_results(results)

マルチモデルルーティング:

def select_optimal_model(task):
    """
    タスクの特性に基づいて最適なAIにルーティング
    """
    if task.requires_large_context:
        return "gemini-megacontext"  # 1Mトークン
    elif task.needs_current_info:
        return "gemini-search"        # Webグラウンディング
    elif task.needs_visual_output:
        return "gemini-media"          # Imagen/Veo
    elif task.needs_rapid_prototype:
        return "codex-auto"            # フルオート
    elif task.needs_alternative_view:
        return "codex-reasoning"       # GPT-5-Codex
    else:
        return "claude"                # 全体的に最適

拡張されたカスケードパターン

パターン1: マルチモデルによるリニアパイプライン

cascade:
  name: enhanced-data-pipeline
  stages:
    - stage: extract
      model: auto-select
      skill: extract-data

    - stage: validate
      model: auto-select
      skill: validate-data
      error_handling:
        strategy: codex-auto-fix  # NEW

    - stage: transform
      model: codex-auto           # 高速プロトタイピング
      skill: transform-data

    - stage: report
      model: gemini-media         # ビジュアル生成
      skill: generate-report

パターン2: Swarmによる並列ファンアウト

cascade:
  name: code-quality-swarm
  stages:
    - stage: quality-checks
      type: swarm-parallel        # NEW: ruv-swarm経由
      skills:
        - lint-code
        - security-scan
        - complexity-analysis
        - test-coverage
      swarm_config:
        topology: mesh
        max_agents: 4
        strategy: balanced

    - stage: aggregate
      skill: merge-quality-reports

パターン3: Codex Sandboxイテレーション

cascade:
  name: test-and-fix
  stages:
    - stage: functionality-audit
      type: codex-sandbox         # NEW
      test_suite: comprehensive
      codex_config:
        mode: full-auto
        max_iterations: 5
        sandbox: true
      error_recovery:
        auto_fix: true
        escalate_after: 5

    - stage: validate-fixes
      skill: regression-tests

パターン4: モデル切り替えによる条件分岐

cascade:
  name: adaptive-workflow
  stages:
    - stage: analyze
      model: gemini-megacontext   # 大規模コンテキスト
      skill: analyze-codebase

    - stage: decide
      type: conditional
      condition: ${analyze.quality_score}
      branches:
        high_quality:
          model: codex-auto       # 高速パス
          skill: deploy-fast
        low_quality:
          model: multi-model      # 包括的なパス
          cascade: deep-quality-audit

パターン5: メモリによる反復処理


cascade:
  name: iterative-refinement
  stages:
    - stage: refactor
      model: auto-select
      skill: refactor-code
      memory: persisten

(原文はここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Cascade Orchestrator (Enhanced)

Overview

Manages workflows (cascades) that coordinate multiple micro-skills into cohesive processes. This enhanced version integrates Codex sandbox iteration, multi-model routing, ruv-swarm coordination, and memory persistence across stages.

Philosophy: Composable Excellence

Complex capabilities emerge from composing simple, well-defined components.

Enhanced Capabilities:

  • Codex Sandbox Iteration: Auto-fix failures in isolated environment (from audit-pipeline)
  • Multi-Model Routing: Use Gemini/Codex based on stage requirements
  • Swarm Coordination: Parallel execution via ruv-swarm MCP
  • Memory Persistence: Maintain context across stages
  • GitHub Integration: CI/CD pipeline automation

Key Principles:

  1. Separation of concerns (micro-skills execute, cascades coordinate)
  2. Reusability through composition
  3. Flexible orchestration patterns
  4. Declarative workflow definition
  5. Intelligent model selection

Cascade Architecture (Enhanced)

Definition Layer

Extended Stage Types:

stages:
  - type: sequential     # One after another
  - type: parallel       # Simultaneous execution
  - type: conditional    # Based on runtime conditions
  - type: codex-sandbox  # NEW: Iterative testing with auto-fix
  - type: multi-model    # NEW: Intelligent AI routing
  - type: swarm-parallel # NEW: Coordinated via ruv-swarm

Enhanced Data Flow:

data_flow:
  - stage_output: previous stage results
  - shared_memory: persistent across stages
  - multi_model_context: AI-specific formatting
  - codex_sandbox_state: isolated test environment

Advanced Error Handling:

error_handling:
  - retry_with_backoff
  - fallback_to_alternative
  - codex_auto_fix        # NEW: Auto-fix via Codex
  - model_switching       # NEW: Try different AI
  - swarm_recovery        # NEW: Redistribute tasks

Execution Engine (Enhanced)

Stage Scheduling with AI Selection:

for stage in cascade.stages:
    if stage.type == "codex-sandbox":
        execute_with_codex_iteration(stage)
    elif stage.type == "multi-model":
        model = select_optimal_model(stage.task)
        execute_on_model(stage, model)
    elif stage.type == "swarm-parallel":
        execute_via_ruv_swarm(stage)
    else:
        execute_standard(stage)

Codex Sandbox Iteration Loop:

def execute_with_codex_iteration(stage):
    """
    From audit-pipeline Phase 2: functionality-audit pattern
    """
    results = execute_tests(stage.tests)

    for test in failed_tests(results):
        iteration = 0
        max_iterations = 5

        while test.failed and iteration < max_iterations:
            # Spawn Codex in sandbox
            fix = spawn_codex_auto(
                task=f"Fix test failure: {test.error}",
                sandbox=True,
                context=test.context
            )

            # Re-test
            test.result = rerun_test(test)
            iteration += 1

            if test.passed:
                apply_fix_to_main(fix)
                break

        if still_failed(test):
            escalate_to_user(test)

    return aggregate_results(results)

Multi-Model Routing:

def select_optimal_model(task):
    """
    Route to best AI based on task characteristics
    """
    if task.requires_large_context:
        return "gemini-megacontext"  # 1M tokens
    elif task.needs_current_info:
        return "gemini-search"        # Web grounding
    elif task.needs_visual_output:
        return "gemini-media"          # Imagen/Veo
    elif task.needs_rapid_prototype:
        return "codex-auto"            # Full Auto
    elif task.needs_alternative_view:
        return "codex-reasoning"       # GPT-5-Codex
    else:
        return "claude"                # Best overall

Enhanced Cascade Patterns

Pattern 1: Linear Pipeline with Multi-Model

cascade:
  name: enhanced-data-pipeline
  stages:
    - stage: extract
      model: auto-select
      skill: extract-data

    - stage: validate
      model: auto-select
      skill: validate-data
      error_handling:
        strategy: codex-auto-fix  # NEW

    - stage: transform
      model: codex-auto           # Fast prototyping
      skill: transform-data

    - stage: report
      model: gemini-media         # Generate visuals
      skill: generate-report

Pattern 2: Parallel Fan-Out with Swarm

cascade:
  name: code-quality-swarm
  stages:
    - stage: quality-checks
      type: swarm-parallel        # NEW: Via ruv-swarm
      skills:
        - lint-code
        - security-scan
        - complexity-analysis
        - test-coverage
      swarm_config:
        topology: mesh
        max_agents: 4
        strategy: balanced

    - stage: aggregate
      skill: merge-quality-reports

Pattern 3: Codex Sandbox Iteration

cascade:
  name: test-and-fix
  stages:
    - stage: functionality-audit
      type: codex-sandbox         # NEW
      test_suite: comprehensive
      codex_config:
        mode: full-auto
        max_iterations: 5
        sandbox: true
      error_recovery:
        auto_fix: true
        escalate_after: 5

    - stage: validate-fixes
      skill: regression-tests

Pattern 4: Conditional with Model Switching

cascade:
  name: adaptive-workflow
  stages:
    - stage: analyze
      model: gemini-megacontext   # Large context
      skill: analyze-codebase

    - stage: decide
      type: conditional
      condition: ${analyze.quality_score}
      branches:
        high_quality:
          model: codex-auto       # Fast path
          skill: deploy-fast
        low_quality:
          model: multi-model      # Comprehensive path
          cascade: deep-quality-audit

Pattern 5: Iterative with Memory

cascade:
  name: iterative-refinement
  stages:
    - stage: refactor
      model: auto-select
      skill: refactor-code
      memory: persistent          # NEW

    - stage: check-quality
      skill: quality-metrics

    - stage: repeat-decision
      type: conditional
      condition: ${quality < threshold}
      repeat: refactor            # Loop back
      max_iterations: 3
      memory_shared: true         # Context persists

Creating Enhanced Cascades

Step 1: Define with AI Considerations

Identify Model Requirements:

For each stage, determine:
- Large context needed? → Gemini
- Current web info needed? → Gemini Search
- Visual output needed? → Gemini Media
- Rapid prototyping needed? → Codex
- Testing with auto-fix? → Codex Sandbox
- Best overall reasoning? → Claude

Step 2: Design with Swarm Parallelism

When to Use Swarm:

  • Multiple independent tasks
  • Resource-intensive operations
  • Need load balancing
  • Want fault tolerance

Swarm Configuration:

swarm_config:
  topology: mesh | hierarchical | star
  max_agents: number
  strategy: balanced | specialized | adaptive
  memory_shared: true | false

Step 3: Add Codex Iteration for Quality

Pattern from audit-pipeline:

stages:
  - type: codex-sandbox
    tests: ${test_suite}
    fix_strategy:
      auto_fix: true
      max_iterations: 5
      sandbox_isolated: true
      network_disabled: true
      regression_check: true

Step 4: Enable Memory Persistence

Shared Memory Across Stages:

memory:
  persistence: enabled
  scope: cascade | global
  storage: mcp__ruv-swarm__memory
  keys:
    - analysis_results
    - intermediate_outputs
    - learned_patterns

Enhanced Cascade Definition Format

cascade:
  name: cascade-name
  description: What this accomplishes
  version: 2.0.0

  config:
    multi_model: enabled
    swarm_coordination: enabled
    memory_persistence: enabled
    github_integration: enabled

  inputs:
    - name: input-name
      type: type
      description: description

  stages:
    - stage_id: stage-1
      name: Stage Name
      type: sequential | parallel | codex-sandbox | multi-model | swarm-parallel
      model: auto-select | gemini | codex | claude

      # For micro-skill execution
      skills:
        - skill: micro-skill-name
          inputs: {...}
          outputs: {...}

      # For Codex sandbox
      codex_config:
        mode: full-auto
        sandbox: true
        max_iterations: 5

      # For swarm execution
      swarm_config:
        topology: mesh
        max_agents: 4

      # For memory
      memory:
        read_keys: [...]
        write_keys: [...]

      error_handling:
        strategy: retry | codex-auto-fix | model-switch | swarm-recovery
        max_retries: 3
        fallback: alternative-skill

  memory:
    persistence: enabled
    scope: cascade

  github_integration:
    create_pr: on_success
    report_issues: on_failure

Real-World Enhanced Cascades

Example 1: Complete Development Workflow

cascade: complete-dev-workflow
stages:
  1. gemini-search: "Research latest framework best practices"
  2. codex-auto: "Rapid prototype with best practices"
  3. codex-sandbox: "Test everything, auto-fix failures"
  4. gemini-media: "Generate architecture diagrams"
  5. style-audit: "Polish code to production standards"
  6. github-pr: "Create PR with comprehensive report"

Example 2: Legacy Modernization

cascade: modernize-legacy-code
stages:
  1. gemini-megacontext: "Analyze entire 50K line codebase"
  2. theater-detection: "Find all mocks and placeholders"
  3. [swarm-parallel]:
     - codex-auto: "Complete implementations" (parallel)
     - gemini-media: "Document architecture"
  4. codex-sandbox: "Test all changes with auto-fix"
  5. style-audit: "Final polish"
  6. generate-pr: "Create PR with before/after comparison"

Example 3: Bug Fix with RCA

cascade: intelligent-bug-fix
stages:
  1. root-cause-analyzer: "Deep RCA analysis"
  2. multi-model-decision:
     condition: ${rca.complexity}
     simple: codex-auto (quick fix)
     complex: [
       gemini-megacontext (understand broader context),
       codex-reasoning (alternative approaches),
       claude (implement best approach)
     ]
  3. codex-sandbox: "Test fix thoroughly"
  4. regression-suite: "Ensure no breakage"
  5. github-issue-update: "Document fix with RCA report"

Integration Points

With Micro-Skills

  • Executes micro-skills in stages
  • Passes data between skills
  • Handles skill errors gracefully

With Multi-Model System

  • Routes stages to optimal AI
  • Uses gemini-* skills for unique capabilities
  • Uses codex-* skills for prototyping/fixing
  • Uses Claude for best reasoning

With Audit Pipeline

  • Incorporates theater → functionality → style pattern
  • Uses Codex sandbox iteration from Phase 2
  • Applies quality gates throughout

With Slash Commands

  • Commands trigger cascades
  • Parameter mapping from command to cascade
  • Progress reporting to command interface

With Ruv-Swarm MCP

  • Parallel stage coordination
  • Memory persistence
  • Neural training
  • Performance tracking

Working with Enhanced Cascade Orchestrator

Invocation: "Create a cascade that [end goal] using [micro-skills] with [Codex/Gemini/swarm] capabilities"

The orchestrator will:

  1. Design workflow with optimal AI model selection
  2. Configure Codex sandbox for testing stages
  3. Set up swarm coordination for parallel stages
  4. Enable memory persistence across stages
  5. Integrate with GitHub for CI/CD
  6. Generate executable cascade definition

Advanced Features:

  • Automatic model routing based on task
  • Codex iteration loop for auto-fixing
  • Swarm coordination for parallelism
  • Memory sharing across stages
  • GitHub PR/issue integration
  • Performance monitoring and optimization

Version 2.0 Enhancements:

  • Codex sandbox iteration pattern
  • Multi-model intelligent routing
  • Ruv-swarm MCP integration
  • Memory persistence
  • GitHub workflow automation
  • Enhanced error recovery