Hermes Compress logo

Hermes Compress

Community
AlexAI-MCP
hermes-compress

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

Overview

PublisherAlexAI-MCP
Repositoryhermes-CCC
Skill namehermes-compress
Stars
134
Forks
22
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by AlexAI-MCP on GitHub. Read the source before you install it.

Installation

Install the Hermes Compress AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/AlexAI-MCP/hermes-CCC/tree/master/skills/hermes-compress
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AlexAI-MCP/hermes-CCC.git /tmp/hermes-CCC
mkdir -p .claude/skills
cp -r /tmp/hermes-CCC/skills/hermes-compress .claude/skills/hermes-compress
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Hermes Compress in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Hermes Compress on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Hermes Compress is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.


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.

Frequently asked questions

What does the Hermes Compress AI skill do?

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

Why use Hermes Compress on TypingMind?

Because you install it once and use it with any model. Hermes Compress is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Hermes Compress in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/AlexAI-MCP/hermes-CCC/tree/master/skills/hermes-compress. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Hermes Compress?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Hermes Compress?

As many as you like. As long as a model supports skills, you can use Hermes Compress with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Hermes Compress AI skill free?

Yes. It is published on GitHub by AlexAI-MCP under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇