This hooks into Claude Code's PreToolUse events and watches two signals: total context tokens and tool call counts. When you hit 160k tokens (or 250k on a 1M window) or 50 tool calls, it suggests running /compact manually instead of letting auto-compaction fire mid-task. The idea is sound: compact after you finish planning but before implementation, or after debugging is done, not when you're 30 tool calls deep into a refactor. It reads the session transcript to calculate real context size, which is smarter than just counting tool invocations. The guide on what survives compaction (TodoWrite, memory files, git state) versus what doesn't (conversation context, file contents you read earlier) is the most useful part here.
npx -y skills add affaan-m/ecc --skill strategic-compact --agent claude-codeInstalls into .claude/skills of the current project.
Select a file.
juliusbrussee/caveman
mattpocock/skills
obra/superpowers
forrestchang/andrej-karpathy-skills
vercel-labs/skills