Agent skill

Hermes Compress

by AlexAI-MCP in AlexAI-MCP/hermes-CCC

Compress conversation context — summarize the current session, extract key decisions and facts, then compact history to free up context window.

MITAuto-check passedAgent Workflows

Install Hermes Compress

skills CLI
$ npx skills add AlexAI-MCP/hermes-CCC --skill hermes-compress -a claude-code

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

GitHub CLI
$ gh skill install AlexAI-MCP/hermes-CCC hermes-compress --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/AlexAI-MCP/hermes-CCC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/hermes-compress .claude/skills/hermes-compress && 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
hermes-compress
GitHub stars
135
Token cost
~1.8k tokens
SKILL.md length
778 words
Files
1
Skills in repo
44
Repo updated
First seen
Licence
MIT

At a glance

Compress conversation context — summarize the current session, extract key decisions and facts, then compact history to free up context window.

  • Works in 5 steps: Review All Messages → Extract Structured Content → Write to Memory → …
  • Tasks that involve Context engineering
  • SKILL.md covers Invocation, What This Skill Does, Output Format and Integration with hermes-memory, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Hermes Compress is an agent skill from AlexAI-MCP/hermes-CCC. Compress conversation context — summarize the current session, extract key decisions and facts, then compact history to free up context window.

Its SKILL.md is about 1.8k 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. The repository describes itself as: Hermes Agent ported to Claude Code Channel — 46 native skills, no OAuth, no external process. The licence is MIT.

When your agent uses it

  • Tasks that involve Context engineering

Example prompts

  • “/hermes-compress”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Review All Messages
  2. Extract Structured Content
  3. Write to Memory
  4. Identify What Can Be Dropped
  5. Produce the Session-State Block

What it can do on your machine

Read from SKILL.md and the folder at commit 8107e89. 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 yaml).

    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

Hermes Compress loads about 1.8k tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 778 words of instructions outside code blocks.

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

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 AlexAI-MCP/hermes-CCC at commit 8107e89, republished under its MIT licence (© AlexAI-MCP). 778 words, ~1,829 tokens.

Download SKILL.mdSave it as .claude/skills/hermes-compress/SKILL.md (or your agent's skills folder).
name
hermes-compress
description
Compress conversation context — summarize the current session, extract key decisions and facts, then compact history to free up context window.
version
1.0.0
author
hermes-CCC (ported from Hermes Agent by NousResearch)
license
MIT

hermes-compress

Compress the current conversation context by extracting what matters, writing a structured summary to memory, and producing a compact session-state block that can replace the full history in future context windows.

Invocation

/hermes-compress

No arguments required. Claude will process the full conversation history visible in the current context window.


What This Skill Does

When invoked, Claude executes the following steps in order:

Step 1 — Review All Messages

Claude reads every message in the current conversation from the beginning: user turns, assistant turns, tool calls, and tool results. Nothing is skipped. The goal is to produce a lossless inventory of everything meaningful that occurred.

Step 2 — Extract Structured Content

Claude identifies and categorizes content into six buckets:

BucketWhat goes here
decisionsChoices the user or Claude made ("we decided to use Postgres", "REST over gRPC")
artifacts_createdFiles written, code blocks produced, configs generated (include file paths)
problems_solvedBugs fixed, errors resolved, blockers cleared
facts_learnedNew information ingested from user, tools, or research
open_issuesUnresolved questions, TODOs, known bugs not yet fixed
next_stepsExplicit or implied follow-up actions
Step 3 — Write to Memory

Claude writes the structured summary to the project memory file at:

~/.claude/projects/<project-slug>/memory/session_<YYYYMMDD_HHMM>.md

If the file already exists (e.g., from a previous compress run in the same day), Claude appends rather than overwrites, with a --- separator and a new timestamp header.

Claude also updates MEMORY.md to add an index entry pointing to the new session file.

Step 3a - Handle Memory Write Failures
  • Create the memory directory before writing if it does not already exist.
  • Write the session file first and update MEMORY.md second so a partial failure does not lose the summary.
  • If appending fails because an existing session file is malformed, leave the old file untouched and write a new timestamped file instead.
  • If the memory index update fails, report that the session file was written and that index repair is still needed.
  • If the environment is read-only or permission-restricted, skip file writes, tell the user exactly what could not be persisted, and still emit the session-state block.
  • If the conversation is too large to process in one pass, summarize in chunks and merge the six buckets before writing.
  • Never drop explicit user requirements, file paths, commands, or unresolved blockers during fallback processing.
Step 4 — Identify What Can Be Dropped

Claude classifies each segment of the conversation as:

  • Retain — essential for ongoing work (active code, current decisions, open issues)
  • Compress — can be replaced by the summary (resolved discussions, background context)
  • Drop — safe to discard (pleasantries, duplicate messages, superseded ideas)

This classification is not surfaced to the user by default but informs the session-state block.

Step 5 — Produce the Session-State Block

Claude outputs a compact YAML block that contains everything needed to resume the session from scratch:

yaml
# hermes-compress session state
# Generated: 2026-04-07T14:32:00Z
# Original message count: 47
# Compressed to: ~800 tokens

session:
  project: ontology-workspace
  date: 2026-04-07
  duration_approx: 90min

decisions:
  - "Use Neo4j as primary graph store for ontology nodes"
  - "REST API over gRPC for external integrations"
  - "Deploy to Vercel, not Railway"

artifacts_created:
  - path: "AlexAI/api/routes.py"
    description: "FastAPI router with /query and /ingest endpoints"
  - path: "CLAUDE.md"
    description: "Updated with hermes-compress active persona note"

problems_solved:
  - "Fixed OpenCrab surrogate encoding error by normalizing Korean queries to English"
  - "Resolved Neo4j connection timeout by bumping pool size to 20"

facts_learned:
  - "opencrab_flex.py fallback_cypher field contains a ready-made Cypher query"
  - "Honcho profile stored at ~/.claude/projects/*/memory/user_honcho_profile.md"

open_issues:
  - "hermes-search --recent N subcommand not yet tested against real history file"
  - "MEMORY.md index needs backfill for sessions before 2026-03-01"

next_steps:
  - "Run /hermes-search 'Neo4j connection' to verify memory is searchable"
  - "Commit routes.py and push to main branch"
  - "Set up Vercel project link with vercel link --repo"

This block is output at the end of the /hermes-compress response so the user can copy it into a new conversation window to resume without carrying the full history.


Show full SKILL.md (292 more words)Show less

Output Format

The full /hermes-compress response is structured as:

  1. Compression report — one paragraph: how many messages reviewed, how many tokens estimated saved, what was written to memory.
  2. Session-state block — the YAML block above.
  3. Resume instruction — one line: "Paste the session-state block at the top of your next conversation to resume."

Integration with hermes-memory

If the hermes-memory skill is active, /hermes-compress will:

  • Automatically sync the session file to the hermes-memory index.
  • Tag the session with topics extracted from the decisions and facts_learned fields.
  • Make the session searchable via /hermes-search.

Automatic Invocation

Claude should suggest /hermes-compress proactively when:

  • The conversation exceeds approximately 80% of the available context window.
  • The user has been working for more than 60 minutes on a complex task.
  • A major milestone has been reached (e.g., all planned files written, a bug resolved).

Claude will display: "Context window is getting full. Run /hermes-compress to summarize and free space."


Relationship to Hermes /compress Command

This skill is the Claude Code equivalent of the /compress command in Hermes Agent (NousResearch). Hermes /compress triggers a session summarization pass within its SQLite-backed session store. In hermes-CCC, the equivalent is writing structured Markdown to the project memory directory, since Claude Code does not have a persistent database backend by default. The output schema (decisions, artifacts, open_issues, next_steps) mirrors the Hermes compress output contract.


Notes

  • Claude does not discard any part of the actual conversation history. Compression is about writing a compact representation to memory, not editing or deleting messages.
  • The session-state YAML is designed to be pasted at the start of a new conversation as a system-level context seed.
  • For very long sessions (500+ messages), Claude will process in passes: first pass extracts decisions and artifacts, second pass extracts facts and open issues.

© AlexAI-MCP, 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/hermes-compress of AlexAI-MCP/hermes-CCC.

Open the folder on GitHubat commit 8107e89

Compare with similar skills

Hermes Compress 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.

Hermes Compress compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Hermes Compress this skillAlexAI-MCP/hermes-CCC135—~1.8kAutomated safety check: PassMIT
Context Mode Output Sandboxmksglu/context-mode26k—~4.1kAutomated safety check: PassCustom licence
Memori Long-Term MemoryMemoriLabs/Memori17k—~2kAutomated safety check: NotesCustom licence
Picoclaw Skill Creatorsipeed/picoclaw30k—~4.4kAutomated safety check: PassMIT
Context Mode for Antigravity CLImksglu/context-mode26k—~850Automated safety check: PassCustom licence
ccc Semantic Code Searchcocoindex-io/cocoindex-code2.8k—~938Automated safety check: PassApache-2.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 today
    Agent WorkflowsAuto-check passed
  • Memori Long-Term Memory

    MemoriLabs/Memori

    Connects Claude Code to Memori Cloud for long-term memory, recalling stored context before substantive replies and saving new context afterward.

    17k GitHub stars~2k tokensUpdated 8 days ago
    Agent WorkflowsAuto-check: notes
  • Picoclaw Skill Creator

    sipeed/picoclaw

    Guidance for creating, updating and reviewing Picoclaw skills, from the SKILL.md structure to organizing bundled scripts, references and assets.

    30k GitHub stars~4.4k 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 today
    Agent WorkflowsAuto-check passed
  • ccc Semantic Code Search

    cocoindex-io/cocoindex-code

    Semantic code search and index management with the ccc CLI: the agent initializes, indexes and queries the project by concept, filtering by language or path.

    2.8k GitHub stars~938 tokensUpdated 4 days ago
    Agent WorkflowsAuto-check passed
  • Token Optimizer

    alexgreensh/token-optimizer

    Audits a Claude Code or Codex setup for context-window waste, fixes it with the user's approval, and measures the saving.

    2.5k GitHub stars~2.4k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from AlexAI-MCP/hermes-CCC

All 44 skills in this repo
  • GitHub Code Review

    AlexAI-MCP/hermes-CCC

    Review GitHub pull requests with a findings-first engineering mindset.

    135 GitHub stars~1.3k tokensUpdated 6 mo ago
    Auto-check passed
  • GitHub PR Workflow

    AlexAI-MCP/hermes-CCC

    Run a disciplined GitHub pull request workflow from branch creation through merge.

    135 GitHub stars~1.4k tokensUpdated 6 mo ago
    Auto-check passed
  • Hermes Memory

    AlexAI-MCP/hermes-CCC

    Manage durable project memory for Claude Code. An agent skill from AlexAI-MCP/hermes-CCC.

    135 GitHub stars~1.7k tokensUpdated 6 mo ago
    Auto-check passed
  • Hermes Route

    AlexAI-MCP/hermes-CCC

    Route Claude Code work by complexity, risk, and tool needs. An agent skill from AlexAI-MCP/hermes-CCC.

    135 GitHub stars~1.9k tokensUpdated 6 mo ago
    Auto-check passed
  • Hermes Skill

    AlexAI-MCP/hermes-CCC

    Create, improve, inventory, and audit Claude Code skills. An agent skill from AlexAI-MCP/hermes-CCC.

    135 GitHub stars~1.7k tokensUpdated 6 mo ago
    Auto-check passed
  • Hermes Traj

    AlexAI-MCP/hermes-CCC

    Capture Claude Code interaction trajectories in training-friendly formats.

    135 GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed

Categories

Questions about Hermes Compress

What does Hermes Compress do?

Compress conversation context — summarize the current session, extract key decisions and facts, then compact history to free up context window. Hermes Compress is an agent skill from AlexAI-MCP/hermes-CCC. Compress conversation context — summarize the current session, extract key decisions and facts, then compact history to free up context window.

When should I use Hermes Compress?

Hermes Compress fits situations like: tasks that involve Context engineering.

How do I install Hermes Compress in Claude Code?

Run `npx skills add AlexAI-MCP/hermes-CCC --skill hermes-compress -a claude-code`. Or copy the skill folder (skills/hermes-compress in AlexAI-MCP/hermes-CCC) into .claude/skills/hermes-compress in your project. Claude Code loads it when a task matches its description.

How do I install Hermes Compress in Codex?

Run `npx skills add AlexAI-MCP/hermes-CCC --skill hermes-compress -a codex`. Or copy the skill folder (skills/hermes-compress in AlexAI-MCP/hermes-CCC) into .agents/skills/hermes-compress in your project. Codex loads it when a task matches its description.

Can I use Hermes Compress 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 AlexAI-MCP/hermes-CCC --skill hermes-compress -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hermes-compress, .gemini/skills/hermes-compress, .github/skills/hermes-compress and .opencode/skills/hermes-compress in your project.

What does Hermes Compress need to run?

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

Does Hermes Compress 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 Hermes Compress 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 Hermes Compress use?

Hermes Compress is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Hermes Compress use?

About 1.8k tokens (SKILL.md is roughly 7.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 Hermes Compress?

Skills that share tags, products or a category with Hermes Compress: Context Mode Output Sandbox (mksglu/context-mode, 26k stars), Memori Long-Term Memory (MemoriLabs/Memori, 17k stars), Picoclaw Skill Creator (sipeed/picoclaw, 30k stars) and Context Mode for Antigravity CLI (mksglu/context-mode, 26k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Hermes Compress?

AlexAI-MCP (a GitHub user) maintains it in AlexAI-MCP/hermes-CCC, which has 135 GitHub stars. The repository holds 44 skills in this directory. The repository was last updated on April 8, 2026.

Source: AlexAI-MCP/hermes-CCC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.