Communitygithub.com

dmux Workflows

dmux(tmuxペインマネージャー)を使用したマルチエージェントオーケストレーション。Claude Code、Codex、OpenCodeなどの並列エージェントワークフローのためのパターン。

dmux Workflows とは?

dmux Workflowsは、tmuxベースのペインマネージャーであるdmuxを活用して、複数のAIエージェントセッションを並列実行・調整するためのスキルです。Claude Code、Codex、OpenCode、Cline、Gemini、Qwenなど、さまざまなエージェントハーネスをサポートし、調査と実装の分離、マルチファイル機能開発、テスト修正ループ、クロスハーネス連携、コードレビューパイプラインといった5つの主要なワークフローパターンを提供します。各ペインは独立したファイルや関心事に取り組むことで、分割統治の並列処理を実現します。さらに、競合を回避するためのgit worktrees統合や、ECCのorchestrate-worktrees.jsヘルパースクリプトによる計画ベースの大規模オーケストレーションもサポートしています。

対応✓Claude Code✓Codex CLI~Cursor✓Gemini CLI✓OpenCode
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/dmux-workflows

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

dmux Workflows は何をしますか?

dmux(tmuxペインマネージャー)を使用して、AIエージェントセッションを並列オーケストレーションします。

アクティベートするタイミング

  • 複数のエージェントセッションを並列実行する場合
  • Claude Code、Codex、その他のハーネス間で作業を調整する場合
  • 分割統治の並列処理が有効な複雑なタスク
  • ユーザーが「並列実行」「この作業を分割」「dmuxを使う」「マルチエージェント」と言った場合

dmuxとは

dmuxは、AIエージェントのペインを管理するtmuxベースのオーケストレーションツールです:

  • nキーを押すと、新しいペインを作成してプロンプトを入力
  • mキーを押すと、ペインの出力をメインセッションにマージ
  • 対応ハーネス:Claude Code、Codex、OpenCode、Cline、Gemini、Qwen

インストール: パッケージを確認した上で、リポジトリからdmuxをインストールしてください。詳細は github.com/standardagents/dmux を参照

クイックスタート

# dmuxセッションを開始
dmux

# エージェントペインを作成(dmux内で 'n' を押し、プロンプトを入力)
# ペイン1:「src/auth/ に認証ミドルウェアを実装して」
# ペイン2:「ユーザーサービスのテストを書いて」
# ペイン3:「APIドキュメントを更新して」

# 各ペインは独自のエージェントセッションを実行
# 'm' を押して結果をマージ

ワークフローパターン

パターン1:調査 + 実装

調査と実装を並行して分割実行:

ペイン1(調査用):「Node.jsのレート制限のベストプラクティスを調査して。
  現在のライブラリを確認し、アプローチを比較して、結果を
  /tmp/rate-limit-research.md に書き出して」

ペイン2(実装用):「Express APIにレート制限ミドルウェアを実装して。
  まず基本的なトークンバケットから始めて、調査完了後に改良する」

# ペイン1完了後、調査結果をペイン2のコンテキストにマージ

パターン2:マルチファイル機能開発

独立したファイルにまたがる作業を並列化:

ペイン1:「課金機能のデータベーススキーマとマイグレーションを作成して」
ペイン2:「src/api/billing/ に課金APIエンドポイントを構築して」
ペイン3:「課金ダッシュボードのUIコンポーネントを作成して」

# すべてをマージし、メインペインで統合を行う

パターン3:テスト + 修正ループ

一方のペインでテストを実行し、別のペインで修正:

ペイン1(監視用):「テストスイートを監視モードで実行して。テストが失敗したら、
  その失敗内容を要約して」

ペイン2(修正用):「ペイン1のエラー出力に基づいて、失敗テストを修正して」

パターン4:クロスハーネス

異なるAIツールを異なるタスクに使用:

ペイン1(Claude Code):「認証モジュールのセキュリティをレビューして」
ペイン2(Codex):「ユーティリティ関数をパフォーマンス向けにリファクタリングして」
ペイン3(Claude Code):「チェックアウトフローのE2Eテストを書いて」

パターン5:コードレビューパイプライン

並列レビューの視点:

ペイン1:「src/api/ をセキュリティ脆弱性の観点でレビューして」
ペイン2:「src/api/ をパフォーマンス問題の観点でレビューして」
ペイン3:「src/api/ をテストカバレッジのギャップの観点でレビューして」

# すべてのレビューを1つのレポートにマージ

ベストプラクティス

  1. 独立したタスクのみ。 互いの出力に依存するタスクは並列化しないでください。
  2. 明確な境界。 各ペインは異なるファイルや関心事に取り組むようにしてください。
  3. 戦略的にマージ。 競合を避けるため、ペイン出力をマージ前にレビューしてください。
  4. git worktreesを使用する。 ファイル競合が発生しやすい作業には、ペインごとに別々のワークツリーを使用してください。
  5. リソースを意識する。 各ペインはAPIトークンを消費します。ペイン総数は5~6個以下に抑えてください。

Git Worktree統合

重複するファイルを扱うタスク向け:

# 分離のためのワークツリーを作成
git worktree add -b feat/auth ../feature-auth HEAD
git worktree add -b feat/billing ../feature-billing HEAD

# 別々のワークツリーでエージェントを実行
# ペイン1:cd ../feature-auth && claude
# ペイン2:cd ../feature-billing && claude

# 完了したらブランチをマージ
git merge feat/auth
git merge feat/billing

補完ツール

ツール機能使用タイミング
dmuxエージェント向けtmuxペイン管理並列エージェントセッション
Superset10以上の並列エージェント向けターミナルIDE大規模オーケストレーション
Claude Code Taskツールプロセス内サブエージェント生成セッション内でのプログラム的な並列処理
Codexマルチエージェント組み込みエージェントロールCodex固有の並列作業

ECCヘルパー

ECCには、別個のgitワークツリーを使用した外部tmuxペインオーケストレーションのためのヘルパーが含まれています:

node scripts/orchestrate-worktrees.js plan.json --execute

plan.jsonの例:

{
  "sessionName": "skill-audit",
  "baseRef": "HEAD",
  "launcherCommand": "codex exec --cwd {worktree_path} --task-file {task_file}",
  "workers": [
    { "name": "docs-a", "task": "スキル1~4を修正し、引き継ぎメモを書いてください。" },
    { "name": "docs-b", "task": "スキル5~8を修正し、引き継ぎメモを書いてください。" }
  ]
}

このヘルパーは:

  • ワーカーごとにブランチ付きのgitワークツリーを1つ作成
  • メインチェックアウトから選択したseedPathsを各ワーカーワークツリーにオプションでオーバーレイ
  • ワーカーごとに.orchestration/<session>/の下にtask.md、handoff.md、status.mdファイルを作成
  • ワーカーごとに1つのペインを持つtmuxセッションを開始
  • 各ワーカーコマンドをそれぞれのペインで起動
  • メインペインはオーケストレーター用に解放

seedPathsは、ワーカーがHEADにまだ含まれていないダーティファイルや追跡外ファイル(ローカルオーケストレーションスクリプト、ドラフト計画、ドキュメントなど)にアクセスする必要がある場合に使用します:

{
  "sessionName": "workflow-e2e",
  "seedPaths": [
    "scripts/orchestrate-worktrees.js",
    "scripts/lib/tmux-worktree-orchestrator.js",
    ".claude/plan/workflow-e2e-test.json"
  ],
  "launcherCommand": "bash {repo_root}/scripts/orchestrate-codex-worker.sh {task_file} {handoff_file} {status_file}",
  "workers": [
    { "name": "seed-check", "task": "シードされたファイルが作業開始前に存在することを確認してください。" }
  ]
}

トラブルシューティング

  • ペインが応答しない: ペインに直接切り替えるか、tmux capture-pane -pt <session>:0.<pane-index> で調査してください。
  • マージ競合: git worktreesを使用して、ペインごとにファイル変更を分離してください。
  • 高いトークン使用量: 並列ペインの数を減らしてください。各ペインは完全なエージェントセッションです。
  • tmuxが見つからない: brew install tmux(macOS)または apt install tmux(Linux)でインストールしてください。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

関連スキル