update-state

update-state is a skill for Claude Code from goldenwo/claude-state-drift. It costs 186 tokens per session (1,980 once invoked), scanned A, original, MIT.

A drafting tool for updating `.claude/state.json`, a project file that records the main objective, current focus, deliverables, questions, and blockers. It reviews recent work and shows the proposed file diff without writing it automatically.

In plain words
What is it for?
Use it after shipping or starting a deliverable, resolving a question, deferring scope, or recording a blocked item.
Why use it?
It keeps the project's recorded status aligned with meaningful progress while leaving the final edit under human control.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the TodoWrite tool.

Part of the claude-state-drift plugin — 3 skills, 6 commands, 4 hooks shipped together

Good fit Use it after shipping or starting a deliverable, resolving a question, deferring scope, or recording a blocked item.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/goldenwo/claude-state-drift/update-state
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 goldenwo/claude-state-drift --skill update-state
Clone the repo
git clone --depth 1 https://github.com/goldenwo/claude-state-drift

Made for: Claude Code.

Or install claude-state-drift, the plugin that ships this one along with the rest of its 3 skills, 6 commands, 4 hooks.

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 update-state

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/goldenwo/claude-state-drift/update-state"><img src="https://agentmods.dev/badge/skills/goldenwo/claude-state-drift/update-state.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 186 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,980 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.00186 $0.01980
Opus 5 $0.00093 $0.00990
Sonnet 5 $0.00037 $0.00396
Haiku 4.5 $0.00019 $0.00198

Measured 9d ago against content hash e2ae5f957e61, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

update-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 9d 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.

skills/update-state/SKILL.md · 96 lines

How it starts

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

update-state

Draft a precise edit to .claude/state.json and stop. Do not auto-write.

When to invoke

  • After substantial work in the session: a deliverable shipped, a new one started, scope deferred, an open question resolved.
  • When the user asks to "update state", "log progress", "snapshot where we are", "checkpoint".
  • Before declaring a major task done — so the state.json catches up to reality.

Skip for trivial updates (typo fixes, single-line refactors). Trust the SessionStart auto-orientation; only intervene when meaningful state changes.

Procedure

  1. Read current state. Read .claude/state.json. If absent, create the initial scaffold per SCHEMA.md (ask the user for objective + version + first current_focus if needed).

  2. Inspect what's changed.

    • git status and git diff --cached for staged work.
    • git log --since="<last_updated value>" --oneline for commits since the last state update (ISO timestamp goes after --since=; do NOT use <ts>..HEAD syntax — that's for refs, not timestamps).
    • Re-read recent assistant turns / TodoWrite list to spot status changes the agent itself made.
  3. Detect candidate transitions.

    • In-progress deliverables that look done (commits/PRs landed, tests pass, files exist as planned) → propose status: done + completed_at: <today>.
    • New work not in deliverables[] → propose new entry. Ask the user for id, title, version (or infer from current focus / commits).
    • Open questions resolved by recent work → propose resolved_at + resolution.
    • New deferrals discovered (scope explicitly punted) → propose new deliverable with status: deferred + deferred_reason.
    • Items waiting on external factor → status: blocked with blocked_on + since.
  4. Draft the diff. Compose a single Edit that updates .claude/state.json:

    • Always update last_updated to current ISO timestamp.
    • Update current_focus if it's stale.
    • Apply the deliverable/question changes from step 3.
    • Preserve order and formatting (2-space indent, trailing newline).

Read the full file on GitHub · 96 lines

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. 9d ago First seen · 96 lines · 186 tokens per session scan A e2ae5f957e61

Subscribe to this mod's changes

update-state is a skill published in the GitHub repository goldenwo/claude-state-drift (1 stars, last pushed 23d ago), licensed MIT. It adds 186 tokens to every session and 1,980 once invoked, about $0.0009 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-31.