save-context

save-context is a skill for Claude Code, Codex from pantheon-org/tekhne. It costs 48 tokens per session (1,609 once invoked), scanned A, original, MIT.

A tool for saving a compact summary of the current coding session in a context file.

In plain words
What is it for?
Use it when checkpointing, saving progress, or ending a session that may resume later. It stores the summary in a named session file.
Why use it?
It preserves decisions, progress, and important details so work can continue later without reconstructing the whole conversation.

Skill for Claude CodeCodex

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/pantheon-org/tekhne/save-context
Any agent
npx skills add pantheon-org/tekhne --skill save-context
Clone the repo
git clone --depth 1 https://github.com/pantheon-org/tekhne

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/pantheon-org/tekhne/save-context.svg)](https://agentmods.dev/skills/pantheon-org/tekhne/save-context)
Your own site
<a href="https://agentmods.dev/skills/pantheon-org/tekhne/save-context"><img src="https://agentmods.dev/badge/skills/pantheon-org/tekhne/save-context.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,609 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.00048 $0.01609
Opus 5 $0.00024 $0.00805
Sonnet 5 $0.00010 $0.00322
Haiku 4.5 $0.00005 $0.00161

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

Security

Grade A, and why

save-context 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 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/upsert-index.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/agentic-harness/save-context/SKILL.md · 135 lines

How it starts

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

Save Context

Save current session state to .context/session/CONTEXT-{stream}-llm.md with LLM-optimized format.

Target: 1200-1500 tokens MAX | Speed: 3-5 seconds

AskUserQuestion Guard

CRITICAL: After EVERY AskUserQuestion call, check if answers are empty/blank. Known Claude Code bug: outside Plan Mode, AskUserQuestion silently returns empty answers without showing UI.

If answers are empty: DO NOT proceed with assumptions. Instead:

  1. Output: "Questions didn't display (known Claude Code bug outside Plan Mode)."
  2. Present the options as a numbered text list and ask user to reply with their choice number.
  3. WAIT for user reply before continuing.

Performance Rules

  1. Use rtk for ALL shell commands
  2. Parallel tool calls — ALL independent calls in one message
  3. Minimize round-trips — gather all data phase 1, reason phase 2, write phase 3

Workflow

Phase 1: Gather Data (parallel)

Bash: rtk ls .context/session/ + rtk ls -t .context/session/CONTEXT-*llm.md

Stream resolution: First word of $ARGUMENTS = stream name (^[a-zA-Z0-9_-]{1,50}$), rest = description. Empty → reuse prior /load-context stream or AskUserQuestion.

Phase 2: Analyze & Synthesize (single pass)

From conversation (last 15-20 messages):

  1. Next — infer 3 tasks from conversation (IMPORTANT: use heading "Next" — Claude Code compaction grep-matches next/todo/pending/remaining keywords for survival priority)
  2. Session — progression, decisions, thinking, unexpected (780 tokens max)
  3. Hot Files — max 10 discussed/edited
  4. Focus & Goal — 1-2 sentence focus + goal

Phase 3: Write & Report

Write CONTEXT file using template, then upsert .context/session/INDEX.md via scripts/upsert-index.sh.

Stream naming: "default" → .context/session/CONTEXT-llm.md, "{name}" → .context/session/CONTEXT-{name}-llm.md

Phase 3b: Auto-archive to .context/session/done/

If status is done or parked → move file to .context/session/done/ subfolder:

Bash: mkdir -p .context/session/done && mv .context/session/CONTEXT-{stream}-llm.md .context/session/done/

Report: "Archived to .context/session/done/ (status: {status})"

Read the full file on GitHub · 135 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. 4d ago First seen · 135 lines · 48 tokens per session scan A 4f2a677d4b17

Subscribe to this mod's changes

save-context is a skill published in the GitHub repository pantheon-org/tekhne (10 stars, last pushed 3d ago), licensed MIT. It adds 48 tokens to every session and 1,609 once invoked, about $0.0002 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

context-engineering

Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching between tasks, or when you need to configure rules files and context for a project.

addyosmani/agent-skills · 43 tokens

comet-memory

使用于 Comet 需要根据有界语义评审包判断是否值得保存个人记忆、候选、更新、遗忘或跳过时。.

rpamis/comet · 38 tokens

recall-memory

Recall relevant long-term memories on demand. Given a topic or question, judges relevance from pre-loaded metadata, loads only relevant files, and returns a concise summary to the main agent.

clacky-ai/openclacky · 40 tokens

immune

Hybrid adaptive memory: Cheatsheet (positive patterns pre-generation) and Immune (negative patterns post-generation) with Hot/Cold tiered auto-learning. Triggers on: "scan for errors", "immune scan", "check output quality", "antibody scan". NOT for PR review (use pr-review) or repo audits (use repo-sentinel).

Mathews-Tom/armory · 73 tokens

relevance-coarse-filter

Cheap, high-recall first-pass filter that removes obvious junk from a detector candidate pool before expensive story-origin research and PR judgment. Decides keep, monitoronly, or reject — never ranks, writes angles, verifies dates, or decides whether to pitch.

elvisun/newsjack · 57 tokens

memory-md-management

Provides comprehensive memory file management capabilities including auditing, quality assessment, and targeted improvements for files such as CLAUDE.md. Use when user asks to check, audit, update, improve, fix, maintain, or validate project memory files. Also triggers for "project memory optimization", "CLAUDE.md…

giuseppe-trisciuoglio/developer-kit · 113 tokens