tjl8787/mycodex-skills / skills/multi-codex-orchestration
multi-codex-orchestration
VerifiedUse when the user explicitly wants multiple Codex agents or a virtual team, the work can be decomposed into safe parallel roles, and tgtool should coordinate a Ruflo-backed orchestration path.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 6.8 KB |
| scripts/bootstrap_ruflo_backend.pyexecutable | script | 3.4 KB |
| scripts/build_claude_flow_payload.pyexecutable | script | 1.4 KB |
| scripts/ensure_ruflo_init.pyexecutable | script | 2.7 KB |
| scripts/launch_explicit_tmux.pyexecutable | script | 3.6 KB |
| scripts/normalize_claude_flow_result.pyexecutable | script | 1.1 KB |
| scripts/probe_ruflo_execution.py | script | 4.6 KB |
| templates/claude-flow-result-example.json | config | 431 B |
scripts/launch_explicit_tmux.py
View on GitHub#!/usr/bin/env python3
import argparse
import shlex
import subprocess
from pathlib import Path
def run(cmd: list[str], check: bool = True) -> subprocess.CompletedProcess:
return subprocess.run(cmd, check=check, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
def has_tmux_session(session: str) -> bool:
proc = subprocess.run(
["tmux", "has-session", "-t", session],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
)
return proc.returncode == 0
def create_two_pane_session(session: str, cwd: Path) -> None:
run(["tmux", "new-session", "-d", "-s", session, "-c", str(cwd)])
run(["tmux", "split-window", "-h", "-t", f"{session}:0"])
run(["tmux", "set", "-g", "mouse", "on"])
run(["tmux", "set", "-g", "set-clipboard", "on"])
run(["tmux", "setw", "-t", f"{session}:0", "synchronize-panes", "off"])
run(
[
"tmux",
"send-keys",
"-t",
f"{session}:0.0",
"clear; echo '[operator] active execution pane'; pwd",
"C-m",
]
)
run(
[
"tmux",
"send-keys",
"-t",
f"{session}:0.1",
"clear; echo '[critic] dormant by default (wake on failure/stage switch/review)'; pwd",
"C-m",
]
)
def try_open_foreground(session: str) -> str:
if "TMUX" in __import__("os").environ:
run(["tmux", "switch-client", "-t", session], check=False)
return "switched current tmux client"
env = __import__("os").environ
if not env.get("DISPLAY"):
return "no DISPLAY; foreground popup skipped"
attach_cmd = f"tmux attach -t {shlex.quote(session)}"
terminal_cmds = [
["x-terminal-emulator", "-e", "bash", "-lc", attach_cmd],
["gnome-terminal", "--", "bash", "-lc", attach_cmd],
["xfce4-terminal", "--command", f"bash -lc {shlex.quote(attach_cmd)}"],
["konsole", "-e", "bash", "-lc", attach_cmd],
["xterm", "-e", "bash", "-lc", attach_cmd],
]
for cmd in terminal_cmds:
try:
subprocess.Popen(
cmd,
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
start_new_session=True,
)
return f"opened terminal: {cmd[0]}"
except FileNotFoundError:
continue
except Exception:
continue
return "failed to launch terminal emulator; manual attach required"
def main() -> int:
parser = argparse.ArgumentParser(
description="Launch a visible 2-pane tmux multi-agent session (operator + critic)."
)
parser.add_argument("--session", default="tgtool-visible")
parser.add_argument("--cwd", default=".")
parser.add_argument("--force-recreate", action="store_true")
args = parser.parse_args()
cwd = Path(args.cwd).resolve()
if args.force_recreate and has_tmux_session(args.session):
run(["tmux", "kill-session", "-t", args.session], check=False)
created = False
if not has_tmux_session(args.session):
create_two_pane_session(args.session, cwd)
created = True
open_result = try_open_foreground(args.session)
print(
"\n".join(
[
f"session={args.session}",
f"created={str(created).lower()}",
"panes=2 (operator, critic)",
f"foreground={open_result}",
f"manual_attach=tmux attach -t {args.session}",
]
)
)
return 0
if __name__ == "__main__":
raise SystemExit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |