Agent skill

Session Compression

by vibeeval in vibeeval/vibecosystem

Lossless session context compression for token efficiency. An agent skill from vibeeval/vibecosystem.

MITAuto-check passedAgent Workflows

Install Session Compression

skills CLI
$ npx skills add vibeeval/vibecosystem --skill session-compression -a claude-code

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

GitHub CLI
$ gh skill install vibeeval/vibecosystem session-compression --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/vibeeval/vibecosystem.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/session-compression .claude/skills/session-compression && 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-compression
GitHub stars
531
Token cost
~835 tokens
SKILL.md length
259 words
Files
1
Skills in repo
144
Repo updated
First seen
Licence
MIT

At a glance

Lossless session context compression for token efficiency. An agent skill from vibeeval/vibecosystem.

  • Works in 4 steps: Pre-compact: Before context window… → Session handoff: When switching between… → Agent delegation: When handing complex… → …
  • Tasks that involve Context engineering
  • SKILL.md covers Why Compress, Compression Format, When to Compress and Compression Rules, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Session Compression is an agent skill from vibeeval/vibecosystem. Lossless session context compression for token efficiency. Extracts entities, decisions, and state into compact format before context window fills. 10-30x reduction in context size while preserving all actionable information.

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

It sits in Agent Workflows, covering Context engineering and LLM cost and token optimization. The repository describes itself as: AI software team for Claude Code - 138 agents, 295 skills, 73 hooks. Self-learning, multi-agent swarm, autonomous skill evolution. The licence is MIT.

When your agent uses it

  • Tasks that involve Context engineering
  • Tasks that involve LLM cost and token optimization

Example prompts

  • “/session-compression”

Workflow steps

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

  1. Pre-compact: Before context window compression (auto via hook)
  2. Session handoff: When switching between sessions on same project
  3. Agent delegation: When handing complex task to another agent
  4. Milestone reached: After completing a significant piece of work

What it can do on your machine

Read from SKILL.md and the folder at commit 3b763b1. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

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

  • Network

    No URLs in SKILL.md.

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

  • Credentials

    Names no API keys, tokens, secrets or passwords.

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

Context cost

Session Compression loads about 835 tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 259 words of instructions outside code blocks.

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

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 vibeeval/vibecosystem at commit 3b763b1, republished under its MIT licence (© vibeeval). 259 words, ~835 tokens.

Download SKILL.mdSave it as .claude/skills/session-compression/SKILL.md (or your agent's skills folder).
name
session-compression
description
Lossless session context compression for token efficiency. Extracts entities, decisions, and state into compact format before context window fills. 10-30x reduction in context size while preserving all actionable information.

Session Compression

Compress session context without losing actionable information. Use before context window fills up or when handing off between sessions.

Why Compress

MetricRaw ContextCompressed
Token count~50K~3-5K
Decision countScatteredIndexed
File referencesBuried in proseListed
Error historyVerbose stack tracesRoot cause + fix
Reduction1x10-30x

Compression Format

ACDE Format (Actions, Context, Decisions, Entities)
markdown
## A: Actions Completed
- [x] Refactored auth middleware (auth.ts, middleware.ts)
- [x] Added rate limiting (api/limiter.ts)
- [ ] Pending: Write tests for rate limiter

## C: Context
- Project: my-app (Next.js 16, TypeScript)
- Branch: feat/auth-refactor (3 commits ahead of main)
- Blockers: None

## D: Decisions
- D1: JWT over sessions (stateless, mobile-friendly)
- D2: 100 req/min rate limit (based on load test)
- D3: Rejected Redis session store (overkill for current scale)

## E: Entities
- Files: auth.ts:42, middleware.ts:15, api/limiter.ts (new)
- Deps: jsonwebtoken@9.0.0, express-rate-limit@7.0.0
- APIs: POST /auth/login, POST /auth/refresh, GET /auth/me

When to Compress

  1. Pre-compact: Before context window compression (auto via hook)
  2. Session handoff: When switching between sessions on same project
  3. Agent delegation: When handing complex task to another agent
  4. Milestone reached: After completing a significant piece of work

Compression Rules

What to Keep (Lossless)
  • All decisions with reasoning (D1, D2, D3...)
  • File paths and line numbers of changes
  • Unresolved blockers or pending items
  • Error root causes (not full stack traces)
  • External constraints
What to Drop (Safe)
  • Exploratory reads that didn't lead anywhere
  • Redundant confirmations ("yes that looks good")
  • Intermediate debugging steps (keep only root cause)
  • Tool output that was just for verification
  • Repeated context that's already in CLAUDE.md
Entity Coding

Replace verbose references with short codes:

"the authentication middleware in src/middleware/auth.ts" -> "auth.ts"
"the user requested that we use JWT tokens" -> "D1: JWT"
"the PostgreSQL database running on port 5432" -> "pg:5432"

Integration

Pre-Compact Hook

The session-compressor hook automatically generates ACDE format before context compression:

  1. Scans recent tool calls for file paths -> E section
  2. Extracts decisions from conversation -> D section
  3. Lists completed/pending tasks -> A section
  4. Summarizes project state -> C section
With Memory Palace

Compressed sessions feed into the palace:

  • Decisions -> stored as drawers in appropriate rooms
  • Entities -> indexed for cross-session search
  • Actions -> tracked in thoughts/PROGRESS.md
With Compass Agent

Compass uses ACDE format for "where were we?" recovery:

Last session compressed:
A: 3 done, 1 pending (rate limiter tests)
D: JWT auth, 100rpm limit
E: auth.ts, middleware.ts, limiter.ts

© vibeeval, MIT. 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-compression of vibeeval/vibecosystem.

Open the folder on GitHubat commit 3b763b1

Compare with similar skills

Session Compression 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 Compression compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Session Compression this skillvibeeval/vibecosystem531—~835Automated safety check: PassMIT
Context Mode Output Sandboxmksglu/context-mode26k—~4.1kAutomated safety check: PassCustom licence
Context Mode for Antigravity CLImksglu/context-mode26k—~850Automated safety check: PassCustom licence
Context Fundamentalsguanyang/open-agent-hub9732 repos~4.2kAutomated safety check: PassMIT
Context DoctorjzOcb/context-doctor119—~642Automated safety check: PassMIT
Code Context Slicingtrailofbits/skills7.4k—~2.1kAutomated safety check: PassCC-BY-SA-4.0

Similar skills

  • Context Mode Output Sandbox

    mksglu/context-mode

    Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash.

    26k GitHub stars~4.1k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Routing rules for using context-mode MCP tools in Antigravity CLI: sandboxed code runs, file analysis, indexed search and web fetches that keep large output out of the conversation.

    26k GitHub stars~850 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Context Fundamentals

    guanyang/open-agent-hub

    This skill should be used to explain or reason about the foundational concepts of context engineering: what context is, the anatomy of a context window, how attention mechanics work, the U-shaped…

    973 GitHub starsUsed in 2 repos~4.2k tokens
    Agent WorkflowsAuto-check passed
  • Context Doctor

    jzOcb/context-doctor

    Visualize and diagnose OpenClaw context window usage. An agent skill from jzOcb/context-doctor.

    119 GitHub stars~642 tokensUpdated 6 mo ago
    Agent WorkflowsAuto-check passed
  • Code Context Slicing

    trailofbits/skills

    Official

    Picks a small, graph-based slice of source with Trailmark and hands a focused code task to a smaller or local model without exposing the whole repository.

    7.4k GitHub stars~2.1k tokensUpdated 5 days ago
    Agent WorkflowsAuto-check passed
  • Token-Saver Configuration

    ppgranger/token-saver

    Checks and tunes token-saver output compression: reads stats, explains why a command was or was not compressed, and edits config files or environment variables.

    153 GitHub stars~1k tokensUpdated 18 days ago
    Agent WorkflowsAuto-check passed

More from vibeeval/vibecosystem

All 144 skills in this repo
  • Agent Benchmark

    vibeeval/vibecosystem

    Framework for measuring and tracking agent response quality over time.

    531 GitHub stars~2.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Differential Review

    vibeeval/vibecosystem

    Security-focused differential code review with blast radius analysis, risk-adaptive depth (DEEP/FOCUSED/SURGICAL), git history correlation, and structured finding format.

    531 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed
  • Factcheck Guard

    vibeeval/vibecosystem

    A skill your agent uses when making any factual claim about the codebase — existence, absence, or behavior.

    531 GitHub stars~2.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Fp Check

    vibeeval/vibecosystem

    Systematic false positive verification for security findings.

    531 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed
  • N8n Workflows

    vibeeval/vibecosystem

    n8n otomasyon workflow'lari. An agent skill from vibeeval/vibecosystem.

    531 GitHub stars~3.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Notepad System

    vibeeval/vibecosystem

    A skill your agent uses when context compression is imminent, when resuming a session, or when preserving critical decisions across long tasks.

    531 GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed

Categories

Questions about Session Compression

What does Session Compression do?

Lossless session context compression for token efficiency. An agent skill from vibeeval/vibecosystem. Session Compression is an agent skill from vibeeval/vibecosystem. Lossless session context compression for token efficiency.

When should I use Session Compression?

Session Compression fits situations like: tasks that involve Context engineering; tasks that involve LLM cost and token optimization.

How do I install Session Compression in Claude Code?

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

How do I install Session Compression in Codex?

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

Can I use Session Compression 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 vibeeval/vibecosystem --skill session-compression -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-compression, .gemini/skills/session-compression, .github/skills/session-compression and .opencode/skills/session-compression in your project.

What does Session Compression need to run?

SKILL.md names no scripts, command-line tools or credentials: Session Compression is instructions for the agent only.

Does Session Compression access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Session Compression 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 Compression use?

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

How many tokens does Session Compression use?

About 835 tokens (SKILL.md is roughly 3.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 Compression?

Skills that share tags, products or a category with Session Compression: Context Mode Output Sandbox (mksglu/context-mode, 26k stars), Context Mode for Antigravity CLI (mksglu/context-mode, 26k stars), Context Fundamentals (guanyang/open-agent-hub, 973 stars) and Context Doctor (jzOcb/context-doctor, 119 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Session Compression?

vibeeval (a GitHub user) maintains it in vibeeval/vibecosystem, which has 531 GitHub stars. The repository holds 144 skills in this directory. The repository was last updated on August 8, 2026.

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