session-compact

session-compact is a skill for Claude Code from codeaholicguy/ai-devkit. It costs 39 tokens per session (473 once invoked), scanned A, original, Apache-2.0.

A tool guide for turning a long AI coding session into a handoff document or structured continuation record. It extracts useful progress, decisions and possible long-term memories from the session transcript.

In plain words
What is it for?
Use it when a coding session is becoming too long, work is being handed over, a complex debugging task is paused or durable context needs to be retained.
Why use it?
It helps another agent or developer resume work without rereading the entire conversation. The resulting record is a summary of the transcript, not an independent check that its claims are true.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the ai-devkit plugin — 29 skills, 1 hook shipped together

Good fit Use it when a coding session is becoming too long, work is being handed over, a complex debugging task is paused or durable context needs to be retained.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/codeaholicguy/ai-devkit/session-compact
About the project

AI DevKit is a local-first control layer that gives multiple AI coding agents shared configuration, a terminal dashboard, cross-agent messaging, local memory retrieval, and reusable engineering workflows. It is for developers and teams supervising agents such as Claude Code, Codex CLI, Gemini CLI, OpenCode, Pi, Cursor, Copilot, or Devin. The catalogue entries are composable skills and plugin components used within that agent-management system.

codeaholicguy/ai-devkit · 1,644 stars · on GitHub · ai-devkit.com

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 codeaholicguy/ai-devkit --skill session-compact
Clone the repo
git clone --depth 1 https://github.com/codeaholicguy/ai-devkit

Made for: Claude Code.

Or install ai-devkit, the plugin that ships this one along with the rest of its 29 skills, 1 hook.

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 session-compact

README.md
[![agentmods](https://agentmods.dev/badge/skills/codeaholicguy/ai-devkit/session-compact/github.svg)](https://agentmods.dev/skills/codeaholicguy/ai-devkit/session-compact)
Your own site
<a href="https://agentmods.dev/skills/codeaholicguy/ai-devkit/session-compact"><img src="https://agentmods.dev/badge/skills/codeaholicguy/ai-devkit/session-compact/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 session-compact

Your own site · 80×15
<a href="https://agentmods.dev/skills/codeaholicguy/ai-devkit/session-compact"><img src="https://agentmods.dev/badge/skills/codeaholicguy/ai-devkit/session-compact.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 473 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.00039 $0.00473
Opus 5.5 $0.00016 $0.00189
Sonnet 5.5 $0.00008 $0.00095
Haiku 4.5 $0.00004 $0.00047

Measured 16d ago against content hash cd806be296a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

session-compact 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 16d 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.

skills/session-compact/SKILL.md · 52 lines

How it starts

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

Session Compact

Use AI DevKit's Jev-backed CLI to create a structured continuation artifact from a historical session. Prefer this command over a hand-written compact when it is available.

When to Use

  • Context is getting long and useful state needs to survive compaction.
  • Work is being handed to another agent or resumed after becoming stale.
  • A complex implementation or debugging session is closing.
  • Durable memory candidates or task-progress facts need to be identified after a long run.

Workflow

  1. Find the session ID when it is not already known:
    npx ai-devkit@latest agent sessions --all
    
  2. Produce Markdown for a human handoff:
    npx ai-devkit@latest agent session compact --id <session-id>
    
  3. Use JSON for automation or structured inspection:
    npx ai-devkit@latest agent session compact --id <session-id> --format json
    
  4. Add --type <provider> when the same session ID is ambiguous across providers.
  5. Review the artifact before using its resume prompt, memory candidates, or validation claims. Compaction preserves selected transcript evidence; it does not independently verify that evidence.

Jev Availability

The command requires TYPESAFE_API_KEY. If it reports:

Jev is unavailable because TYPESAFE_API_KEY is not set.

report that result clearly and stop the compaction attempt. Do not silently replace it with hand-written summarization or imply that Jev classified the session. A user may explicitly request a separate manual summary afterward.

Never print, log, store, or pass the API key as a command argument. The CLI reads it from the environment.

Boundaries

  • The command is read-only and does not write memories or mutate tasks.
  • Treat memory candidates as proposals until they pass the memory skill's quality gate.
  • Record task progress separately when the task workflow requires it.
  • API, authentication, schema, or network failures with a configured key are errors, not Jev-unavailable results.

Read the full file on GitHub · 52 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. 16d ago First seen · 52 lines · 39 tokens per session scan A cd806be296a4

Subscribe to this mod's changes

session-compact is a skill published in the GitHub repository codeaholicguy/ai-devkit (1,644 stars, last pushed today), licensed Apache-2.0. It adds 39 tokens to every session and 473 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-25.

Related

Other skills, from other repositories

digital-brain

This skill should be used when the user asks to "write a post", "check my voice", "look up contact", "prepare for meeting", "weekly review", "track goals", or mentions personal brand, content creation, network management, or voice consistency.

foryourhealth111-pixel/Vibe-Skills · 57 tokens

session-memory-manager

Manages the entire session lifecycle: from context loading (PRD, Tech Stack) at startup, to maintaining project memory during active sessions, and creating ultra-compact checkpoints for handoff. / Mengelola siklus hidup sesi: dari pemuatan konteks awal, pemeliharaan memori proyek, hingga pembuatan checkpoint ringkas…

roedyrustam/vibes-plug · 77 tokens

project-memory-keeper

Analyzes the last session to log progress, extract lessons learned, and save them to the project memory instructions.

GulajavaMinistudio/awesome-copilot-id · 27 tokens

Promote

Take a slice of the current conversation and promote it to a durable vault artifact — concept note, project update, person profile, or doctrine entry. Pairs with /close. /close writes the daily note (transient outcome record); /promote elevates specific insights to permanent vault content the framework can refer back…

wrg32786/aigent-os · 68 tokens

open

Boot the session, load context from the vault, and surface what matters.

wrg32786/aigent-os · 16 tokens

mm-setup

A setup guide that personalizes a shared mm system for one user. It asks for details such as your name, work area, tools, language, and Obsidian vault location, then saves them in private configuration files.

mworldorg/markdown-memory · 152 tokens