ghostex-agent-orchestration
Use this skill when a task needs Ghostex session coordination from the CLI. Before choosing commands, run or read:
ghostex --help
Treat that help output as the source of truth for current command names, selectors, flags, and aliases.
Core Loop
Inspect the workspace and available sessions:
ghostex sessions --json ghostex statePick stable selectors. Prefer session ids from JSON output. Titles and
project:titleselectors are acceptable for human-scale use, but exact ids are safer for automation.Act through Ghostex CLI commands.
Verify with
ghostex sessions --json,ghostex read-text,ghostex wait-for, orghostex assert-card.
Create Panes And Agents
Create a terminal pane:
ghostex create-session "Build watcher" --project-id <projectId> --group-id <groupId> --input "npm run dev"Create a configured agent pane:
ghostex create-agent <agentId> --group-id <groupId>Create or reuse a visible configured agent session and send it a prompt:
ghostex send-message <agentId> "Please investigate the failing test and report findings."
When project or group matters, pass explicit --project-id or --group-id
instead of relying on whichever project is currently focused in the UI.
Message Other Agent Sessions
Send a complete message and Enter:
ghostex send-message <selector> "Status check: please summarize what you are doing and any blockers."Type without Enter, then send Enter separately:
ghostex send-text <selector> "Please run the focused test." ghostex send-enter <selector>Press Enter in another session without typing new text:
ghostex send-enter <selector>Send control keys:
ghostex send-key <selector> ctrl-c
Use concise messages with the exact request, expected output, and whether the other agent should keep working or stop after reporting back.
Check Status And Read Output
List sessions and statuses:
ghostex sessions --jsonRead the last N lines from another session. Ghostex uses zmx under the hood for this, but agents should call the exposed Ghostex command:
ghostex read-text <selector> --lines 80 --jsonRead only currently visible text when that matters:
ghostex read-text <selector> --visible --jsonWait for a sidebar card projection or assert its state:
ghostex wait-for <selector> --timeout-ms 30000 ghostex assert-card <selector> --visible true
Manage Sessions
Use Ghostex commands for lifecycle and focus:
ghostex focus <selector> --json
ghostex sleep <selector> --json
ghostex wake <selector> --json
ghostex kill <selector> --json
Selectors can be an alias, session id, title, or project:title. Numeric
aliases come from the last ghostex sessions or gx sessions list.
Boundaries
- Do not drive Ghostex panes through raw zmx/tmux commands when a Ghostex CLI command exists.
- Use
$ghostex-browser-usefor embedded CEF browser panes. - Use
$ghostex-computer-usefor native macOS apps outside Ghostex.
Source: maddada/Ghostex — distributed by TomeVault.