Compress a 50-turn coding session down to ~400 tokens and continue it in a new Claude chat without losing any key context or decisions
Cut token costs on long AI work sessions by handing off a compressed graph instead of resending thousands of tokens of history each time
Archive a project's decision log and bug fixes as a readable JSON file teammates can load into their own AI sessions
Installed as a Claude skill through the Claude.ai interface, no terminal or code required, trigger with phrases like 'compress this chat'.
context-graph-compressor is a Claude skill that solves a common problem with long AI chat sessions: every new message in a conversation resends the entire history, which means a 50-turn conversation might cost 15,000 tokens on every single message. This skill lets you compress the whole conversation down to around 400 tokens, save that as a file, and paste it into a fresh chat to continue exactly where you left off, at a fraction of the cost. The output is a structured JSON graph rather than a plain-text summary. The graph breaks the conversation into typed nodes: facts about the project, decisions that were made, bugs and their fixes, goals, code snippets, and open threads. Each node gets an importance label (high, medium, or low) so the receiving AI knows what it must understand versus what is optional background. Nodes can also reference each other to capture dependencies or relationships between pieces of information. Two output modes are available. Compact mode produces a minimal version with abbreviated field names and short summaries, aimed at keeping the token count as low as possible for handoff purposes. Readable mode uses full field names and longer descriptions, which is better for sharing with teammates or archiving a project's history. Because the output is plain JSON, it works with any AI that accepts text input: Claude, GPT-4, Gemini, Mistral, or others. You paste the compressed graph into a new chat session with a short instruction to continue from that state, and the new session picks up the context without needing the original conversation history. Installation is done through Claude's skill settings: you download the .skill file and upload it through the Claude.ai interface. After that, you trigger it by typing phrases like "compress this chat" or "start fresh" in any conversation. The project is released under the MIT license.
← adityapal67 on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.