Agent skill
codex-review
tmux で動作する Codex CLI にプロンプトを送信し、ポーリングでレスポンスが完了するまで待機して取得する。「codex に聞いて」「codex で調べて」などのリクエストで使用。
Install this agent skill to your Project
npx add-skill https://github.com/uuta/dotfiles/tree/main/skills/codex-review
SKILL.md
Codex tmux Skill
Sends a prompt to a Codex CLI session running in a tmux pane and polls until the response is complete.
Procedure
1. Identify the Codex pane
tmux list-panes -a -F '#{session_name}:#{window_index}.#{pane_index} #{pane_current_command} #{pane_title}'
Find the pane whose command is codex (or node if Codex is running via Node).
If the user didn't specify a pane, pick the first match.
If no matching pane is found, proceed to Step 1.5 to auto-launch Codex.
Otherwise, set <pane> to the matched pane and skip to Step 2.
1.5. Auto-launch Codex (only if no pane found in Step 1)
# Create a new window named "codex" in the main session
tmux new-window -t main -n codex
# Launch codex (inherits env from shell, including API keys via ~/.zshrc)
tmux send-keys -t main:codex 'codex' C-m
Then poll every 2 s until the › idle prompt appears (max 30 s):
for i in $(seq 1 15); do
sleep 2
output=$(tmux capture-pane -p -t main:codex -S -50)
echo "$output" | grep -qE '›\s*$' && break
done
Set <pane> to main:codex.
If the loop completes without seeing › , abort and report:
"Codex の起動を確認できませんでした。
codexコマンドが PATH にあるか確認してください。"
2. Capture a baseline snapshot
tmux capture-pane -p -t <pane> -S -200
Save this as the baseline so you know where the new response starts.
3. Send the prompt
Detect whether $prompt contains newlines and use the appropriate method:
Single-line prompt:
tmux send-keys -t <pane> '<prompt>' C-m
Multi-line prompt (contains \n):
# 1. Write to temp file
printf '%s' "$prompt" > /tmp/tmux_send.txt
# 2. Load into tmux buffer
tmux load-buffer /tmp/tmux_send.txt
# 3. Paste into pane (preserves newlines)
tmux paste-buffer -t <pane>
sleep 0.5
# 4. Execute
tmux send-keys -t <pane> C-m
4. Poll until response is complete
Repeat every 3 seconds (max 120 s total):
tmux capture-pane -p -t <pane> -S -200
Stop polling when either condition is met:
- The last non-empty line of the captured output ends with
›(Codex idle prompt) - Two consecutive captures are identical (output has stabilised)
5. Extract and return the response
Take the diff between the baseline and the final capture. Strip the trailing
› prompt line. Return the extracted text to the user.
6. Timeout handling
If 120 s elapse without detecting completion, return whatever was captured and note that the timeout was reached so the user can check manually.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
pbi-sub-issue
タスク分割プラン(pbi-task-splitで作成)を元に、GitHub の Sub-issue を作成する。親 Issue との関係も自動で設定。
dev
Orchestrate TDD-based development workflow. Checks workflow state and delegates work to subagents (dev-plan, dev-step, create-pr).
neo-frontend-design
Create dark command-center / cyberpunk dashboard interfaces inspired by the OJPP Portal design. Use this skill when the user asks for a dark, neon-accented, terminal-aesthetic UI. Generates production-grade code with glitch effects, monospace typography, and per-module neon color coding.
tdd-plan
Create implementation plans following TDD methodology with test-first approach. Each test file is immediately followed by its implementation (fine-grained RED→GREEN cycles).
prototype
Generate 3 HTML prototype variants using a team of parallel agents. Each agent creates a distinct design pattern (e.g., hover effects, animations, layouts) based on user prompts or docs/goal.md. Use when the user wants to explore multiple design directions for a UI component.
review-format
Output in the specified format when a review of specific markdown is requested.
Didn't find tool you were looking for?