pi-front-compaction

Compact the oldest percentage of complete conversation turns with custom focus text.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the need to manage long conversation histories by selectively removing older parts of the conversation, making it easier to focus on recent interactions without losing the context of the entire discussion.

Core Features & Use Cases

  • Selective Compaction: Compacts only the oldest N% of complete user+assistant turns.
  • Customizable Focus: Allows users to specify focus text to guide the summary of the compacted segment.
  • Use Case: In a lengthy coding session, a user might want to compact the initial setup and discussion to focus on the current debugging phase, using /pi-front-compaction 50 focus on current bug fixes.

Quick Start

Use the pi-front-compaction skill to compact the oldest 30% of the conversation.

Frequently Asked Questions about pi-front-compaction

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

FAQPage Schema
How do I compact conversation history to free up context window space?

Selective compaction removes only the oldest N% of complete user and assistant turns. This approach ensures that your recent debugging phase or current interactions remain fully intact while summarizing the initial setup and older discussion segments.

How do I compact only the oldest part of an AI agent conversation?

You can compact the oldest part of an AI agent conversation by specifying a percentage of complete turns. The skill performs front-only compaction, summarizing that targeted segment while keeping the remaining recent history fully intact.

Can I guide the summary of compacted conversation history segments?

Yes, you can guide the summary of compacted conversation history segments by providing custom focus text. This ensures the generated summary emphasizes specific topics, such as current bug fixes, from the condensed older interactions.

What happens if there are not enough complete turns for partial compaction?

If there are not enough complete user and assistant turns available, the compaction process is skipped. This prevents compacting the entire conversation and ensures the operation only runs when sufficient history exists.