Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add synaptiai/synapti-marketplace/plugin install flowWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/synaptiai/synapti-marketplace/run-state-management)<a href="https://agentmods.dev/skills/synaptiai/synapti-marketplace/run-state-management"><img src="https://agentmods.dev/badge/skills/synaptiai/synapti-marketplace/run-state-management/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/synaptiai/synapti-marketplace/run-state-management"><img src="https://agentmods.dev/badge/skills/synaptiai/synapti-marketplace/run-state-management.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00152 | $0.01465 |
| Opus 5.5 | $0.00061 | $0.00586 |
| Sonnet 5.5 | $0.00030 | $0.00293 |
| Haiku 4.5 | $0.00015 | $0.00146 |
Grade A, and why
run-state-management 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Run State Management
Contract
Iron law: no phase transition without an activity write — state.completed_activities[] is the source of truth for /flow:resume, and a missing activity makes resume skip ahead and lose work. Invoked when FLOW_RUN_STATE=create (gated by flow.runtime.enabled) by /flow:start, /flow:debug, /flow:address, /flow:review, /flow:merge, /flow:release at command entry (create), at every phase boundary (activity), and at completion (terminal transition); /flow:pr appends activities to the active start-issue run; /flow:resume reads its output. Returns RUN_DIR/run.yaml (RUN_DIR from step 1), activities/<NNN>-<name>.yaml, events.jsonl, and a workflow-run journal artifact. Permitted skips: only when flow.runtime.enabled is false, or when step 1 refuses the run directory (a symlink on the way) — then nothing is written.
Inputs
The invoking command MUST pass:
- Workflow id —
start-issue | debug | address-pr | review-pr | merge-pr | release(matchesplugins/flow/workflows/<id>.workflow.yaml). - Run id —
<ISO-8601-compact-timestamp>-<target-slug>, e.g.2026-05-20T143000Z-issue-42. - Context — repo, branch, issue/pr number, linked journal path, linked goal id (or
null), and the trigger id when a trigger started the command (metadata.trigger; omitted otherwise). - Phase — initial phase id (
preflightat creation; the workflow's phase order thereafter).
Outputs
run.yaml, one activity file per phase boundary, events.jsonl and a workflow-run journal artifact. Paths, document shapes and the per-workflow phase order: references/run-state-templates.md.
Workflow
- Create the FlowRun at command entry. First create its directory with this block,
RUN_IDset to the run id:
# RUN_DIR_CREATE_BLOCK_BEGIN
case "${RUN_ID:-}" in
''|.|..|*/*|*..*) printf '%s\n' "ERROR: RUN_ID must be a run id without '/' or '..', got '${RUN_ID:-}'" >&2; exit 1 ;;
esac
# Never through a symlink: the repository may commit one to elsewhere.
FLOW_BIN="$(__fr="${CLAUDE_PLUGIN_ROOT:-}";[ -x "$__fr/bin/cascade-resolve.sh" ]||__fr=$({ printf '%s\n' plugins/flow;ls -d "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/plugins/cache/synapti-marketplace/flow/*/ 2>/dev/null|sort -Vr;printf '%s\n' "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins/marketplaces/synapti-marketplace/plugins/flow"; }|while read -r __p;do [ -x "${__p%/}/bin/cascade-resolve.sh" ]&&{ printf '%s\n' "${__p%/}";break;};done);printf '%s\n' "$__fr")/bin"
RT=$("$FLOW_BIN/flow-runtime-dir.sh") || RT=""
[ -n "$RT" ] || RT=".flow"
printf '%s\n' "RUNTIME_DIR=$RT"
"$FLOW_BIN/flow-mkdir.sh" -- "$RT/runs/$RUN_ID" || { [ $? -eq 3 ] && exit 3; exit 1; }
printf '%s\n' "RUN_DIR=$RT/runs/$RUN_ID"
# RUN_DIR_CREATE_BLOCK_END
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.
- 1mo ago Changed · +3 lines · +1 tokens per session e38e2f57c002
- 1mo ago Changed · -15 lines c2b782a95b79
- 2mo ago Changed · +16 lines f8aefc1cc159
- 2mo ago Changed · -138 lines 9f6f162776ec
- 3mo ago First seen · 195 lines · 151 tokens per session scan A 600a606a3c8a
run-state-management is a skill published in the GitHub repository synaptiai/synapti-marketplace (9 stars, last pushed today), licensed Apache-2.0. It adds 152 tokens to every session and 1,465 once invoked, about $0.0006 per session on Opus 5.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-09-03.
run-state-management compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| run-state-managementsynaptiai/synapti-marketplace | Skill | 9 | today | Apache-2.0 | A | 152 | Claude Code |
| create-or-update-conceptsCaptainMe-AI/lead-dev-os | Skill | 2 | 24d ago | MIT | A | 46 | Claude Code |
| step2-scope-tasksCaptainMe-AI/lead-dev-os | Skill | 2 | 24d ago | MIT | A | 20 | Claude Code |
| step1-write-specCaptainMe-AI/lead-dev-os | Skill | 2 | 24d ago | MIT | A | 20 | Claude Code |
| plan-productCaptainMe-AI/lead-dev-os | Skill | 2 | 24d ago | MIT | A | 32 | Claude Code |
| plan-roadmapCaptainMe-AI/lead-dev-os | Skill | 2 | 24d ago | MIT | A | 25 | Claude Code |
| create-prCaptainMe-AI/lead-dev-os | Skill | 2 | 24d ago | MIT | A | 70 | Claude Code |