Skip to content
Development
Skill

/session-compact

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.

From plugin
ai-devkit
1.6k29 skills1 hook
Install
$ npx -y skills add codeaholicguy/ai-devkit --skill session-compact --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/session-compact

Context preview

The summary Claude sees to decide when to auto-load this skill.

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.

SKILL.md

session-compact.SKILL.md
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:

   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 more
Ships withai-devkit

The control plane for AI coding agents. AI DevKit gives Claude Code, Codex CLI, Gemini CLI, opencode, Pi, Cursor, GitHub Copilot, Devin, and other coding agents one local-first operating layer: one config, one console, local memory retrieval, cross-agent

Get the whole plugin
Stats
1,633
Stars
253
Forks
Active
Maintenance
TypeScript
Language
Apache-2.0
License
1d ago
Last commit
11mo ago
Created

Repo: codeaholicguy/ai-devkit

Other skills on ai-devkit.