Communitygithub.com

dmuxワークフロー

dmux(AIエージェント向けtmuxペインマネージャー)を使用したマルチエージェントオーケストレーション。Claude Code、Codex、OpenCode、その他のハーネスで並列エージェントワークフローを実現します。複数のエージェントセッションを並列実行する際や、マルチエージェント開発ワークフローを調整する際に使用します。

dmuxワークフロー とは?

dmux Workflowsは、tmuxベースのペインマネージャー「dmux」を活用して複数のAIエージェントセッションを並列実行・調整するためのスキルです。Claude Code、Codex、OpenCode、Cline、Gemini、Qwenなど複数のエージェントハーネスをサポートし、`n`キーで新しいペインを作成、`m`キーで結果をメインセッションに統合する直感的な操作を提供します。これにより、研究と実装の並列化、マルチファイル機能の並行開発、テスト・修正ループ、異なるAIツールの協調、コードレビューパイプラインなど、5つの実用的なワークフローパターンを実現できます。また、git worktreeとの統合によりファイル競合を回避し、大規模オーケストレーションにはSuperset、同一セッション内の並列処理にはClaude CodeのTask Toolなど、補完ツールとの併用も想定されています。ECC Helperを使用すると、計画JSONファイルに基づいて自動的にワークツリーを作成し、tmuxセッションで各ワーカーを起動する高度なオーケストレーションも可能です。パフォーマンス面では、ペイン数を5〜6以下に保つなどリソース管理のベストプラクティスも提供しています。

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

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

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

ドキュメント

dmux ワークフロー

dmux(AIエージェント向け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 worktreeの使用。 ファイル競合が発生しやすい作業では、ペインごとに別々のワークツリーを使用してください。
  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セッションを開始
  • 各ワーカーコマンドをそれぞれのペインで起動
  • メインペインはオーケストレーター用に解放

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

{
  "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ワークツリーを使用して、ファイルの変更をペインごとに分離してください。
  • トークン使用量が多い: 並列ペインの数を減らしてください。各ペインは完全なエージェントセッションです。
  • 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/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

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.

関連スキル