state

state is a skill for Claude Code, Codex from cwinvestments/memstack. It costs 29 tokens per session (956 once invoked), scanned A, original, MIT.

A living project note that records what you were working on, blockers, and the next step. It lets an agent restore useful project context between sessions.

In plain words
What is it for?
Use it to save or read project progress, find where you left off, and keep session context up to date.
Why use it?
Without a saved project state, you may need to explain your progress again after returning to a project.

Skill for Claude CodeCodex

Part of the memstack plugin — 86 skills, 2 commands, 5 hooks shipped together

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/cwinvestments/memstack/state
Any agent
npx skills add cwinvestments/memstack --skill state
Clone the repo
git clone --depth 1 https://github.com/cwinvestments/memstack

Made for: Claude Code, Codex.

Or install memstack, the plugin that ships this one along with the rest of its 86 skills, 2 commands, 5 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 state

README.md
[![agentmods](https://agentmods.dev/badge/skills/cwinvestments/memstack/state.svg)](https://agentmods.dev/skills/cwinvestments/memstack/state)
Your own site
<a href="https://agentmods.dev/skills/cwinvestments/memstack/state"><img src="https://agentmods.dev/badge/skills/cwinvestments/memstack/state.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 956 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.00029 $0.00956
Opus 5 $0.00015 $0.00478
Sonnet 5 $0.00006 $0.00191
Haiku 4.5 $0.00003 $0.00096

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

Security

Grade A, and why

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

skills/state/SKILL.md · 123 lines

How it starts

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

📍 State: Updating Project State...

Maintain a living document of where you are right now in a project.

Activation

When this skill activates, output:

📍 State: Updating project state...

Then execute the protocol below.

Context Guard

Context Status Priority
User says "update state", "save state", "project state" ACTIVE: update STATE.md P1
User says "where was I", "where did I leave off" ACTIVE, read and present STATE.md P1
User starts a session and STATE.md exists ACTIVE, read silently, use as context P2
User says "save diary" or "log session" DORMANT, Diary handles full session logs none
User says "save project" or "handoff" DORMANT, Project skill handles lifecycle none
User asks to recall past sessions DORMANT, Echo handles historical recall none

Protocol

Reading State (session start or "where was I")

  1. Check for STATE.md in the current project's .claude/ directory:
    {project_dir}/.claude/STATE.md
    
  2. If found, read it and present a brief summary:
    • What was being worked on
    • Any blockers
    • The immediate next step
  3. If not found, say: "No STATE.md exists yet. I can create one after we start working."

Writing/Updating State

  1. Gather current state:

    • What task/phase is actively being worked on right now
    • Decisions made during this session (with rationale)
    • Open blockers or unanswered questions
    • Explicit next steps (not vague, specific enough to resume cold)
    • Key files modified recently
  2. Check git status for uncommitted work:

    git status --short
    
  3. Write STATE.md to the project's .claude/ directory:

    # Project State
    *Last updated: {YYYY-MM-DD HH:MM}*
    
    ## Currently Working On
    {Active task or phase: be specific}
    
    ## Decisions Made
    - {Decision}: {Rationale}
    
    ## Blockers
    - [ ] {Blocker description}
    
    ## Next Steps
    1. {Immediate next action, specific enough to start cold}
    2. {Following action}
    
    ## Recently Modified Files
    - {file path}: {what changed}
    
    ## Uncommitted Changes
    {List any unstaged/uncommitted work, or "None: clean working tree"}
    

Read the full file on GitHub · 123 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. yesterday Changed c3258d1f4601
  2. yesterday First seen · 123 lines · 29 tokens per session scan A 92db408bcf7b

Subscribe to this mod's changes

state is a skill published in the GitHub repository cwinvestments/memstack (419 stars, last pushed yesterday), licensed MIT. It adds 29 tokens to every session and 956 once invoked, about $0.0001 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-09-03.

Related

Other skills, from other repositories

project-butler

Project memory workflow for init/upgrade, profile-aware setup, end session, normal/full close, file organization, document archiving, language switching, versioned update logs, rule review, status, wiki sync, and context recovery. Use for /project-butler, setup/初始化, foundation setup, profile setup, end session/收工…

JamesShi96/project-butler · 133 tokens

ccpm

CCPM - spec-driven project management: PRD → Epic → GitHub Issues → parallel agents → shipped code. Use this skill for anything in the software delivery lifecycle: writing a PRD ('write a PRD for X', 'let's plan X', 'scope this out'), parsing a PRD into an epic, decomposing an epic into tasks, syncing to GitHub ('sync…

automazeio/ccpm · 219 tokens

vibe-coding-survival

Vibe Coding(用 AI 写代码)开发过程中的避坑与自救——真正翻车大多发生在"开工后"。 当用户说"AI 越改越乱"、"demo 改坏了退不回去"、"AI 老忘记之前说的"、"功能越加越多很乱"、 "AI 说做好了但其实没用",或者正在用 AI 持续开发一个项目时,主动使用此 Skill。 涵盖:管理 AI 对话(防忘事)、守住范围(防膨胀)、保住能用的版本(防丢失)、让 AI 证明给你看(防轻信), 以及哪些事必须找真人工程师的「红线」,和把一切串起来的「项目说明书」。 这是 vibe-coding-kit 套件里贯穿整个开发过程的 Skill,建议从第一行代码起就配合使用。.

Junliu1066/vibe-coding-kit · 212 tokens

register-project

Register an existing project in memory. Use when starting work on a new repo or when a project needs its own context file. Triggers on: 'register project', 'add project to memory', 'track this project', 'create project file'.

faizkhairi/claude-code-blueprint · 52 tokens

backlog-memory

One skill for a backlog project's persistent memory. It does two jobs — learn (load the project's tasks, plans, docs, and memory into the session) and store (synthesize the project's state into persistent memory entries). When invoked without a mode it auto-picks: learn at the start of a fresh session, store after…

mazen160/backlog · 83 tokens

alego-archive-agent-notes

Use when adding, auditing, pruning, archiving, restoring, or reviewing Agent Notes in alego; checks every new note for superseded active records, classifies implemented notes by future decision value, deletes rejected notes that no longer prevent a tempting fallacy, and applies the frozen archived/{kind} triplet and…

singula-ai/alego · 74 tokens