# Context Optimizer

> Context Optimizer Skill

- Skill: `kernel8901/context-optimizer-2` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx skillmds@latest add kernel8901/context-optimizer-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/kernel8901/context-optimizer-2/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: kernel8901 (https://skillmd.com/u/kernel8901)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/kernel8901/context-optimizer-2

---

# Context Optimizer Skill

Automatically summarizes conversation context and cleans up old messages to prevent context overflow and save tokens.

## Description
This skill periodically summarizes the conversation into 10-20 bullet points plus facts to remember, saves them to memory, then clears the old context while keeping only the summary.

## Triggers
- Manual activation: "optimize context", "clean context", "summarize and clear"
- Scheduled: Can be run periodically via cron to maintain optimal context size

## Process
1. Analyze current conversation context
2. Extract key points into 10-20 bullet points
3. Identify important facts to remember
4. Save summary to memory files
5. Clear old context while preserving essential information

## Files Used
- memory/context-summary-YYYY-MM-DD.md - Stores conversation summaries
- MEMORY.md - Updates with important facts
- memory/context-history.json - Tracks context optimization history

## Configuration
- Summary frequency (manual or scheduled)
- Number of bullet points to generate
- Retention period for context
