compacting-context
Compacting Context
When conversation history must be compressed, use this structured approach to preserve everything needed to continue work without loss.
Critical rules
- TEXT ONLY. Do NOT call any tools during summarization. You already have all the context you need in the conversation above. Tool calls will be rejected and waste your turn.
- Use a two-phase approach: first draft your analysis in an
<analysis>block (scratchpad — will be stripped), then write the final summary in a<summary>block. - Be thorough — this summary replaces the entire conversation history. Anything not captured here is lost.
Template
Your summary MUST include ALL nine sections. If a section has nothing to report, write "None" — do not skip it.
1. Primary request and intent
Capture ALL of the user's explicit requests and intents in full detail. Include original wording where precision matters. If the user's intent changed during the conversation, document the evolution.
2. Key technical concepts
List all important technical concepts, technologies, frameworks, and domain knowledge discussed. Include version numbers, specific APIs, architectural patterns, and library names.
More from beltonk/claude-code-agent-skills
coding-practices
Coding-specific practices for AI agents — scope discipline, read-before-write, simplest approach first, incremental development, verification, comment standards, security awareness, tool preferences, and shell discipline. Use when the agent is writing, editing, or reviewing code. Works alongside agentic-standards (which covers general behavior for all interactions).
4managing-memories
Covers the full memory lifecycle — when to save, what format to use, how to organize and deduplicate, how to recall relevant memories, and what to never persist. Use at natural breakpoints to capture user preferences, corrections, and project conventions, and at session start to load relevant context.
4scaffolding-projects
Provides a structured approach to starting new features or projects. Guides the agent through understanding requirements, exploring existing code, planning, incremental implementation, and verification. Use when asked to build something new — a feature, module, service, or project — to avoid jumping into code without context.
4handing-off-sessions
Captures structured session state for resuming work in a new session or handing off to another agent. Use at the end of a session, before context limits, or when the user asks to save progress. Not needed for trivial sessions (quick questions, one-line answers).
4agentic-standards
Foundational behavioral standards for any AI agent — safety/reversibility framework, output quality, memory conventions, and prompt injection defense. Applies to all agent interactions including chat, analysis, writing, debugging, and coding. Use when setting up an agent, onboarding to a new project, or when behavioral baseline guidance is needed. For coding-specific rules, also load coding-practices.
4receiving-code-review
Enforces rigorous handling of code review feedback. Classifies comments by severity, verifies claims independently, prevents blind implementation of incorrect suggestions, and handles contradictory reviews. Use when receiving review comments on a pull request or code change.
1