save-state

A command that rebuilds a single dashboard showing the project's active work, environment, Git status, recent commits, parallel worktrees, and scratch threads. A worktree is a separate working copy of a Git repository.

In plain words
What is it for?
Use it at session start, after context is cleared, when finishing work, or when you need to see what is currently in progress.
Why use it?
It gives the agent an up-to-date overview without copying all details out of each thread's STATE document.

Skill for Claude CodeCodex

Part of the ccx plugin — 3 skills, 3 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/shck-dev/ccx-context-system/save-state
Any agent
npx skills add shck-dev/ccx-context-system --skill save-state
Clone the repo
git clone --depth 1 https://github.com/shck-dev/ccx-context-system

Made for: Claude Code, Codex.

Or install ccx, the plugin that ships this one along with the rest of its 3 skills, 3 hooks.

Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,156 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.00061 $0.01156
Opus 5 $0.00030 $0.00578
Sonnet 5 $0.00012 $0.00231
Haiku 4.5 $0.00006 $0.00116

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

Security

Grade A, and why

save-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/ccx/skills/save-state/SKILL.md · 90 lines

How it starts

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

Save state — the single-pane work index

This regenerates the scratch INDEX, the one screen that shows everything in flight. Pull, don't copy: the index is a thin layer of pointers + live status; the real detail stays in each thread's STATE doc. Never hand-maintain the INDEX — re-run this skill.

Freshness is automatic — the auto-compile-index hook recompiles the INDEX on every STATE write, so forgetting this skill loses nothing. Run it for the full dashboard pass: frontmatter refresh, orphan-note sweep, and the live environment/PR picture below.

Live data (injected at load — already current below)

Project + config: !bun "${CLAUDE_PLUGIN_ROOT}/scripts/where.ts"

Branch: !git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "(not a git repo)"

Worktrees (parallel work): !git worktree list 2>/dev/null || echo "(none)"

Recent commits: !git log --oneline -8 2>/dev/null || echo "(no git history)"

Uncommitted (working tree): !git status --short 2>/dev/null | head -15

Scratch threads: !bun "${CLAUDE_PLUGIN_ROOT}/scripts/threads.ts"

Notes missing a graph backlink (orphan risk — each should open with a wikilink to its STATE): !bun "${CLAUDE_PLUGIN_ROOT}/scripts/orphans.ts"

Open PRs: !gh pr list --limit 12 2>/dev/null || echo "(gh unavailable / not a GitHub repo)"

Then do this

  1. Refresh each active thread's STATE frontmatter so its INDEX line is right. The INDEX is a pure render of these fields — stale frontmatter = stale dashboard:
    • kind:thread (in-flight) · hub (permanent reference note) · done (shipped / prune candidate).
    • summary: — the single-line INDEX blurb (the live working-state, not just the title); YAML-quote it summary: '…' (double any '). A thread missing summary/kind → add them (the compiler falls back to the **Status:** first sentence and flags the gap).
    • Also keep the one-line **Status:** field under each STATE's H1 current — it is the durable working-state that survives context loss.

Read the full file on GitHub · 90 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. 2d ago First seen · 90 lines · 61 tokens per session scan A d234f1efd099

Subscribe to this mod's changes

save-state is a skill published in the GitHub repository shck-dev/ccx-context-system (1 stars, last pushed 1mo ago), licensed MIT. It adds 61 tokens to every session and 1,156 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

orchestrator

FULLY AUTONOMOUS Flutter development pipeline orchestrator. Smart routing: PM analyzes -> creates targeted tasks -> Orchestrator executes only needed agents. Supports Asana task URLs. Includes QE verification via Maestro E2E tests. 7-phase flow: PM -> TodoWrite -> Execute -> Review -> Tests -> QE E2E -> Close.

aleksandr-chaika/flutter-clean-arch-skills · 72 tokens

flutter-guide

Flutter/BLoC Clean Architecture patterns, review checklists, and testing guides. Background knowledge for flutter-dev, flutter-reviewer, flutter-tester. Not user-invocable.

aleksandr-chaika/flutter-clean-arch-skills · 39 tokens

maestro-flutter

Maestro E2E testing knowledge for Flutter apps. YAML-based flows, TestKeys, visual regression, Maestro MCP integration. Background knowledge for QE E2E testing phase.

aleksandr-chaika/flutter-clean-arch-skills · 41 tokens

android-kotlin-compose

Android development with Kotlin and Jetpack Compose. Use when user mentions "Compose", "Jetpack Compose", "Material3", "Hilt", "Room", "ViewModel", or needs to build Android UI, implement MVVM architecture, manage Compose state, or integrate Jetpack libraries (Navigation, Room, Hilt, ViewModel). Triggers on…

and3r817/dot-claude-plugins · 84 tokens

android-kotlin-coroutines

Android development with Kotlin Coroutines and Flow. Use when user mentions "coroutines", "suspend", "Flow", "StateFlow", "SharedFlow", "viewModelScope", "lifecycleScope", or needs to implement async programming, handle structured concurrency, integrate coroutines with Retrofit/Room/WorkManager, or write coroutine…

and3r817/dot-claude-plugins · 87 tokens

codex-advisor

Advisory consultation skill for architectural reviews, design decisions, code analysis, and technology evaluation. Codex provides recommendations without making code changes. Invoked by phrases like "consult Codex", "get Codex's opinion", "ask Codex about", "have Codex review", "Codex analysis", "validate this…

and3r817/dot-claude-plugins · 85 tokens