Logo di Hermes Compress

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.

Add to TypingMind

Panoramica

Pubblicato daAlexAI-MCP
Repositoryhermes-CCC
Nome della skillhermes-compress
Stelle
134
Fork
22
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da AlexAI-MCP su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Hermes Compress in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/AlexAI-MCP/hermes-CCC/tree/master/skills/hermes-compress
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Hermes Compress in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Hermes Compress non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Hermes Compress non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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.

Domande frequenti

Cosa fa la skill IA Hermes Compress?

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

Perché usare Hermes Compress su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Hermes Compress è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Hermes Compress in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/AlexAI-MCP/hermes-CCC/tree/master/skills/hermes-compress. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Hermes Compress?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Hermes Compress?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Hermes Compress: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Hermes Compress è gratuita?

Sì. È pubblicata su GitHub da AlexAI-MCP con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇