session-compact skill
✓ VerifiedCreates structured continuation artifacts from historical AI coding sessions to manage long context and facilitate agent handoffs.
- GitHub stars
- 1,663
- Files
- 1
- Last commit
- Nov 9, 2026
- License
- Apache-2.0
- Allowed tools
- —
What does the session-compact skill do?
session-compact creates structured continuation artifacts from historical AI coding sessions to manage long context and facilitate agent handoffs.
Summary generated from the skill's SKILL.md.
About the session-compact skill
Managing long coding sessions and preparing for agent handoffs is what session-compact enables for developers using the AI DevKit. When a conversation becomes too long or a task needs to be resumed after a period of inactivity, this tool uses Jev to transform historical transcripts into structured continuation artifacts. It produces either Markdown for human review or JSON for automated workflows, allowing an agent to preserve state and identify memory candidates without manually summarizing the entire history.
An agent should load this skill when context limits are approaching or when a complex debugging session is concluding. The process relies on the npx ai-devkit CLI and requires a TYPESAFE_API_KEY set in the environment to function. While the tool extracts task-progress facts and validation claims, it operates as a read-only process that does not mutate tasks or independently verify the evidence found in the transcript. It serves as a way to propose memory candidates that must later pass through a separate memory skill quality gate.
What an agent can do with it
- 1Manage long context windowsAn agent can use this tool to compress a lengthy coding session into a manageable artifact when the context becomes too large.
- 2Facilitate agent handoffsDevelopers can prepare a structured summary to pass work from one agent to another.
- 3Automate session inspectionYou can generate a JSON version of a session to allow for programmatic analysis of historical data.
- 4Extract durable memory candidatesThe tool identifies potential facts and progress updates that should be saved for future sessions.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the session-compact skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the session-compact skill in Claude Code
~/.claude/skills/session-compact/SKILL.md
$ npx degit codeaholicguy/ai-devkit/skills/session-compact ~/.claude/skills/session-compactInstall the session-compact skill in Claude Code (project)
.claude/skills/session-compact/SKILL.md
$ npx degit codeaholicguy/ai-devkit/skills/session-compact .claude/skills/session-compactInstall the session-compact skill in Codex
~/.agents/skills/session-compact/SKILL.md
$ npx degit codeaholicguy/ai-devkit/skills/session-compact ~/.agents/skills/session-compactInstall the session-compact skill in Gemini CLI
~/.gemini/skills/session-compact/SKILL.md
$ npx degit codeaholicguy/ai-devkit/skills/session-compact ~/.gemini/skills/session-compactInstall the session-compact skill in Claude.ai
npx degit codeaholicguy/ai-devkit/skills/session-compact session-compact && zip -r session-compact.zip session-compact # claude.ai → Customize → Skills → + → Create skill → Upload a skill → session-compact.zip
Automated checks
Ran Nov 15, 2026Full report →Passed our automated checks. That is not a security audit: read the scripts before you let an agent run them. How checks work · What to fix for more points
- Source repository linked and reachablecodeaholicguy/ai-devkit/skills/session-compact is public and reachablegithub.com/codeaholicguy/ai-devkit/tree/HEAD/skills/session- ↗Pass
- Open source license (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗Pass
- Commit or release in the last yearLast commit 2026-11-09github.com/codeaholicguy/ai-devkit/commits ↗Pass
- No download-and-run or credential theft in scriptsNo scripts in the skill folderPass
- No hidden instructions in SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/codeaholicguy/ai-devkit/blob/HEAD/skills/session- ↗Pass
- Pre-approved tools are scopedNo pre-approved tools; the agent asks before using onegithub.com/codeaholicguy/ai-devkit/blob/HEAD/skills/session- ↗Pass
- SKILL.md follows the Agent Skills formatthe description does not say when to use the skillgithub.com/codeaholicguy/ai-devkit/blob/HEAD/skills/session- ↗Finding
SKILL.md
View on GitHubSession 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
- Find the session ID when it is not already known:
npx ai-devkit@latest agent sessions --all - Produce Markdown for a human handoff:
npx ai-devkit@latest agent session compact --id <session-id> - Use JSON for automation or structured inspection:
npx ai-devkit@latest agent session compact --id <session-id> --format json - Add
--type <provider>when the same session ID is ambiguous across providers. - 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.
Files in this skill
1session-compact skill questions
How do I install the session-compact skill in Claude Code?
Run npx degit codeaholicguy/ai-devkit/skills/session-compact ~/.claude/skills/session-compact. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the session-compact skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
Does the compaction command modify my tasks or memories?
No, the command is read-only and does not write memories or mutate tasks.