Install
openclaw skills install preqstationDelegate 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 preqstationUse 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.background:true by default. Use foreground only when user explicitly asks for blocking/synchronous execution.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)branch_name (optional)branch_name=<value>branch_name: <value>branch=<value><value>-project_key, prefix with preqstation/<project_key>/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 executionprogress_mode (status update style)live, realtime, frequent, detailed: use livesparse, concise, summary-only, key events only: use sparsesparsecontext_compactionMEMORY.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.Resolve branch name using this priority:
branch_name from user messagepreqstation/<project_key>Rules:
<project_key> must be the resolved project key from MEMORY.md.project_key; if missing, prefix with preqstation/<project_key>/..., leading /, or empty result) and ask user for a valid branch name.After resolving project_cwd and project_key, prepare execution workspace:
<branch_name>${OPENCLAW_WORKTREE_ROOT:-/tmp/openclaw-worktrees}<worktree_root>/<project_key>/<branch_slug>branch_slug = <branch_name> with / replaced by -project_cwd before launching engine:git -C <project_cwd> worktree add -b <branch_name> <cwd> HEADgit -C <project_cwd> worktree add <cwd> <branch_name><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>
Branch Name: <branch_name or N/A>
User Objective: <objective>
Execution Requirements:
1) Work only inside <cwd>.
2) Complete the requested work.
3) Use branch <branch_name> for commits/pushes when provided.
4) 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 background mode by default.
| 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 (this skill defaults to true) |
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 (default background):
git -C <project_cwd> worktree add -b <branch_name> /tmp/openclaw-worktrees/<project_key>/<branch_slug> HEAD
bash pty:true workdir:/tmp/openclaw-worktrees/<project_key>/<branch_slug> background:true 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 (resolved branch naming)
git worktree add -b <branch_name> /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 <branch_name> /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, choose one of two modes:
sparse (default): low-frequency updates only on state changelive: higher-frequency updates while work is runningsparse: reduce token usage and messaging cost while preserving key visibility.How user can request mode in a message:
... progress live... live updates... progress sparse... sparse updatesWhen you spawn coding agents in the background, keep the user in the loop based on selected mode.
sparse mode:
live mode:
sparse.This prevents the user from seeing only "Agent failed before reply" and having no idea what happened.
OpenClaw thread context grows over time. Keep it compact during long background tasks:
sparse unless the user explicitly asks for live.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.