Progressive compaction prompt

From ychampion/cskill-agents · View interactive version

Progressive compaction prompt is an AI agent skill from the GitHub repository ychampion/cskill-agents. Drive compaction summaries through structured prompts that sequence naming, artifacts, and invocation guidance before stripping analysis tags.

How to use this skill

Skill file

SKILL: Progressive Compaction Prompt

Domain: context-management

Trigger: Apply when composing compact summaries so each round captures intent, context, per-step detail, and invocation cues before the final summary is stripped to user-friendly text.

Source Pattern: Distilled from reviewed session memory, compaction, and context-budgeting implementations.

Core Method

Wrap each compaction request in a staged prompt that asks the model to summarize in a deliberate sequence instead of freeform prose. The prompt should first ban tool use, then walk through the important dimensions of the conversation such as goals, decisions, artifacts, open work, and invocation guidance. Ask the model to emit a structured draft that is easy for post-processing to clean up, then strip the drafting scaffolding before storing or showing the final summary. Add only the minimum follow-up instructions needed so an automated agent can resume from the compacted state without asking redundant questions.

Key Rules

Example Application

Before resuming a long-running session after compaction, generate the summary with the staged prompt, run a cleanup pass that removes drafting tags, and attach the final summary to the resumed session along with any preserved transcript references. The next agent can then continue from a concise, automation-friendly handoff instead of reprocessing the trimmed history.

Anti-Patterns (What NOT to do)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.