save-state

save-state is a skill for Claude Code from tranhieutt/software_development_department. It costs 54 tokens per session (1,361 once invoked), scanned A, original, MIT.

A session-state skill records the agent’s current work, decisions, progress, and checkpoints in project files.

In plain words
What is it for?
Use it before major context changes or at the end of a session to save progress for later continuation.
Why use it?
It preserves working context so a task can continue after a context reset or interrupted work session.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: agent in frontmatter.

Good fit Use it before major context changes or at the end of a session to save progress for later continuation.

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/save-state"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/save-state.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,361 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.00054 $0.01361
Opus 5.5 $0.00022 $0.00544
Sonnet 5.5 $0.00011 $0.00272
Haiku 4.5 $0.00005 $0.00136

Measured 1mo ago against content hash 3cd950620377, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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.

.claude/skills/save-state/SKILL.md · 159 lines

How it starts

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

Dump the current working context into production/session-state/active.md as a session checkpoint, AND write an atomic per-task checkpoint to .tasks/checkpoints/[task_id].md when a task ID is provided.

Session checkpoint is automatically read by session-start.sh at the next session start and surfaced by pre-compact.sh before context compaction. Per-task checkpoints are used by /resume-from [task_id] to restore granular cognitive state at the exact point of failure.

Steps

1. Parse arguments

Parse $ARGUMENTS to extract:

  • task_id (optional): First token matching pattern ^\d{3} or a word without spaces (e.g. 042, auth-api). If present, an atomic checkpoint will be written.
  • note (optional): Remaining text after task_id, used as a note.

2. Gather context

Before writing anything, collect the following from the current conversation and working state:

  • Current task: What is the primary task being worked on right now?
  • agent_id: Which agent is currently executing (e.g. backend-developer, qa-engineer)?
  • Progress: What has been completed in this session? List key milestones.
  • Decisions made: What architectural, design, or implementation decisions were made? (These are the most important to preserve.)
  • Files modified: Run git diff --name-only && git diff --staged --name-only && git ls-files --others --exclude-standard to get the current working tree state.
  • output_snapshot: A concise snapshot of the last significant output — last file written, last test result, last API response shape, or last command output.
  • Open questions: What is unresolved or blocked?
  • Next step: What is the very next action to take when resuming.

If a note was parsed from $ARGUMENTS, append it to the "Notes" section.

2. Extract Durable Memory (Native System)

Are there any lessons learned, coding patterns established, constraints added, or technical decisions made in this session that apply globally to the project? If so, before writing active.md, extract them to the .claude/memory/ directory:

  • Write or update a specific topic file (e.g. project_tech_decisions.md or feedback_rules.md), ensuring it has the required YAML frontmatter (name, description, type).
  • Update .claude/memory/MEMORY.md with a pointer to that file if it's not already listed.

Read the full file on GitHub · 159 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. 1mo ago First seen · 159 lines · 54 tokens per session scan A 3cd950620377

Subscribe to this mod's changes

save-state is a skill published in the GitHub repository tranhieutt/software_development_department (73 stars, last pushed 5mo ago), licensed MIT. It adds 54 tokens to every session and 1,361 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

Other skills, from other repositories

context-bankruptcy

Declare bankruptcy on a long-lived AI agent's accumulated memory — audit what it currently believes, separate ground truth from stale and wrong, purge deliberately, restate the truths that survive, and log what was lost. Use when an agent keeps acting on outdated facts, contradicts itself across sessions, 'remembers'…

mohitagw15856/pm-claude-skills · 108 tokens

claude-reflect

Self-learning system that captures corrections during sessions and reminds users to run /reflect to update CLAUDE.md. Use when discussing learnings, corrections, or when the user mentions remembering something for future sessions.

BayramAnnakov/claude-reflect · 46 tokens

company-brain

Your team's shared, AI-ready knowledge base — people, companies, meetings, SOPs, and decisions structured so an agent can answer on your team's behalf. Team-scope sibling to second-brain. Modes — capture, compile (wiki pages + INDEX.md), query (trust-weighted, saved to outputs/), review (verify / deprecate / supersede…

coreyhaines31/makerskills · 222 tokens

second-brain

When you want to capture into, compile, query, lint, or connect your personal Second Brain. Wraps the Karpathy LLM Wiki schema (Obsidian or any markdown vault) — raw/ (unprocessed sources), wiki/ (AI-compiled interlinked topic pages), outputs/ (generated artifacts). Tool-agnostic in design but defaults to a vault at…

coreyhaines31/makerskills · 238 tokens

context-engineering-review

Review what an LLM feature or agent actually puts in its context window — and find what's bloating, missing, or fighting itself. Use when asked to review a system prompt and context assembly, cut token usage without losing quality, debug an agent that ignores instructions, or audit how retrieval results, history, and…

mohitagw15856/pm-claude-skills · 111 tokens

memory-file-maintenance

Keep your AI memory/context file (MEMORY.md, CLAUDE.md, custom instructions) healthy over time — pruning the stale, adding the new, and keeping it sharp so your AI keeps getting you right. Use when asked review my memory file, my AI context is outdated, clean up my CLAUDE.md, or maintain my AI instructions. Produces a…

mohitagw15856/pm-claude-skills · 146 tokens