Thicc

skill
Guvenlik Denetimi
Uyari
Health Uyari
  • No license รขโ‚ฌโ€ Repository has no license file
  • Description รขโ‚ฌโ€ Repository has a description
  • Active repo รขโ‚ฌโ€ Last push 0 days ago
  • Community trust รขโ‚ฌโ€ 10 GitHub stars
Code Uyari
  • process.env รขโ‚ฌโ€ Environment variable access in Lib/Ai/ModelSelector.js
Permissions Gecti
  • Permissions รขโ‚ฌโ€ No dangerous permissions requested

Bu listing icin henuz AI raporu yok.

SUMMARY

๐Ÿ‘ Lightning-fast Claude Code conversation compressor. Eliminates "Context low" warnings without losing context.

README.md

๐Ÿ‘ Thicc

Node.js
Version
License
Status
AI Powered

JSONL Conversation Compressor for Claude Code

"Because that 'Context low' warning is a pain in the ass."


Thicc = Terminate, Hyper-Inflate, Claude Code

(Thanks, Claude Code Thinking mode โ€” sarcastically.)


The Problem

You know that moment. You're deep in the zone, Claude Code is crushing it, and then BAM:

โš ๏ธ  Context low ยท Run /compact to compact & continue

Annoying, right? Like interrupting flow just when things get thicc with context.

[!WARNING]

Why /compact Sucks

  1. โฑ๏ธ Takes forever โ€” /compact can drag on for 2โ€“5 minutes (especially in long or context-heavy conversations)

    • Thicc finishes in under 5 seconds (--safe) or at most 30 seconds (--medium/--aggressive)
  2. ๐Ÿ’ธ Token vampire โ€” Can consume up to 40,000 tokens per compaction

    • Thicc avoids this pain completely
  3. ๐Ÿ”„ Starts a new conversation โ€” /compact doesn't truly compact; it creates a brand-new conversation with a summary of the old one

    • Thicc preserves the current conversation fully intact
  4. ๐Ÿง  Loses context โ€” /compact often causes Claude Code to forget user instructions, CLAUDE.md instructions, or even current task context (catastrophic)

    • Thicc summarizes older context using a selective approach, keeping the conversation body continuous and almost zero current context loss

Thicc is the only thing that can get rid of that warning without breaking your flow.


โšก The Solution

Thicc compresses Claude Code .jsonl conversation files by intelligently clearing old context while keeping the conversation alive and intact.

๐ŸŽฏ Core Features

โœ… Lightning fast compression
โœ… Zero current context loss (preserves recent context)
โœ… AI-powered summarization (optional)
โœ… Tool pair integrity validation
โœ… Batch processing (multiple files at once)
โœ… Graceful degradation (falls back to Safe mode)
โœ… Auto model selection (mistral โ†’ phi3 โ†’ llama2)
โœ… Context-aware deletion (preserves snapshots)
โœ… Claude Code compatible (pure JSONL output)


๐Ÿ“ฆ Installation

[!NOTE]
Prerequisites

  • Node.js 16+ (LTS recommended)
  • Ollama (optional, for Medium/Aggressive AI-powered modes)
# Install dependencies
npm install

# Optional: Install Ollama for AI summarization
# Download from https://ollama.ai
ollama pull mistral

๐Ÿš€ Usage

Interactive Mode

node Thicc.js

CLI Arguments

# Safe mode (rules-based, no AI)
node Thicc.js --safe
node Thicc.js -s

# Medium mode (AI-assisted, balanced)
node Thicc.js --medium
node Thicc.js -m

# Aggressive mode (AI-assisted, maximum squeeze)
node Thicc.js --aggressive
node Thicc.js --hard
node Thicc.js -a

# Smart mode (real-time monitoring, 3-7% per pass)
node Thicc.js --smart <Session ID>

# Specify mode by number
node Thicc.js --mode 1    # Safe
node Thicc.js --mode 2    # Medium
node Thicc.js --mode 3    # Aggressive
node Thicc.js --mode 4    # Smart (requires session ID)

Help

node Thicc.js --help

๐Ÿ”ง Compression Modes

๐Ÿ›ก๏ธ Safe Mode (Rules-Based)

Strategy:

  1. Identifies a percentage of tool pairs (adjusted based on conversation size)
  2. Deletes backwards from last redundant chunk to first file-history-snapshot or last summary
  3. NO AI intervention โ€” pure algorithmic deletion
  4. Speed: Under 5 seconds
  5. Reduction: 5-10%
โš–๏ธ Medium Mode (AI-Assisted)

Strategy:

  1. Performs Safe mode deletion first
  2. Summarizes deleted parentUuid chains using AI
  3. Embeds summary into single parentUuid message at the top
  4. Verifies tool pair integrity (no incomplete pairs in summarized section)
  5. Speed: ~20-30 seconds
  6. Reduction: 10-20%
๐Ÿ’ฅ Aggressive Mode (AI-Assisted)

Strategy:

  1. Performs Safe mode deletion first
  2. Summarizes deleted parentUuid chains using AI (more aggressive deletion window)
  3. Embeds summary into single parentUuid message at the top
  4. Verifies tool pair integrity
  5. Speed: ~20-30 seconds
  6. Reduction: 15-25%
๐Ÿง  Smart Mode (Real-Time Monitoring)

Strategy:

  1. Automatically locates session file in %USERPROFILE%/.claude/projects/*/*
  2. Monitors file size in real-time (polls every 3 seconds)
  3. Only intervenes when file exceeds 1500 KB initially
  4. Performs surgical deletion (3-7% per pass) using Safe mode algorithm
  5. Dynamically updates the file โ€” removes only identified deletion range
  6. Never touches middle or recent sections of the conversation
  7. Intelligent threshold management โ€” compresses once per +500 KB growth (cumulative)
  8. Continues monitoring indefinitely until stopped (Ctrl+C) or session ends
  9. Speed: Real-time, zero disruption to active conversation
  10. Reduction: 3-7% per pass (conservative, repeatable)

Use Case:
Perfect for active, long-running Claude Code sessions. Start monitoring at the beginning of your session and forget about it โ€” Smart Mode keeps your conversation optimized without interrupting your flow.

Threshold Logic:

  • First compression: When file reaches 1500 KB
  • Subsequent compressions: Every +500 KB from last compression
  • Example flow:
    • Start: 800 KB โ†’ Monitoring...
    • Grows to: 1500 KB โ†’ Compress โ†’ 1381 KB
    • Grows to: 1881 KB (1381 + 500) โ†’ Compress โ†’ 1732 KB
    • Grows to: 2232 KB (1732 + 500) โ†’ Compress โ†’ 2065 KB
    • And so on...

Example:

# Get your session ID from /status command
node Thicc.js --smart 8d87c742-381b-48d5-9173-27b86de5061c

# Or use interactive mode and select option 4
node Thicc.js

๐ŸŽ“ Personal Workflow (How I Actually Use This)

[!NOTE]
This is my real workflow.

As soon as the "Context low ยท Run /compact to compact & continue" warning appears:

  1. Get Session ID

    /status
    

    Copy the Session ID (e.g., 8d87c742-381b-48d5-9173-27b86de5061c)

  2. Navigate to .claude folder

    • Press Win + R (Windows)
    • Go to .claude or C:\Users\<user>\.claude
    • Enter the projects folder
  3. Copy the conversation file

    • Locate the .jsonl file (filename = Session ID)
    • Example: 8d87c742-381b-48d5-9173-27b86de5061c.jsonl
    • Copy it to the Src/ directory of Thicc
  4. Run Thicc

    node Thicc.js --medium
    
  5. Replace the original file

    • Remove the _compressed suffix from the filename
    • Paste it back into C:\Users\<user>\.claude\projects
  6. Restart Claude Code

    • Press Ctrl + C in the terminal
    • Run claude --continue
  7. Continue the conversation

    • No more "Context low" warning
    • Repeat whenever the warning shows up again

๐Ÿ“Š Efficiency Comparison

Metric /compact Thicc (Safe) Thicc (Medium) Thicc (Aggressive) Thicc (Smart)
Time 2-5 minutes < 5 seconds ~20-30 seconds ~20-30 seconds Real-time (automatic)
Token Cost Up to 40,000 Zero Zero Zero Zero
Context Loss High (new conversation) Zero Zero Zero Zero
Instruction Retention Unreliable Perfect Perfect Perfect Perfect
Reduction ~30-50% 5-10% 10-20% 15-25% 3-7% per pass
Use Case Manual intervention Quick one-time Balanced compression Maximum squeeze Active sessions

[!CAUTION]
Why /compact Loses Context

/compact summarizes the entire conversation (including recent context), then starts a new conversation with that summary. This causes:

  • Loss of CLAUDE.md instructions
  • Loss of user-defined preferences
  • Loss of current task context

Thicc summarizes older context only, preserving the most recent messages and keeping the same conversation alive.


๐Ÿ“‚ Directory Structure

Thicc/
โ”œโ”€โ”€ Thicc.js              # Main entry point
โ”œโ”€โ”€ package.json          # Dependencies
โ”œโ”€โ”€ Src/                  # Place .jsonl files here
โ”œโ”€โ”€ Dist/                 # Compressed files output here
โ”œโ”€โ”€ Assets/               # Images and resources
โ””โ”€โ”€ Lib/                  # Internal modules
    โ”œโ”€โ”€ Ai/               # AI integration (Ollama)
    โ”œโ”€โ”€ Cli/              # Command-line UI
    โ”œโ”€โ”€ Compression/      # Compression modes
    โ”œโ”€โ”€ Core/             # Processing logic
    โ”œโ”€โ”€ Helpers/          # Utility functions
    โ”œโ”€โ”€ Io/               # File operations
    โ””โ”€โ”€ Validation/       # JSONL validation

๐ŸŽจ Output Format

Claude Code Pure JSONL โ€” each line is a complete JSON object:

{"type":"summary","summary":"...","leafUuid":"..."}
{"parentUuid":"...","message":{...},...}
{"parentUuid":"...","message":{...},...}

Compatibility: Output is directly compatible with Claude Code.


๐Ÿ› ๏ธ Error Handling

Thicc handles errors gracefully:

Error Behavior
Ollama unavailable Automatically falls back to Safe mode
Model not found Prompts user, falls back to Safe mode
Invalid JSONL Reports errors, skips file, continues processing
Incomplete tool pairs Finds and deletes orphaned tool pairs

๐ŸŽฏ Workflow

  1. Place .jsonl conversation files in Src/ folder
  2. Run node Thicc.js (or with arguments)
  3. Select compression mode (if interactive)
  4. Tool processes all files in batch
  5. Outputs saved to Dist/ folder:
    • [filename]_compressed.jsonl

๐Ÿ™ Credits

[!NOTE]

Sexy Story

The idea for Thicc and the discovery of the proper manual summarization approach came from me โ€” born out of pure frustration with that damn "Context low" warning interrupting my flow.

However...

The tool itself was effectively developed entirely by our beloved Claude Sonnet model. Every line of code, every algorithm, every playful status message โ€” all crafted by Sonnet's silicon hands.

Thank You, Sonnet ๐ŸŽ‰

For turning a frustrated idea into a hot to handle tool.
For understanding the assignment (and the vibe).
For making context compression thicc and efficient.

You're a real one, Sonnet. ๐Ÿ’œ


๐Ÿ“„ License

ISC


๐Ÿ‘ Thicc โ€” Squeezing context so you don't have to.

Built with precision. Thicc enough. Slightly naughty.

Version 1.0.0 | 2025

Yorumlar (0)

Sonuc bulunamadi