flow-next-work
Executes tasks from a Flow specification systematically.
Install
mkdir -p .claude/skills/flow-next-work && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/6106" && unzip -o skill.zip -d .claude/skills/flow-next-work && rm skill.zipInstalls to .claude/skills/flow-next-work
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Execute a Flow spec or task systematically with git setup, task tracking, quality checks, and commit workflow. Use when implementing a plan or working through a spec. Triggers on /flow-next:work with Flow IDs (fn-1-add-oauth, fn-1-add-oauth.2, or legacy fn-1, fn-1.2, fn-1-xxx, fn-1-xxx.2).Key capabilities
- →Execute tasks defined in Flow specifications
- →Manage git staging for task completion
- →Verify task status via flowctl
- →Run quality checks before task finalization
- →Handle autonomous task execution
How it works
The skill uses a bundled flowctl script to track task state within a .flow/ directory, enforcing specific git workflows and verification steps for each task.
Inputs & outputs
When to use flow-next-work
- →Implementing project specifications
- →Tracking task progress
- →Running quality checks
- →Executing development workflows
About this skill
Flow work
Execute a plan systematically. Focus on finishing.
Follow this skill and linked workflows exactly. Deviations cause drift, bad gates, retries, and user frustration.
.flow/ is the only task tracker. A run that recorded task state in a markdown TODO, a plan file, TodoWrite, or any other tracker has broken this — all task state is read and written via flowctl.
Preamble
CRITICAL: flowctl is BUNDLED — NOT installed globally. which flowctl will fail (expected). Define once; subsequent blocks (here and in phases.md) use $FLOWCTL:
FLOWCTL="${DROID_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/scripts/flowctl"
[ -x "$FLOWCTL" ] || FLOWCTL=".flow/bin/flowctl"
Hard requirements (non-negotiable):
- Every completed task passes through
flowctl doneand a verifieddonestatus. A task treated as finished whileflowctl show <task>still readstodoorin_progresshas broken this. - Staging is
git add -A, never an explicit file list — that is what pulls.flow/andscripts/ralph/(when present) into the commit. A commit whose diff omits the run's.flow/writes has broken this. - Completion is claimed only after
flowctl show <task>reportsstatus: done. A completion claim printed ahead of that read has broken this. /flow-next:impl-reviewis dispatched only on a green tree. A review sent while tests or Quick commands are red has broken this.
Role: execution lead, plan fidelity first. Goal: complete every task in order with tests.
Ralph Mode Rules (always follow)
If REVIEW_RECEIPT_PATH is set or FLOW_RALPH=1, the Hard requirements above are
the receipt contract, plus:
- The verified
donestatus precedes the commit that carries the task. A commit landing ahead of its verifiedflowctl donehas broken this. - Tracking stays in
.flow/viaflowctl— TodoWrite is never the task record. A Ralph iteration whose task list lives in TodoWrite has broken this.
Done when: the Hard requirements hold, and every completed task's done was verified before its commit.
Autonomous Mode (questions off, no receipt obligations)
Before gates, treat this host-expanded block as literal prompt data, never shell:
<work-arguments> $ARGUMENTS </work-arguments>Strip standalone whitespace token mode:autonomous into WORK_ARGS; preserve
all else verbatim (spaces/quotes/globs). Set/export AUTONOMOUS=1 if found or
FLOW_AUTONOMOUS=1; otherwise set/export AUTONOMOUS=0.
Continue with WORK_ARGS; carry the exported marker into later shell fragments.
If AUTONOMOUS=1:
- No setup question is asked (branch + review questions below are suppressed). A run that puts either question to the user under
AUTONOMOUS=1has broken this. - Branch defaults deterministically to
--branch=newwhen no explicit branch option is present — under autonomy "the user's answer" never exists, and defaulting to the current branch could commit straight to main. Name the new branch exactly the spec'sbranch_namefield ($FLOWCTL show <spec-id> --json | jq -r '.branch_name') — pilot's branch matrix, its all-done PR probe, and make-pr's branch-match spec detection all key on that name; an ad-hoc name breaks multi-tick continuity. - Review = explicit
--reviewpassthrough if present, else the configured backend (nonewhenREVIEW_BACKENDisASK). - Autonomy ≠ Ralph. Neither signal sets
FLOW_RALPH, impliesREVIEW_RECEIPT_PATHreceipt obligations, or activates ralph-guard hooks. The Ralph rules above apply only under their own markers (the done/git add -A/no-TodoWrite discipline is universal anyway). - Never hang on a question. A genuinely unanswerable ambiguity → stop cleanly with a one-line
NEEDS_HUMAN: <reason>report instead of asking.
Input
Full request after mode parsing: $WORK_ARGS
Accepts:
- Flow spec ID
fn-N-slug(e.g.,fn-1-add-oauth) or legacyfn-N/fn-N-xxxto work through all tasks - Flow task ID
fn-N-slug.M(e.g.,fn-1-add-oauth.2) or legacyfn-N.M/fn-N-xxx.Mto work on single task - Markdown spec file path (creates spec from file, then executes)
- Idea text (creates minimal spec + single task, then executes)
- Chained instructions like "then review with /flow-next:impl-review"
Examples:
/flow-next:work fn-1-add-oauth/flow-next:work fn-1-add-oauth.3/flow-next:work fn-1(legacy formats fn-1, fn-1-xxx still supported)/flow-next:work docs/my-feature-spec.md/flow-next:work Add rate limiting/flow-next:work fn-1-add-oauth then review via /flow-next:impl-review
If no input provided, ask for it.
FIRST: Parse Options or Ask Questions
Check configured backend:
REVIEW_BACKEND=$($FLOWCTL review-backend)
Returns: ASK (not configured), or rp/codex/copilot/cursor/host/none (configured).
Option Parsing (skip questions if found in arguments)
Parse WORK_ARGS for these patterns. If found, use them and skip corresponding questions:
Branch mode:
--branch=currentor--currentor "current branch" or "stay on this branch" → current branch--branch=newor--new-branchor "new branch" or "create branch" → new branch--branch=worktreeor--worktreeor "isolated worktree" or "worktree" → isolated worktree
Review mode:
--review=codexor "review with codex" or "codex review" or "use codex" → Codex CLI (GPT 5.5 High)--review=copilotor "review with copilot" or "copilot review" → GitHub Copilot CLI--review=cursoror "review with cursor" or "cursor review" → Cursor CLI (cursor-agent)--review=hostor "host review" or "host-native review" → host-native fresh-context reviewer subagent (cross-family pin from the AGENTS.md model-routing section)--review=rpor "review with rp" or "rp chat" or "repoprompt review" → RepoPrompt chat (viaflowctl rp chat-send)--review=exportor "export review" or "external llm" → export for external LLM--review=noneor--no-reviewor "no review" or "skip review" → no review
(All non-none review modes route through /flow-next:impl-review, which resolves the
configured/overridden backend — codex, copilot, cursor, rp, or host — itself.)
Autonomous mode:
AUTONOMOUS=1→ suppress all setup questions; use the defaults above.
If the options are absent from the arguments
If AUTONOMOUS=1 (autonomous mode): ask nothing — apply the autonomous defaults and continue to the workflow.
Otherwise (interactive): the branch question is answered before anything else happens. A run that reads a file or writes code before the answer arrives has broken this. Read
references/setup-questions.md, ask the block it names for the
current REVIEW_BACKEND (branch-only when a backend is configured; branch AND review when
REVIEW_BACKEND is ASK), and wait for the response.
Defaults when empty/ambiguous:
- Branch =
new - Review = configured backend if set, else
none(no auto-detect fallback)
Done when: the branch mode (and, under REVIEW_BACKEND=ASK, the review mode) is resolved from arguments, the user's answer, or the autonomous defaults — and no file has been read and no code written before that point.
Workflow
After setup questions answered, read phases.md and execute each phase in order.
Worker subagent model: Each task is implemented by a worker subagent with fresh context. This prevents context bleed between tasks and keeps re-anchor info with the implementation. The main conversation owns the ready frontier: it prefers a concurrent wave when tasks are safely disjoint and the host can isolate and integrate them, otherwise it explains the sequential fallback. A parallel worker implements, tests, and commits in its isolated workspace, then returns task-unique handover files without completing shared Flow state. The conductor joins and integrates the whole wave before review, completion, tracker projection, plan-sync, or selecting the next frontier.
If user chose review, pass the review mode to the worker. The worker invokes /flow-next:impl-review after implementation and loops until SHIP.
Completion review gate: When all tasks in a spec are done, if --require-completion-review is configured (via flowctl next), the work skill invokes /flow-next:spec-completion-review before allowing the spec to close. This verifies the combined implementation satisfies the spec. The spec-completion-review skill handles the fix loop internally until SHIP.
Tracker sync (opt-in, off by default)
The no-tracker path is the documented default and is behaviorally unchanged. A tracker touchpoint fires only when the bridge is active and its specific event is opted in (the shared gating predicate); otherwise it is a silent no-op — no new steps, no new prerequisites. A run that adds a tracker step with the bridge inactive has broken this. The bridge is active iff flowctl sync active --json reports active: true. The touchpoint mechanics — the perEvent table, the shared gating predicate, and the three dispatch payloads (phases.md 3b.1 first-claim, 3d.1 done, 3g completion-review) — live in references/tracker-touchpoints.md. That reference is read only when a phases.md tracker gate prints its active read/execute/continue sentinel (bridge active, or the gate's probe errored — fail open); a default bridge-inactive run that loaded it has broken this. Phase 5's end-of-run sync check + retro-fire + the mandatory four-state Tracker sync: summary slot stay inline in phases.md Phase 5 and run on every run (the slot reads n/a (bridge inactive) when no tracker is configured).
Handle recognition (R16): /flow-next:work wor-17 / work wor-17.1 resolve the existing linked spec/task — the Phase 1 input grammar routes any single-token arg through flowctl show (which resolves tracker handles via fn-52.10) before treating it as idea te
Content truncated.
When not to use it
- →When using markdown TODOs or external tracking methods
- →When bypassing the .flow/ directory for state management
Prerequisites
Limitations
- →Requires .flow/ directory for all state tracking
- →Cannot use external tracking tools like TodoWrite
How it compares
It enforces a strict, systematic execution workflow that prevents drift by requiring explicit task completion verification before committing.
Compared to similar skills
flow-next-work side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| flow-next-work (this skill) | 1 | 2mo | Review | Advanced |
| bad | 0 | 4mo | Review | Advanced |
| jira | 11 | 6mo | No flags | Beginner |
| triaging-issues | 5 | 2mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by gmickel
View all by gmickel →You might also like
bad
stephenleo
BMad Autonomous Development — orchestrates parallel story implementation pipelines. Builds a dependency graph, updates PR status from GitHub, picks stories from the backlog, and runs each through create → dev → review → PR in parallel — each story isolated in its own git worktree — using dedicated s
jira
davila7
Use when the user mentions Jira issues (e.g., "PROJ-123"), asks about tickets, wants to create/view/update issues, check sprint status, or manage their Jira workflow. Triggers on keywords like "jira", "issue", "ticket", "sprint", "backlog", or issue key patterns.
triaging-issues
pytorch
Triages GitHub issues by routing to oncall teams, applying labels, and closing questions. Use when processing new PyTorch issues or when asked to triage an issue.
github-project-management
ruvnet
Comprehensive GitHub project management with swarm-coordinated issue tracking, project board automation, and sprint planning
issue-manage
catlog22
Interactive issue management with menu-driven CRUD operations. Use when managing issues, viewing issue status, editing issue fields, performing bulk operations, or viewing issue history. Triggers on "manage issue", "list issues", "edit issue", "delete issue", "bulk update", "issue dashboard", "issue history", "completed issues".
team-coordination
alinaqi
Multi-person projects - shared state, todo claiming, handoffs