Agent skill

Session Compact

by codeaholicguy in codeaholicguy/ai-devkit

AI DevKit · Compact a historical AI coding session with Jev when context is long, work is handed off or resumed, or durable continuation facts and memory candidates need extraction.

Apache-2.0Auto-check passed

Install Session Compact

skills CLI
$ npx skills add codeaholicguy/ai-devkit --skill session-compact -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install codeaholicguy/ai-devkit session-compact --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/codeaholicguy/ai-devkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/session-compact .claude/skills/session-compact && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
session-compact
GitHub stars
1.6k
Token cost
~564 tokens
SKILL.md length
256 words
Files
1
Skills in repo
28
Repo updated
First seen
Licence
Apache-2.0

At a glance

AI DevKit · Compact a historical AI coding session with Jev when context is long, work is handed off or resumed, or durable continuation facts and memory candidates need extraction.

  • Works in 5 steps: Find the session ID when it is not… → Produce Markdown for a human handoff → Use JSON for automation or structured… → …
  • SKILL.md covers When to Use, Workflow, Jev Availability and Boundaries
  • Calls npx; needs TYPESAFE_API_KEY

What it does

Session Compact is an agent skill from codeaholicguy/ai-devkit. AI DevKit · Compact a historical AI coding session with Jev when context is long, work is handed off or resumed, or durable continuation facts and memory candidates need extraction.

Its SKILL.md is about 560 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: The control plane for AI coding agents. The licence is Apache-2.0.

Example prompts

  • “/session-compact”

Requirements

  • Node.js
  • A credential in TYPESAFE_API_KEY

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Find the session ID when it is not already known
  2. Produce Markdown for a human handoff
  3. Use JSON for automation or structured inspection
  4. Add --type 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…

What it can do on your machine

Read from SKILL.md and the folder at commit 7ef0cd5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • TYPESAFE_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Session Compact loads about 564 tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 256 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~49
When it runs · the whole SKILL.md, loaded when a task matches
~564

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from codeaholicguy/ai-devkit at commit 7ef0cd5, republished under its Apache-2.0 licence (© codeaholicguy). 256 words, ~564 tokens.

Download SKILL.mdSave it as .claude/skills/session-compact/SKILL.md (or your agent's skills folder).
name
session-compact
description
AI DevKit · Compact a historical AI coding session with Jev when context is long, work is handed off or resumed, or durable continuation facts and memory candidates need extraction.

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:
    bash
    npx ai-devkit@latest agent sessions --all
  2. Produce Markdown for a human handoff:
    bash
    npx ai-devkit@latest agent session compact --id <session-id>
  3. Use JSON for automation or structured inspection:
    bash
    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:

text
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.

© codeaholicguy, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/session-compact of codeaholicguy/ai-devkit.

Open the folder on GitHubat commit 7ef0cd5

Compare with similar skills

Session Compact next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Session Compact compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Session Compact this skillcodeaholicguy/ai-devkit1.6k—~564Automated safety check: PassApache-2.0
Strategic Compactaffaan-m/ECC274k1 repos~2.1kAutomated safety check: PassMIT
Jev Transcript Compactionkerpopule/hermes-jev-skills1k—~1.2kAutomated safety check: PassMIT
Compactcatlog22/Claude-Code-Workflow2.1k—~3.2kAutomated safety check: PassMIT
Strategic Compactaffaan-m/ECC274k2 repos~434Automated safety check: PassMIT
Strategic Compactaffaan-m/ECC274k2 repos~724Automated safety check: PassMIT

Similar skills

  • Strategic Compact

    affaan-m/ECC

    Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.

    274k GitHub starsUsed in 1 repo~2.1k tokens
    Agent WorkflowsAuto-check passed
  • Jev Transcript Compaction

    kerpopule/hermes-jev-skills

    Uses Jev to mark each transcript turn keep, summarize or drop when cutting a conversation to a fixed size, with measured results on handoff quality.

    1k GitHub stars~1.2k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Compact

    catlog22/Claude-Code-Workflow

    Compact current session memory into structured text for session recovery.

    2.1k GitHub stars~3.2k tokensUpdated 3 mo ago
    Agent WorkflowsAuto-check passed
  • Strategic Compact

    affaan-m/ECC

    任意の自動コンパクションではなく、タスクフェーズを通じてコンテキストを保持するための論理的な間隔での手動コンパクションを提案します。

    274k GitHub starsUsed in 2 repos~434 tokens
    Auto-check passed
  • Strategic Compact

    affaan-m/ECC

    임의의 자동 컴팩션 대신 논리적 간격에서 수동 컨텍스트 압축을 제안하여 작업 단계를 통해 컨텍스트를 보존합니다.

    274k GitHub starsUsed in 2 repos~724 tokens
    Auto-check passed
  • Strategic Compact

    affaan-m/ECC

    建议在逻辑间隔处手动压缩上下文,以在任务阶段中保留上下文,而非任意的自动压缩。

    274k GitHub starsUsed in 3 repos~943 tokens
    Auto-check passed

More from codeaholicguy/ai-devkit

All 28 skills in this repo
  • Agent Management

    codeaholicguy/ai-devkit

    AI DevKit · Manage running AI agents with ai-devkit agent commands.

    1.6k GitHub stars~558 tokensUpdated yesterday
    Auto-check passed
  • Dev Lifecycle

    codeaholicguy/ai-devkit

    AI DevKit · Orchestrator for structured SDLC phase skills. An agent skill from codeaholicguy/ai-devkit.

    1.6k GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Task

    codeaholicguy/ai-devkit

    AI DevKit · Track dev-lifecycle / structured-debug progress on a durable task with the ai-devkit task CLI.

    1.6k GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Simplify Implementation

    codeaholicguy/ai-devkit

    AI DevKit · Analyze and simplify existing implementations to reduce complexity, improve maintainability, and enhance scalability.

    1.6k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Agent Communication

    codeaholicguy/ai-devkit

    AI DevKit · Exchange information with active Codex, Claude Code, and other AI agents using ai-devkit agent list, detail, and send.

    1.6k GitHub stars~321 tokensUpdated yesterday
    Auto-check passed
  • Technical Writer

    codeaholicguy/ai-devkit

    AI DevKit · Review and improve documentation for novice users.

    1.6k GitHub stars~431 tokensUpdated yesterday
    Auto-check passed

Questions about Session Compact

What does Session Compact do?

AI DevKit · Compact a historical AI coding session with Jev when context is long, work is handed off or resumed, or durable continuation facts and memory candidates need extraction. Session Compact is an agent skill from codeaholicguy/ai-devkit. AI DevKit · Compact a historical AI coding session with Jev when context is long, work is handed off or resumed, or durable continuation facts and memory candidates need extraction.

How do I install Session Compact in Claude Code?

Run `npx skills add codeaholicguy/ai-devkit --skill session-compact -a claude-code`. Or copy the skill folder (skills/session-compact in codeaholicguy/ai-devkit) into .claude/skills/session-compact in your project. Claude Code loads it when a task matches its description.

How do I install Session Compact in Codex?

Run `npx skills add codeaholicguy/ai-devkit --skill session-compact -a codex`. Or copy the skill folder (skills/session-compact in codeaholicguy/ai-devkit) into .agents/skills/session-compact in your project. Codex loads it when a task matches its description.

Can I use Session Compact in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add codeaholicguy/ai-devkit --skill session-compact -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/session-compact, .gemini/skills/session-compact, .github/skills/session-compact and .opencode/skills/session-compact in your project.

What does Session Compact need to run?

Going by SKILL.md and its folder, Session Compact needs the command-line tools its instructions call (npx) and credentials named TYPESAFE_API_KEY. Our summary lists: Node.js; A credential in TYPESAFE_API_KEY.

Does Session Compact access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Session Compact safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Session Compact use?

Session Compact is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Session Compact use?

About 564 tokens (SKILL.md is roughly 2.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Session Compact?

Skills that share tags, products or a category with Session Compact: Strategic Compact (affaan-m/ECC, 274k stars), Jev Transcript Compaction (kerpopule/hermes-jev-skills, 1k stars), Compact (catlog22/Claude-Code-Workflow, 2.1k stars) and Strategic Compact (affaan-m/ECC, 274k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Session Compact?

codeaholicguy (a GitHub user) maintains it in codeaholicguy/ai-devkit, which has 1,641 GitHub stars. The repository holds 28 skills in this directory. The repository was last updated on October 6, 2026.

Source: codeaholicguy/ai-devkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.