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.

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/tranhieutt/software_development_department/save-state
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.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.svg" alt="Measured on agentmods" 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. 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.1 $0.00054 $0.01361
Opus 5 $0.00027 $0.00681
Sonnet 5 $0.00011 $0.00272
Haiku 4.5 $0.00005 $0.00136

Measured 2d ago against content hash 3cd950620377, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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.

.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. 2d 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 (72 stars, last pushed 3mo ago), licensed MIT. It adds 54 tokens to every session and 1,361 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-09-03.

Related

Other skills, from other repositories

company-brain

Your team's shared, AI-ready knowledge base — people, companies, meetings, SOPs, and decisions structured so Claude can answer questions on your team's behalf. Team-scope sibling to second-brain (which is personal-scope). Seven modes — capture (drop something into the right structured dir), compile (process into wiki…

coreyhaines31/makerskills · 322 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

lastMonth

Resolve "lastMonth" to a concrete ISO date range relative to your run time — the previous full calendar month. Returns inclusive civil dates plus exact UTC instants so you have temporal context without computing dates by hand. Read-only: no writes, no network. Use before a task over last month (monthly reports…

chaitanyagiri/munder-difflin · 73 tokens

lastYear

Resolve "lastYear" to a concrete ISO date range relative to your run time — the previous full calendar year. Returns inclusive civil dates plus exact UTC instants so you have temporal context without computing dates by hand. Read-only: no writes, no network. Use before a task over last year (annual reports…

chaitanyagiri/munder-difflin · 73 tokens

mm-setup

Онбординг/персонализация mm-системы под конкретного пользователя — спрашивает имя, чем занимается, стек, язык, путь к Obsidian vault, и записывает это в личный gitignored-оверлей config/mm-config.local.json + генерирует персональную копию claude.ai-скилла mm-web-bridge. Use when user says "/mm setup", "/mm onboard"…

mworldorg/markdown-memory · 152 tokens

claude-mem

Persistent filesystem memory across sessions — maintains memory/ with decisions.md, context.md, glossary.md and sessions/YYYY-MM-DD.md, loads and summarizes state at session start, appends decisions and open threads at session end, compacts monthly, and refuses secrets and transient noise. Use when the user says…

alebgl77/claude-inc · 97 tokens