Conversation Compaction logo

Conversation Compaction

OrganizationPopular
Prismer-AI
conversation-compaction

Produce the SESSION PROJECTION of memory for an aging conversation slice. Runs as a single background model call (mirroring the memory `extract` hook) with NO live memory tools — durable capture to memory is `extract`'s job. You MATCH the slice's durable facts to the memory pages you're handed (recall-found `<existing-memory-pages>`) and emit POINTERS to them; your unique output is the thin ephemeral residue (open threads, abandoned directions) plus those pointers. A digest is memory's projection onto the session, synced by POINTER, never by re-summarizing what memory already holds. Output is a compressed segment the dispatcher splices into future context.

Overview

PublisherPrismer-AI
RepositoryPrismerCloud
Skill nameconversation-compaction
Stars
1.6K
Forks
17
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 Prismer-AI on GitHub. Read the source before you install it.

Installation

Install the Conversation Compaction 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/Prismer-AI/PrismerCloud/tree/main/sdk/cloud/catalog/skills/conversation-compaction
  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/Prismer-AI/PrismerCloud.git /tmp/PrismerCloud
mkdir -p .claude/skills
cp -r /tmp/PrismerCloud/sdk/cloud/catalog/skills/conversation-compaction .claude/skills/conversation-compaction
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Conversation Compaction 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 Conversation Compaction 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 Conversation Compaction 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.

Conversation Compaction — memory's session projection

You are producing the session projection of a slice of an aging conversation (messages that scrolled past the recent verbatim window). The projection replaces the raw slice in future agent context.

The model — sync by POINTER, not by re-summary

Durable knowledge lives in memory (the memory skill owns it). A session projection does not re-summarize durable facts — it points at the memory pages that hold them, NOT by you re-deriving what memory already knows.

How this runs (important): you execute as a SINGLE model call inside the agent's daemon (mirroring the memory extract post-turn hook) — you have no live memory tools to browse/write. Durable capture to memory is the extract hook's job (it runs alongside you every turn). Your input carries the memory pages you need: <existing-memory-pages> (recall-found). You MATCH durable facts to those pages and emit POINTERS; you do not write memory yourself.

Your job over a slice is only:

① for each slice message:
     durable + matches a provided page  → emit a memoryRefs POINTER (path + note)
     durable + NO page matches          → inline into summary (degraded; extract will capture it)
     ephemeral                          → carry THIN in the digest (ages out)
     noise                              → DROP
② emit — the thin ephemeral digest + POINTERS to every matched page

Input you receive

  • slice: the raw messages, oldest first, each [msgId] @username (role): text.
  • conversationType: group | direct.
  • <existing-memory-pages>: pages found by DEVICE-LOCAL recall over this slice that may already hold durable facts from it (a fuzzy match, not an exact raw→page mapping).

Pointer-first rule (recall-fed)

You are given <existing-memory-pages> (pages recall thinks already hold durable facts from this slice). For a durable fact in the slice that matches an existing page, emit a memoryRefs pointer { path, note } — do not restate it in summary. Only inline a durable fact into summary (degraded) when no existing page matches it.

Flow

Triage each slice message:

  • Durable ("would matter in a different conversation next week?") → does a page in <existing-memory-pages> already hold it? Yes → emit a memoryRefs pointer (path + a short note), do NOT restate it in summary. No → inline it into summary (degraded); the extract hook captures it to memory separately and a later pass — once recall finds that page — will pointer it.
  • Ephemeral ("only matters to keep this thread coherent?") → thin digest line.
  • Noise ("lose it, nothing changes?") → drop.

Then compose the segment output (below): the thin ephemeral residue + the pointer list (pages you matched).

Not a re-summary: your unique work is (a) the ephemeral residue and (b) pointing durable facts at their memory pages. Durable capture (writing pages) is the extract hook's job, not yours.

Speaker attribution → into the memory page's provenance

For group slices, who decided / who objected IS content. Carry attribution into the memory page (who decided, who dissented). Once it is in the page, you do NOT restate it in the digest — the pointer resolves to the page.

Output shape

Return ONLY this JSON — no prose, no fences:

json
{
  "summary": "<3-8 short lines: current thread state, referencing durable parts by memory:<path>; NOT a re-statement of the slice>",
  "salientFacts": {
    "memoryRefs":          [ { "path": "decisions/vendor.pkf", "note": "vendor B (compliance); @ceo decided, @eng dissented" } ],
    "openThreads":         [ "awaiting @ceo sign-off on A4 vs Letter page size" ],
    "abandonedDirections": [ "tried gpt-4o for compaction — too slow, dropped" ]
  }
}
  • memoryRefs — one POINTER per matched page ({ path, note }).
  • openThreads / abandonedDirections — the ephemeral residue only. Omit if empty.
  • No decisions / entities / preferences / commitments fields — those are durable, they live in memoryRefs, never inline.

Size check: the digest is the ephemeral residue + pointers, a fraction of the slice. If summary reads like a retelling, you are duplicating memory — cut to thread-state.

Failure / degradation

  • No matching pages (empty <existing-memory-pages>) → inline the durable facts into summary (degraded) with empty memoryRefs. extract still captures them to memory, and a later pass — once recall finds those pages — will pointer them. Never fail the compaction.
  • Slice is pure noise → { "summary": "(no substantive content)", "salientFacts": {} }.

Anti-patterns

  • ❌ Restating in the digest what lives in memory — point to the page.
  • ❌ Re-implementing memory triage/authoring here — delegate to the memory skill.
  • ❌ A faithful blow-by-blow summary — you produce a projection, not a transcript.
  • ❌ Dropping attribution on a decision/objection — it goes into the page's provenance.
  • ❌ Promoting ephemeral state to memory (current open question, in-flight step) — that stays in the thin digest and ages out.
  • ❌ Posting the digest as a chat message — machinery; return the structured object only.

Frequently asked questions

What does the Conversation Compaction AI skill do?

Produce the SESSION PROJECTION of memory for an aging conversation slice. Runs as a single background model call (mirroring the memory `extract` hook) with NO live memory tools — durable capture to memory is `extract`'s job. You MATCH the slice's durable facts to the memory pages you're handed (recall-found `<existing-memory-pages>`) and emit POINTERS to them; your unique output is the thin ephemeral residue (open threads, abandoned directions) plus those pointers. A digest is memory's projection onto the session, synced by POINTER, never by re-summarizing what memory already holds. Output...

Why use Conversation Compaction on TypingMind?

Because you install it once and use it with any model. Conversation Compaction 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 Conversation Compaction in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Prismer-AI/PrismerCloud/tree/main/sdk/cloud/catalog/skills/conversation-compaction. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Conversation Compaction?

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 Conversation Compaction?

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

Is the Conversation Compaction AI skill free?

Yes. It is published on GitHub by Prismer-AI 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 👇