state-protocol

state-protocol is a skill for Claude Code from HigorAlves/orc. It costs 47 tokens per session (1,855 once invoked), scanned A, original, MIT.

A shared protocol for storing and resuming the state of multi-step coding sessions in an `.orc` directory.

In plain words
What is it for?
Use it when registering sessions, recording phase progress, saving resume information, or completing and resuming multi-phase commands.
Why use it?
It keeps session records and checkpoints consistent, so interrupted work can continue from the correct phase without manually editing state files.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter. Also seen: $skill-name invocation.

Good fit Use it when registering sessions, recording phase progress, saving resume information, or completing and resuming multi-phase commands.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/higoralves/orc/state-protocol
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.

Any agent
npx skills add HigorAlves/orc --skill state-protocol
Clone the repo
git clone --depth 1 https://github.com/HigorAlves/orc

Made for: Claude Code.

Wrote 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.

agentmods badge for state-protocol

README.md
[![agentmods](https://agentmods.dev/badge/skills/higoralves/orc/state-protocol/github.svg)](https://agentmods.dev/skills/higoralves/orc/state-protocol)
Your own site
<a href="https://agentmods.dev/skills/higoralves/orc/state-protocol"><img src="https://agentmods.dev/badge/skills/higoralves/orc/state-protocol/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.

agentmods 80×15 button for state-protocol

Your own site · 80×15
<a href="https://agentmods.dev/skills/higoralves/orc/state-protocol"><img src="https://agentmods.dev/badge/skills/higoralves/orc/state-protocol.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,855 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00047 $0.01855
Opus 5.5 $0.00019 $0.00742
Sonnet 5.5 $0.00009 $0.00371
Haiku 4.5 $0.00005 $0.00186

Measured yesterday against content hash 1f30f8acf189, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

state-protocol 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 yesterday.

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.

codex/orc/content/skills/state-protocol/SKILL.md · 100 lines

How it starts

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

State Protocol

One schema, one writer, one startup sequence — defined here and only here. Commands defer to this skill instead of re-spelling state mechanics; bin/orc-state is the single writer, so the registry and every checkpoint's frontmatter cannot drift apart.

The one-writer rule

Never hand-write .orc/orc.json or a checkpoint's frontmatter — every mutation goes through orc-state (atomic jq writes; registry entry + checkpoint mirror updated by the same verb). The checkpoint body below the frontmatter is yours to write freely, except the ## Resume digest section, which only orc-state digest write - touches (it enforces the cap), and ## Auto-checkpoint, which only the PreCompact hook writes (orc-state checkpoint --auto — phase, slices, HEAD, dirty files; mechanical, so trust it over a stale digest for git state).

Register a session (the 2-line pattern every multi-phase command uses):

orc-state init --command <cmd> --total-phases <N> [--jira KEY] [--scope workspace --repos a,b] [--plan-file P]

Register state via orc-state init; defer to orc-state-protocol for schema and rules.

Then per phase boundary: orc-state phase set <n|done> [--label <word>], and rewrite the digest (below). On completion: orc-state status set completed.

Registry schema (.orc/orc.json, schema 1)

{ "schema": 1, "sessions": [{
    "sessionId": "feat-142-notifs",        // sanitized branch — THE key; one live session per branch
    "command": "flow", "branch": "feat-142-notifs", "gitBranch": "feat/142-notifs",
    "description": "≤120 chars", "status": "in_progress",
    "phase": 5, "phaseLabel": "implement", "totalPhases": 9,
    "jiraTicket": null, "planFile": null,
    "linkedPRs": [{ "repo": "api", "number": 45, "url": "…", "stackId": null, "stackPosition": null, "stackedOn": null }],
    "startedAt": "2026-08-20T14:03:00Z", "updatedAt": "2026-08-20T18:11:00Z",
    "scope": "workspace", "repos": ["api", "ui"], "perRepoState": { "api": { "repoPath": "…", "branch": "…", "currentSlice": 0, "prUrl": null } }
}]}

Read the full file on GitHub · 100 lines

Files

What ships with it

1 file 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. yesterday Changed 1f30f8acf189
  2. 8d ago Changed 1d369326055a
  3. 14d ago Changed 63c7688dd086
  4. 17d ago Changed · +1 lines · -19 tokens per session 90086d3b57a2
  5. 1mo ago Changed 8d4f4b759f5e
  6. 2mo ago First seen · 99 lines · 66 tokens per session scan A 005e9d646375

Subscribe to this mod's changes

state-protocol is a skill published in the GitHub repository HigorAlves/orc (7 stars, last pushed yesterday), licensed MIT. It adds 47 tokens to every session and 1,855 once invoked, about $0.0002 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.

Related

state-protocol compared with skills from other repositories

state-protocol next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
state-protocolHigorAlves/orcSkill7yesterdayMITA47Claude Code
clean-code-cppCassetteTapeCrackle/claude-startersSkill14d agoMITA42Claude Code
clean-code-coreCassetteTapeCrackle/claude-startersSkill14d agoMITA70Claude Code
agent-orchestrationCassetteTapeCrackle/claude-startersSkill14d agoMITA59Claude Code
clean-code-audioCassetteTapeCrackle/claude-startersSkill14d agoMITA52Claude Code
clean-code-rustCassetteTapeCrackle/claude-startersSkill14d agoMITA44Claude Code
clean-code-cCassetteTapeCrackle/claude-startersSkill14d agoMITA34Claude Code