cc-front-compaction

Compact the oldest N% of Claude conversation history with hard tail replay.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/choru-k/skills-for-ai --skill cc-front-compaction
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cc-front-compaction
Source: https://github.com/choru-k/skills-for-ai/tree/main/public/claude/cc-front-compaction
Command: npx skills add https://github.com/choru-k/skills-for-ai --skill cc-front-compaction

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of managing large Claude code contexts by selectively compacting older parts of the conversation, optimizing performance and relevance.

Core Features & Use Cases

  • Front-Only Compaction: Compresses the oldest N% of the conversation history, keeping the most recent interactions readily accessible.
  • Hard Tail Replay Injection: Automatically injects replay information for the compacted sections, ensuring continuity.
  • Use Case: When dealing with lengthy coding sessions in Claude, this skill helps maintain a manageable context window, preventing performance degradation and ensuring the AI can still access crucial earlier parts of the conversation when needed.

Quick Start

Run /cc-front-compaction 30 to compact the oldest 30% of the current Claude session's context.

Frequently Asked Questions about cc-front-compaction

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compact Claude Code context to prevent performance degradation during long sessions?

Front-only compaction compresses the oldest N% of a conversation while keeping recent interactions fully intact. It injects replay information for compacted sections to maintain context continuity, ensuring Claude retains access to crucial earlier parts without degrading performance.

How do I replay compacted context history in Claude Code?

Hard tail replay injection automatically inserts replay information for the compacted conversation sections. This ensures continuity by restoring necessary context from the compressed oldest N% of the session history without requiring manual reconstruction.

Can I specify how much of the Claude session context gets compacted?

Yes, you can specify the percentage of context to compact by passing an optional argument to the compaction command. For example, running the command with the argument 30 compacts the oldest 30% of the current session's conversation history.

What is the best way to manage large Claude code contexts during lengthy coding sessions?

Front-only compaction is an effective approach to manage large contexts, as it selectively compresses older conversation parts rather than the entire history. This maintains a manageable context window and optimizes performance while preserving recent interaction relevance.

Why does my Claude Code session slow down when the context window gets large?

Claude Code sessions slow down with large context windows because the AI must process extensive conversation history. Front-only compaction solves this by compressing the oldest N% of the session, reducing the active context size while retaining crucial earlier information through replay injection.