From toby-essentials
Sends tasks to a persistent Codex instance in a cmux pane via bash, retrieves output as markdown file. Triggers explicitly on 'toby codex' phrases to avoid confusion with codex-delegate.
npx claudepluginhub tobyilee/toby-plugins --plugin toby-essentialsThis skill uses the workspace's default tool permissions.
Send a prompt to the Codex pane in cmux and collect the result as a markdown file.
Sends tasks to a persistent Gemini pane in cmux using 'toby gemini' triggers and retrieves results as markdown files. Requires toby-team-starter for pane setup.
Runs Codex CLI, Claude Code, OpenCode, or Pi Coding Agent via bash processes with PTY support, background mode, workdir isolation, and stdin control actions.
Delegates coding tasks (debug, implement feature, refactor) to OpenAI Codex CLI via `codex exec`. Skips Node runtime overhead; Claude verifies output. Use for direct, fast execution.
Share bugs, ideas, or general feedback.
Send a prompt to the Codex pane in cmux and collect the result as a markdown file.
This skill works with a Codex instance already running in a cmux pane (typically started by toby-team-starter). It sends the user's task as a prompt, asks Codex to write the result to a file, then watches for that file and presents the result.
cmux tree --json
Parse the JSON to find a surface with title exactly "Codex" in the selected workspace. If not found, tell the user:
"Codex pane을 찾을 수 없습니다.
toby-team-starter스킬로 먼저 Codex pane을 시작하세요."
Save the Codex surface ref (e.g., surface:26).
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
RESULT_DIR="$(pwd)/tobyteam"
RESULT_FILE="$RESULT_DIR/codex-result-${TIMESTAMP}.md"
mkdir -p "$RESULT_DIR"
Build the prompt to send to Codex. The prompt wraps the user's task with instructions to write the result to the specific file path.
[USER'S TASK HERE]
When you are done, write your complete response (including any code, explanation, or analysis) to this file:
${RESULT_FILE}
Write the file using the Write tool or by running: cat > "${RESULT_FILE}" << 'RESULT_EOF'
[your response here]
RESULT_EOF
Send the prompt text via cmux send, then send an Enter key to submit. Codex's composer needs an explicit Enter press — cmux send inserts text but doesn't submit it.
cmux send --surface <codex_surface_ref> "<prompt>"
cmux send-key --surface <codex_surface_ref> enter
For prompts with special characters (quotes, backticks, $), escape them properly or use single quotes. For very long prompts, write to a temp file:
PROMPT_FILE=$(mktemp /tmp/codex-prompt-XXXXXX.txt)
# Write prompt content to PROMPT_FILE
cmux send --surface <codex_surface_ref> "$(cat "$PROMPT_FILE")"
cmux send-key --surface <codex_surface_ref> enter
rm "$PROMPT_FILE"
Start a background process that polls for the result file. Use Bash with run_in_background: true:
# Poll every 3 seconds for up to 30 minutes (600 checks)
RESULT_FILE="<result_file_path>"
for i in $(seq 1 600); do
if [ -f "$RESULT_FILE" ] && [ -s "$RESULT_FILE" ]; then
echo "RESULT_READY: $RESULT_FILE"
cat "$RESULT_FILE"
exit 0
fi
sleep 3
done
echo "TIMEOUT: Codex did not write result within 30 minutes"
exit 1
Tell the user the prompt has been sent:
"Codex pane에 프롬프트를 전송했습니다. 결과 파일을 기다리고 있습니다:
tobyteam/codex-result-{timestamp}.md"
The background process will notify when the file appears. When the task notification arrives, read the result file and present it to the user.
When the background watcher completes:
Codex Result (
tobyteam/codex-result-{timestamp}.md)
"Codex가 30분 내에 결과를 작성하지 않았습니다. Codex pane을 직접 확인해 주세요."
cmux send, then cmux send-key enter to submit. This two-step approach is necessary because cmux send inserts text into the composer but doesn't submit it.tobyteam/ directory is created automatically if it doesn't exist.tobyteam/ — the user can clean them up as needed.