Keep stable instructions unchanged during a session.
Prefer summaries over re-sending raw large blocks.
1---2name: context-optimize3description: Purpose4---56## Purpose78Use this skill when context is growing quickly or cache consistency drops.910## Trigger1112- Conversation becomes long and repetitive13- The model loses thread coherence14- Frequent prompt restarts or unstable behavior appears1516## Workflow17181. Identify repeated, stale, or low-value context.192. Detect likely cache breakers (instruction churn, unstable prefixes).203. Propose cache-safe compaction and message hygiene rules.214. Produce an actionable operating checklist for next turns.2223## Output Template2425```markdown26## Context Health27- ...2829## Cache Risks30- ...3132## Optimization Actions331. ...342. ...353. ...3637## Session Rules38- ...39```4041## Notes4243- Keep stable instructions unchanged during a session.44- Prefer summaries over re-sending raw large blocks.
Run npx skillmds@latest add joonghyun-lee-frieren/context-optimize in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Purpose It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Joonghyun-Lee-Frieren (@joonghyun-lee-frieren) published this skill. Their other Agent Skills are listed on their SkillMD profile.