Install
openclaw skills install preqstation-openclawDelegate PREQSTATION coding tasks to Claude Code, Codex CLI, or Gemini CLI with PTY-safe execution (workdir + background + monitoring). Use when building, refactoring, or reviewing code in mapped workspaces. NOT for one-line edits or read-only inspection.
openclaw skills install preqstation-openclawUse this skill for natural-language requests to execute PREQSTATION-related work with local CLI engines.
Trigger this skill with highest priority when the message contains any of:
/skill preqstationpreqstationpreqDo NOT use this skill for:
~/clawd/ or ~/.openclaw//skill preqstation: implement the PROJ-1preqstation: plan PROJ-76 using Claude Codepreq: implement PROJ-1pty:true.claude.~/clawd/ or ~/.openclaw/.<cwd> only.git must be installed and available on PATH.claude, codex, or gemini.OPENCLAW_WORKTREE_ROOT (optional, default /tmp/openclaw-worktrees)MEMORY.md project mappings with absolute paths.Before running any engine command:
command -v gitcommand -v <engine>cwd is a resolved git worktree path for this task.~/clawd/ / ~/.openclaw/.dangerously-* / sandbox-disable flags only for actual coding execution with local trusted CLIs.Parse from user message:
engineclaude, codex, or geminiclaudetask<KEY>-<number> (example: PRJ-284)project_cwd (required to prepare execution)project key from MEMORY.mdMEMORY.md project key, use that pathMEMORY.md, then continue executionMEMORY.md, always ask the user before execution (do not guess)objectivecwd (required to execute)project_cwdproject_cwd is not a git checkout, ask for a git workspace path before executionMEMORY.md from this repository root.Projects table (key | cwd | note).MEMORY.md first, then confirm.PROS-102 -> pros).Projects table only.| <key> | <absolute-path> | <note> |.note; otherwise use workspace.When project_cwd cannot be resolved, or exact project key is missing in MEMORY.md:
MEMORY.md row immediately.project_cwd, then create task worktree cwd and execute.Use this format for worktree branches:
codex/<project_key>
Rules:
<project_key> must be the resolved project key from MEMORY.md.<project_key> to lowercase and kebab-case.After resolving project_cwd and project_key, prepare execution workspace:
codex/<project_key>${OPENCLAW_WORKTREE_ROOT:-/tmp/openclaw-worktrees}<worktree_root>/<project_key>project_cwd before launching engine:git -C <project_cwd> worktree add -b codex/<project_key> <cwd> HEADgit -C <project_cwd> worktree add <cwd> codex/<project_key><cwd> for prompt rendering and engine execution.Do not forward raw user text directly. Render this template:
In this template, <cwd> must be the task worktree path (not the primary checkout path).
Task ID: <task or N/A>
Project Key: <project key or N/A>
User Objective: <objective>
Execution Requirements:
1) Work only inside <cwd>.
2) Complete the requested work.
3) After completion, return a short completion summary.
All engine commands must be launched via bash with PTY and explicit workdir.
Why dangerously-* flags are retained:
bash pty:true workdir:<cwd> command:"claude --dangerously-skip-permissions '<rendered_prompt>'"
bash pty:true workdir:<cwd> command:"codex exec --dangerously-bypass-approvals-and-sandbox '<rendered_prompt>'"
bash pty:true workdir:<cwd> command:"GEMINI_SANDBOX=false gemini -p '<rendered_prompt>'"
Use bash with PTY and optional background mode.
| Parameter | Type | Required | Purpose |
|---|---|---|---|
command | string | yes | Engine command to run |
pty | boolean | yes | Must be true for coding-agent CLIs |
workdir | string | yes | Per-task worktree <cwd> |
background | boolean | no | Run asynchronously and return session id |
timeout | number | no | Hard timeout in seconds |
elevated | boolean | no | Host execution if policy allows |
Use these actions as standard controls:
list: list sessionspoll: check running/done statuslog: read incremental outputwrite: send raw stdinsubmit: send stdin + newlinekill: terminate a session only when requiredCreate a task worktree, then run inside that worktree:
git -C <project_cwd> worktree add -b codex/<project_key> /tmp/openclaw-worktrees/<project_key> HEAD
bash pty:true workdir:/tmp/openclaw-worktrees/<project_key> command:"codex exec --dangerously-bypass-approvals-and-sandbox '<rendered_prompt>'"
The Pattern: workdir + background + pty For longer tasks, use background mode with PTY:
# Start agent in task worktree (with PTY!)
bash pty:true workdir:<cwd> background:true command:"codex exec --full-auto 'Build a snake game'"
# Returns sessionId for tracking
# Monitor progress
process action:log sessionId:XXX
# Check if done
process action:poll sessionId:XXX
# Send input (if agent asks a question)
process action:write sessionId:XXX data:"y"
# Submit with Enter (like typing "yes" and pressing Enter)
process action:submit sessionId:XXX data:"yes"
# Kill if needed
process action:kill sessionId:XXX
Why workdir matters: Agent wakes up in a focused directory, doesn't wander off reading unrelated files (like your soul.md 😅).
process action:write sessionId:<id> data:"y"
process action:submit sessionId:<id> data:"yes"
Never run PR review in live OpenClaw folders.
# default: git worktree review (project-key based branch naming)
git worktree add -b codex/<project_key> /tmp/<project_key>-review <base_branch>
bash pty:true workdir:/tmp/<project_key>-review command:"codex review --base <base_branch>"
# fallback: temp clone review (only when local checkout is unavailable)
REVIEW_DIR=$(mktemp -d)
git clone <repo> "$REVIEW_DIR"
cd "$REVIEW_DIR" && gh pr checkout <pr_number>
bash pty:true workdir:"$REVIEW_DIR" command:"codex review --base origin/main"
git worktree add -b codex/<project_key> /tmp/<project_key> main
bash pty:true workdir:/tmp/<project_key> background:true command:"codex exec --dangerously-bypass-approvals-and-sandbox 'Fix issue #101. Commit after validation.'"
bash pty:true workdir:/tmp/<project_key> background:true command:"codex exec --dangerously-bypass-approvals-and-sandbox 'Fix issue #102. Commit after validation.'"
process action:list
process action:log sessionId:<id>
For background runs:
When you spawn coding agents in the background, keep the user in the loop.
This prevents the user from seeing only "Agent failed before reply" and having no idea what happened.
For long-running jobs, append a completion trigger to the rendered prompt:
When completely finished, run this command:
openclaw system event --text "Done: <brief summary>" --mode now
Example:
bash pty:true workdir:<cwd> background:true command:"codex exec --dangerously-bypass-approvals-and-sandbox '<rendered_prompt>
When completely finished, run:
openclaw system event --text \"Done: implemented requested PREQSTATION task\" --mode now'"
Return only a short completion summary.
Success format:
completed: <task or N/A> via <engine> at <cwd>
Failure format:
failed: <task or N/A> via <engine> at <cwd or N/A> - <short reason>
Do not dump raw stdout/stderr unless user explicitly asks.