whatisgithub

What is context-graph-compressor?

adityapal67/context-graph-compressor — explained in plain English

Analysis updated 2026-06-24

17Audience · developerComplexity · 1/5LicenseSetup · easy

In one sentence

A Claude skill that compresses a long AI chat session into a structured JSON graph of around 400 tokens, capturing facts, decisions, code snippets, and open threads, so you can continue in a fresh session at a fraction of the token cost.

Mindmap

mindmap
  root((context-graph-compressor))
    What It Does
      Conversation compression
      JSON graph output
      Context handoff
    Node Types
      Facts and decisions
      Code snippets
      Open threads
    Output Modes
      Compact minimal
      Readable full text
    Use Cases
      Cost reduction
      Session continuity
      Team sharing
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

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

USE CASE 2

Cut token costs on long AI work sessions by handing off a compressed graph instead of resending thousands of tokens of history each time

USE CASE 3

Archive a project's decision log and bug fixes as a readable JSON file teammates can load into their own AI sessions

What is it built with?

Claude Skills

How does it compare?

adityapal67/context-graph-compressor0petru/sentimo0xghostcat/claude-ai-cyber-security-skills
Stars171717
LanguagePythonShell
Setup difficultyeasymoderateeasy
Complexity1/53/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Installed as a Claude skill through the Claude.ai interface, no terminal or code required, trigger with phrases like 'compress this chat'.

MIT license, use, copy, modify, and distribute freely for any purpose, including commercial use, as long as you keep the copyright notice.

So what is it?

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.

Copy-paste prompts

Prompt 1
Compress this entire chat using context-graph-compressor compact mode and give me the JSON graph I can paste into a new Claude session to continue this project
Prompt 2
Using the context-graph-compressor JSON format, write a context graph for my current project with nodes for the main goal, three decisions made, two bugs fixed, and one open thread
Prompt 3
Take this context-graph-compressor output and write a system message I can prepend to a new GPT-4 session so it understands my project state without the original conversation history
Prompt 4
Explain how to read a context-graph-compressor graph: what does each node type mean, and how should I prioritize high vs low importance nodes when resuming a session

Frequently asked questions

What is context-graph-compressor?

A Claude skill that compresses a long AI chat session into a structured JSON graph of around 400 tokens, capturing facts, decisions, code snippets, and open threads, so you can continue in a fresh session at a fraction of the token cost.

What license does context-graph-compressor use?

MIT license, use, copy, modify, and distribute freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is context-graph-compressor to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is context-graph-compressor for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.