PREQSTATION agent package with both:
- Skill instructions for direct REST usage
- MCP plugin server for Codex/Claude Code
This repository owns the core agent-side skill name preqstation. The OpenClaw launcher skill is separate and should use preqstation-dispatch.
npx skills add sonim1/preqstation-skill -g -a claude-code
npx skills add sonim1/preqstation-skill -g -a codex
npx skills add sonim1/preqstation-skill -g -a gemini-cliInstall only on the agents that should own the core preqstation skill. Avoid bare -g installs if you do not want OpenClaw linked through the shared skills store.
PREQ engine values match the skill install target keys:
claude-codecodexgemini-cli
export PREQSTATION_API_URL="https://your-preqstation-domain.vercel.app"
export PREQSTATION_TOKEN="preq_xxxxxxxxxxxxxxxxx"Optional (when client name auto-detection is unavailable):
export PREQSTATION_ENGINE="codex" # claude-code | codex | gemini-cliAdd an MCP server entry that launches:
node /ABSOLUTE/PATH/TO/preqstation-skill/scripts/preqstation-mcp-server.mjsExample MCP server config:
{
"mcpServers": {
"preqstation": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/preqstation-skill/scripts/preqstation-mcp-server.mjs"],
"env": {
"PREQSTATION_API_URL": "https://your-preqstation-domain.vercel.app",
"PREQSTATION_TOKEN": "preq_xxxxxxxxxxxxxxxxx"
}
}
}
}preq_list_tasks: workflow status filter (inbox/todo/hold/ready/done/archived,projectKeyoptional)preq_get_task: fetch single ticket detail by ticket numberpreq_get_project_settings: fetch project settings by key (/api/projects/:key/settings)preq_plan_task: assignengine, send lifecycle actionplan, promoteinbox -> todo, and clearrun_statepreq_create_task: create a new task in Inbox (internal status) via/api/taskspreq_start_task: recordengineclaiming the task and send lifecycle actionstartso backend marksrun_state=workingpreq_update_task_status: workflow status-only update (inbox/todo/hold/ready/done/archived) via/api/tasks/:id/statuspreq_complete_task: recordengine, upload result payload, send lifecycle actioncomplete, move task toready, and clearrun_statepreq_review_task: recordengine, run verification fromready, send lifecycle actionreview, move task todone, and clearrun_statepreq_block_task: recordengine, send lifecycle actionblock, move task tohold, and clearrun_statepreq_delete_task: permanently delete a task by ticket number or UUID
Engine is always attached by MCP mutation tools (create/plan/start/update_status/complete/review/block) using this priority:
- Explicit
engineargument - Existing task
engine(for plan/complete flows) - MCP client
initialize.clientInfo.nameauto-detection PREQSTATION_ENGINEenv var (if set)- Fallback:
codex
Normal PREQ runs must use semantic lifecycle actions. preq_update_task_status is manual override only, and agents should not send workflow status or run_state literals directly in the normal lifecycle flow.
Workflow status and execution state are separate:
- workflow status:
inbox,todo,hold,ready,done,archived run_state:queued,working,null
Telegram/OpenClaw dispatch can set run_state=queued before an engine picks the task up. The engine must then call preq_start_task immediately after preq_get_task so backend records run_state=working before any substantive work begins.
Follow the PREQ lifecycle exactly. Do not skip, reorder, combine, or substitute lifecycle actions.
- Call
preq_get_taskonce at the start to fetch task details, acceptance criteria, workflow status,run_state, and the initial engine. - Resolve the initial workflow status once and execute exactly one matching branch below. Do not chain lifecycle branches in a single run.
If user objective is plan:
- Call order:
preq_get_task→preq_start_task→ read local code →preq_plan_task - Call
preq_plan_taskwith plan markdown and acceptance criteria - Planning means plan generation only. Do not run tests, build, lint, implement, deploy, or continue into another branch in the same run
- Stop after backend moves the task to
todoand clearsrun_state
If user objective is implement or resume:
- Call order:
preq_get_task→preq_start_task→ implement/test/deploy →preq_complete_task - Implement code changes and run task-level tests
- Resolve deploy strategy before git actions
- Stop after backend moves the task to
readyand clearsrun_state
If user objective is review:
- Call order:
preq_get_task→preq_start_task→ verify →preq_review_task - Run verification (
tests,build,lint) - Stop after backend moves the task to
done
On any failure in an active branch, call preq_block_task with the blocking reason and stop.
Branch handling:
- Use task
branchas canonicalbranch_namefor git push/PR when present. preq_complete_tasknow supports optional branch propagation:- MCP:
branchNameinput - Shell helper: 7th argument
[branch_name]
- MCP:
Deployment strategy handling (required before git actions):
- Resolve strategy from
preq_get_taskresponse:deploy_strategy.strategy/default_branch/auto_pr/commit_on_review. - If missing in task payload, fetch
preq_get_project_settings <projectKey>and usesettings.deploy_*. - Execute git flow by strategy:
none: no git commit/push/PRdirect_commit: commit/pushdefault_branchfeature_branch: push feature branch, create PR only whenauto_pr=true
SKILL.md: main skill instructionsscripts/preqstation-api.sh: shell helper wrappers for task APIsscripts/preqstation-mcp-server.mjs: MCP stdio server for Codex/Claude Code
Register PREQSTATION MCP server with env vars:
claude mcp add -s user \
--env='PREQSTATION_API_URL=https://<your-domain>' \
--env='PREQSTATION_TOKEN=preq_xxxxx' \
preqstation -- \
node /Users/kendrick/projects/preqstation-skill/scripts/preqstation-mcp-server.mjsIf already registered, remove and re-add:
claude mcp remove -s user preqstationCheck registration:
claude mcp list
claude mcp get preqstationRegister PREQSTATION MCP server with env vars:
codex mcp add preqstation \
--env='PREQSTATION_API_URL=https://<your-domain>' \
--env='PREQSTATION_TOKEN=preq_xxxxx' \
-- node /Users/kendrick/projects/preqstation-skill/scripts/preqstation-mcp-server.mjsIf already registered, remove and re-add:
codex mcp remove preqstationCheck registration:
codex mcp list
codex mcp get preqstation