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/bootstrap_ruflo_backend.py
View on GitHub#!/usr/bin/env python3
import argparse
import json
import subprocess
import sys
from pathlib import Path
def run_shell(project_dir: Path, command: str) -> subprocess.CompletedProcess:
shell_cmd = (
'source /home/jetio/.nvm/nvm.sh '
'&& nvm use 20 >/dev/null '
f'&& cd {project_dir} && {command}'
)
return subprocess.run(
['/bin/bash', '-lc', shell_cmd],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
text=True,
)
def detect_state(project_dir: Path) -> dict:
return {
'project_dir': str(project_dir),
'codex_initialized': (project_dir / 'AGENTS.md').exists() and (project_dir / '.agents' / 'config.toml').exists(),
'runtime_initialized': (project_dir / '.claude-flow' / 'config.yaml').exists(),
}
def maybe_step(steps: list, name: str, command: str, project_dir: Path, enabled: bool = True) -> bool:
if not enabled:
steps.append({'step': name, 'skipped': True})
return True
proc = run_shell(project_dir, command)
steps.append({
'step': name,
'command': command,
'exit_code': proc.returncode,
'ok': proc.returncode == 0,
'output_tail': '\n'.join(proc.stdout.splitlines()[-20:]),
})
return proc.returncode == 0
def main() -> int:
parser = argparse.ArgumentParser(description='Bootstrap a usable Ruflo backend for multi-codex orchestration.')
parser.add_argument('--project-dir', default='.')
parser.add_argument('--with-daemon', action='store_true')
parser.add_argument('--skip-swarm', action='store_true')
args = parser.parse_args()
project_dir = Path(args.project_dir).resolve()
steps = []
state_before = detect_state(project_dir)
ok = True
if not state_before['codex_initialized']:
ok = maybe_step(steps, 'init_codex', 'ruflo init --codex', project_dir) and ok
else:
steps.append({'step': 'init_codex', 'skipped': True, 'reason': 'already initialized'})
state_mid = detect_state(project_dir)
if ok and not state_mid['runtime_initialized']:
ok = maybe_step(steps, 'init_runtime', 'ruflo init --minimal --force', project_dir) and ok
else:
steps.append({'step': 'init_runtime', 'skipped': True, 'reason': 'already initialized' if state_mid['runtime_initialized'] else 'prior step failed'})
if ok:
ok = maybe_step(steps, 'init_swarm', 'ruflo swarm init --v3-mode', project_dir, enabled=not args.skip_swarm) and ok
else:
steps.append({'step': 'init_swarm', 'skipped': True, 'reason': 'prior step failed'})
if ok:
maybe_step(steps, 'daemon_start', 'ruflo daemon start', project_dir, enabled=args.with_daemon)
else:
steps.append({'step': 'daemon_start', 'skipped': True, 'reason': 'prior step failed'})
state_after = detect_state(project_dir)
result = {
'project_dir': str(project_dir),
'ok': ok,
'state_before': state_before,
'state_after': state_after,
'steps': steps,
'recommended_next': 'ruflo swarm status' if ok and not args.skip_swarm else 'ruflo status',
'notes': [
'daemon_start is optional because local daemon persistence may vary by environment',
'phase-1 tgtool integration can treat this helper as the default Ruflo bootstrap path',
],
}
print(json.dumps(result, indent=2, sort_keys=True))
return 0 if ok else 1
if __name__ == '__main__':
sys.exit(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 |