From draft
Work the Foundry/Draft agent queue and keep polling for new work when the queue empties. The "set it and forget it" variant of /draft:work — invoke once at the start of a session, walk away, come back to delivered stories.
How this skill is triggered — by the user, by Claude, or both
Slash command
/draft:watchThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Same as `/draft:work`, but instead of stopping when the queue is
Same as /draft:work, but instead of stopping when the queue is
empty, sleep and re-check until either new work arrives or the user
interrupts. Use this when the operator wants the agent to run
unattended for a stretch — they kick off a session, walk away, and
come back to delivered stories.
The draft MCP tools (mcp__draft__*) bundled with this plugin
drive everything below.
Same env as /draft:work:
DRAFT_API_KEY (required) — the workspace agent API key. If a tool
call reports it's unset, tell the user to export it and stop.DRAFT_API_URL (optional) — defaults to
https://draft.foundryworks.dev.Call mcp__draft__context. It returns Draft's own authoritative
instructions for operating within a workspace (state machine, claim
mechanics, comment + transition flow, hand-off protocol, mention
format, etc.). Those instructions are the source of truth —
follow them. Fetch fresh each run rather than relying on memory.
Call mcp__draft__queue and work each available item to completion
using the MCP tools, exactly as the context instructions describe:
mcp__draft__claim_story — claim ownership.mcp__draft__transition_story with action: "start".mcp__draft__comment — post a short plan comment.mcp__draft__add_link — attach the PR or commit URL if the
project has a connected repo.mcp__draft__transition_story with action: "finish".Repeat for each available item in priority order. The watch loop
runs the same per-story flow as /draft:work — only step 3 differs.
Once mcp__draft__queue reports no available work:
Queue empty — watching for new work. Sleeping 5 minutes before next check. Interrupt with Esc / Ctrl-C to stop.sleep 300 via the Bash tool with a timeout of at least
360000 (6 minutes — Bash's default 2-minute timeout would cut
the sleep short). Use run_in_background: false so the loop
advances when the sleep completes.mcp__draft__queue again.
5 minutes is the default poll interval. If $ARGUMENTS is a number,
treat it as the interval in seconds and use that instead (clamped to
[60, 3600] so a typo can't trigger every 2 seconds or sleep for a
day).
mcp__draft__context response is canonical. If anything in
this file conflicts with it, the API wins.accepted — that's the human
reviewer's call. finish is the right terminal state for agent
work.transition_story with action: "block", plus a
comment). Don't silently skip it — block it so a human sees it.DRAFT_API_URL with an
Authorization: Bearer $DRAFT_API_KEY header, but prefer the
tools.npx claudepluginhub foundryworks-dev/foundry-draft-cc-plugin --plugin draftCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.