preqstation

📁 sonim1/preqstation-skill 📅 6 days ago
15
总安装量
13
周安装量
#21910
全站排名
安装命令
npx skills add https://github.com/sonim1/preqstation-skill --skill preqstation

Agent 安装分布

claude-code 13
openclaw 12
antigravity 12
github-copilot 12
codex 12
kimi-cli 12

Skill 文档

Environment

  • PREQSTATION_API_URL: PREQSTATION API base URL (example: https://mypreqstation.vercel.app)
  • PREQSTATION_TOKEN: PREQSTATION Bearer token (generated in PREQSTATION /api-keys)
  • PREQSTATION_ENGINE (optional): fallback engine (claude | codex | gemini) when client auto-detection is unavailable

Agent Identity & Engine Mapping

Each agent must identify itself and use the corresponding engine value in all task operations (list, create, plan, start, complete, block):

If you are… Use engine=
Claude (Anthropic) claude
GPT / Codex (OpenAI) codex
Gemini (Google) gemini

Always include your engine value when listing, creating, planning, starting, completing, or blocking tasks.

MCP Plugin Mode (Recommended)

If MCP is available, prefer scripts/preqstation-mcp-server.mjs tools. All mutation tools accept an optional engine parameter and always send an engine value using this order:

  1. explicit tool arg
  2. existing task engine (when available)
  3. MCP initialize.clientInfo.name auto-detection
  4. PREQSTATION_ENGINE
  5. codex fallback
Tool engine usage
preq_list_tasks Filter tasks by engine
preq_get_task Read-only, no engine needed
preq_plan_task Assign engine when planning task → todo
preq_create_task Assign engine to new inbox task
preq_start_task Record engine starting the work → in_progress
preq_complete_task Record engine in work log result → review (fallback to task’s existing engine)
preq_block_task Record engine reporting the block → blocked

This gives deterministic task-id based execution and result upload.

Shell Helper Mode

If MCP is not available, source scripts/preqstation-api.sh and use shell functions. All mutation helpers accept an engine parameter:

Function Signature
preq_get_tasks preq_get_tasks [status] [engine] [label]
preq_get_task preq_get_task <task_id>
preq_create_task preq_create_task '<json_payload>' (include engine in JSON)
preq_patch_task preq_patch_task <task_id> '<json_payload>' (generic PATCH)
preq_start_task preq_start_task <task_id> [engine]
preq_plan_task preq_plan_task <task_id> <plan_markdown> [engine]
preq_complete_task preq_complete_task <task_id> <summary> [engine] [pr_url] [tests] [notes]
preq_block_task preq_block_task <task_id> <reason> [engine]
preq_delete_task preq_delete_task <task_id>

Requires jq for JSON construction in plan/complete/block helpers.

List Todo Tasks

List todo tasks assigned to your engine:

# Replace ENGINE with your engine value (claude, codex, or gemini)
curl -s -H "Authorization: Bearer $PREQSTATION_TOKEN" \
  "$PREQSTATION_API_URL/api/tasks?status=todo&engine=ENGINE" | jq .

Fetch Task Detail

TASK_ID="<task-id>"
curl -s -H "Authorization: Bearer $PREQSTATION_TOKEN" \
  "$PREQSTATION_API_URL/api/tasks/$TASK_ID" | jq .

Recommended Execution Flow

  1. Fetch the task detail from PREQSTATION (verify engine matches your identity).
  2. Move status to in_progress with your engine.
  3. Implement code changes according to acceptance criteria.
  4. Run tests/verification.
  5. Push status=review (In Review) and result back to PREQSTATION with your engine and the same ticket number.
  6. Confirm result appears in PREQSTATION work logs.

preq_complete_task must be used only after the task is moved to in_progress.

Inbox → Todo Plan Flow

  1. User adds short task card to Inbox (optionally specifying engine).
  2. Agent loads candidate tasks with preq_list_tasks (use projectKey + status=todo + own engine filter).
  3. Agent reads local source code and generates implementation plan with LLM.
  4. Agent calls preq_plan_task with projectKey, taskId, planMarkdown, engine, and optional acceptanceCriteria.
  5. MCP uploads plan to task description and moves the card to status=todo.

Create Task with Engine

curl -s -X POST \
  -H "Authorization: Bearer $PREQSTATION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title":"Implement rate limiting",
    "engine":"claude",
    "projectKey":"MY_PROJECT"
  }' \
  "$PREQSTATION_API_URL/api/tasks" | jq .

Mark In Progress (with Engine)

curl -s -X PATCH \
  -H "Authorization: Bearer $PREQSTATION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"status":"in_progress","engine":"claude"}' \
  "$PREQSTATION_API_URL/api/tasks/$TASK_ID" | jq .

Submit In Review Result (with Engine)

curl -s -X PATCH \
  -H "Authorization: Bearer $PREQSTATION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "status":"review",
    "engine":"claude",
    "result":{
      "summary":"Implemented rate limiting for login endpoint",
      "engine":"claude",
      "pr_url":"https://github.com/org/repo/pull/123",
      "tests":"npm run test",
      "completed_at":"2025-02-24T12:00:00Z"
    }
  }' \
  "$PREQSTATION_API_URL/api/tasks/$TASK_ID" | jq .

Blocked Update (with Engine)

curl -s -X PATCH \
  -H "Authorization: Bearer $PREQSTATION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "status":"blocked",
    "engine":"claude",
    "result":{
      "reason":"Missing required Redis environment variables",
      "engine":"claude",
      "blocked_at":"2025-02-24T12:00:00Z"
    }
  }' \
  "$PREQSTATION_API_URL/api/tasks/$TASK_ID" | jq .

Plan Task (with Engine)

curl -s -X PATCH \
  -H "Authorization: Bearer $PREQSTATION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "status":"todo",
    "engine":"claude",
    "description":"## Plan\n\n1. Add middleware...\n2. Write tests..."
  }' \
  "$PREQSTATION_API_URL/api/tasks/$TASK_ID" | jq .