flow-state

A state-management skill for Flow, a workflow system whose lifecycle information is stored in Markdown files and transaction journals.

In plain words
What is it for?
It is for creating, activating, claiming, blocking, checkpointing, closing, reopening, revising, completing, archiving, recovering, and reporting Flow work.
Why use it?
It provides strict rules for reading and changing task state, including required fields, valid operations, identity checks, and revision checks.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/cofin/flow/flow-state
Any agent
npx skills add cofin/flow --skill flow-state
Clone the repo
git clone --depth 1 https://github.com/cofin/flow

Made for: Claude Code, Codex.

Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,249 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00030 $0.02249
Opus 5 $0.00015 $0.01125
Sonnet 5 $0.00006 $0.00450
Haiku 4.5 $0.00003 $0.00225

Measured 2d ago against content hash 2b142da32054, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

flow-state scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/flow/skills/flow-state/SKILL.md · 173 lines

How it starts

The opening of the file, as written. The whole thing — 173 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Flow State

Use this skill as the deterministic state boundary for Flow. The active lifecycle owner chooses a legal operation, supplies a complete typed request, and applies that request literally or refuses it with ordinary file tools. Read the packaged canonical state contract before handling any request. It owns the exact payload schemas, read predicates, fragments, event grammar, and lifecycle effects.

operations: [create, activate, claim, release, note, discover, block, unblock, checkpoint, close, skip, reopen, revise, reconcile, complete, archive, recover, status]
mutation_request:
  required: [flow_id, operation, actor, occurred_at, expected_plan_revision, expected_plan_commit, expected_state_revision, targets, payload]
  unknown_fields: refuse
  missing_fields: refuse
  identity_mismatch: refuse_without_writes
  payload_schema: canonical_state_contract
status_request:
  required: [operation, flow_id, task_ids]
  unknown_fields: refuse
  writes: none
target_modes:
  create.flow: empty
  create.task: one
  activate: empty
  claim: one
  release: one
  note: one
  discover: one
  block: one
  unblock: one
  checkpoint.task: one
  checkpoint.phase: empty
  checkpoint.plan: all_tasks_sorted
  close: one
  skip: one
  reopen: one
  revise: all_tasks_sorted
  reconcile: empty
  complete: empty
  archive: empty
  recover: empty
lifecycle_guards:
  create.flow: [absent]
  create.task: [planned, active]
  activate: [planned]
  active_allowed: [claim, release, note.normal, discover, block, unblock, checkpoint.task, checkpoint.phase, close, skip, reopen, reconcile, complete]
  checkpoint.plan: [planned, active]
  revise: [planned, active]
  archive: [completed]
  status: [planned, active, completed]
  recover: [planned, active, completed, removed]
  completed_allowed: [status, recover, archive, note.git_note_attachment]
  removed_allowed: [recover]
identity_routes:
  task_target: [create.task, claim, release, note, discover, block, unblock, checkpoint.task, close, skip, reopen]
  all_tasks_then_spec: [checkpoint.plan, revise]
  spec_only_empty_targets: [activate, checkpoint.phase, reconcile, complete, archive]
  untouched_tasks: may_lag_state_revision
snapshot_effects:
  current_target: apply_operation_effects
  non_current_target: bounded_summary_only
  spec_only: typed_affected_ids_not_operation_targets
roots:
  configured: setup_state_or_default
  bundle: config_or_default
  flow: bundle_specs_flow_id
  paths: namespaced_relative_no_symlink_or_escape
result_union:
  additional_fields: forbidden
  keyset: [outcome, operation, flow_id, operation_id, plan_revision, plan_commit, state_revision, targets, journal, evidence, refusal]
  outcome_enum: [committed, replayed, rolled_back, recovery_required, contended, refused, status]
  field_types:
    operation: contract_operation_or_null
    flow_id: non_empty_flow_id_or_null
    operation_id: canonical_operation_id_or_null
    plan_revision: integer_at_least_one_or_null
    plan_commit: lowercase_7_to_40_hex_or_null
    state_revision: non_negative_integer_or_null
    targets: unique_sorted_task_id_array
    journal: journal_record_or_null
    evidence: selected_evidence_record_or_null
    refusal: refusal_record_or_null
  journal_record:
    keyset: [operation_id, state, path]
    state_enum: [committed, rolled_back, prepared, task_writes_started, recovery_required, rollback_in_progress, contended]
    constraints: [operation_id equals result operation_id, path is namespaced configured-root transaction journal, additional fields forbidden]
  evidence_records:
    committed: [actor, occurred_at, validation_attempt_id, checks]
    replayed: [source_operation_id, replay_key, checks]
    rolled_back: [actor, occurred_at, validation_attempt_id, checks]
    recovery_required: [classification, observed_operation_ids, applied_prefix, next_action]
    contended: [classification, observed_operation_ids, applied_prefix, next_action]
    status: [flows, current, ready, blocked, conflicts]
    constraints: [selected record has exactly its listed keys, checks and ids preserve canonical order, additional fields forbidden]
  refusal_record:
    keyset: [code, stage, field, predicate, path, expected, observed, message]
    nullability: {code: required, stage: required, field: nullable, predicate: nullable, path: nullable, expected: nullable, observed: nullable, message: required}
    constraints: [additional fields forbidden, code and stage use canonical refusal identifiers, message non-empty]
  variants:
    committed:
      outcome: committed
      operation: mutating_operation
      journal_state: committed
      evidence_schema: committed
      nullability: {operation: required, flow_id: required, operation_id: required, plan_revision: required, plan_commit: nullable, state_revision: required, targets: required, journal: required, evidence: required, refusal: null}
    replayed:
      outcome: replayed
      operation: replayable_operation
      journal_state: committed
      evidence_schema: replayed
      nullability: {operation: required, flow_id: required, operation_id: required, plan_revision: required, plan_commit: nullable, state_revision: required, targets: required, journal: required, evidence: required, refusal: null}
    rolled_back:
      outcome: rolled_back
      operation: original_mutating_operation
      journal_state: rolled_back
      evidence_schema: rolled_back
      nullability: {operation: required, flow_id: required, operation_id: required, plan_revision: required, plan_commit: nullable, state_revision: required, targets: required, journal: required, evidence: required, refusal: null}
    recovery_required:
      outcome: recovery_required
      operation: original_mutating_operation
      journal_state: prepared_or_task_writes_started_or_recovery_required_or_rollback_in_progress
      evidence_schema: recovery_required
      nullability: {operation: required, flow_id: required, operation_id: required, plan_revision: required, plan_commit: nullable, state_revision: required, targets: required, journal: required, evidence: required, refusal: null}
    contended:
      outcome: contended
      operation: original_mutating_operation
      journal_state: contended
      evidence_schema: contended
      nullability: {operation: required, flow_id: required, operation_id: required, plan_revision: required, plan_commit: nullable, state_revision: required, targets: required, journal: required, evidence: required, refusal: null}
    refused:
      outcome: refused
      operation: requested_operation_or_null_when_unparseable
      journal_state: existing_journal_or_null
      evidence_schema: null
      nullability: {operation: nullable, flow_id: nullable, operation_id: nullable, plan_revision: nullable, plan_commit: nullable, state_revision: nullable, targets: required, journal: nullable, evidence: null, refusal: required}
    status:
      outcome: status
      operation: status
      journal_state: null
      evidence_schema: status
      nullability: {operation: required, flow_id: nullable, operation_id: null, plan_revision: null, plan_commit: null, state_revision: null, targets: required, journal: null, evidence: required, refusal: null}

Read the full file on GitHub · 173 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 173 lines · 30 tokens per session scan A 2b142da32054

Subscribe to this mod's changes

flow-state is a skill published in the GitHub repository cofin/flow (15 stars, last pushed 3d ago), licensed Apache-2.0. It adds 30 tokens to every session and 2,249 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.