strategic-compact

strategic-compact is a skill for Claude Code from naimkatiman/continuous-improvement. It costs 51 tokens per session (920 once invoked), scanned A, original, MIT.

A reminder system for manually shortening an AI session's working context at sensible points in a multi-step task.

In plain words
What is it for?
Use it after research, planning, or a completed milestone before starting the next phase.
Why use it?
It helps preserve important information and avoid losing track of the work when a session becomes very long or changes phase.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; names the TodoWrite tool.

Part of the continuous-improvement plugin — 27 skills, 6 hooks shipped together

Good fit Use it after research, planning, or a completed milestone before starting the next phase.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/naimkatiman/continuous-improvement/strategic-compact
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add naimkatiman/continuous-improvement --skill strategic-compact
Clone the repo
git clone --depth 1 https://github.com/naimkatiman/continuous-improvement

Made for: Claude Code.

Or install continuous-improvement, the plugin that ships this one along with the rest of its 27 skills, 6 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for strategic-compact

README.md
[![agentmods](https://agentmods.dev/badge/skills/naimkatiman/continuous-improvement/strategic-compact.svg)](https://agentmods.dev/skills/naimkatiman/continuous-improvement/strategic-compact)
Your own site
<a href="https://agentmods.dev/skills/naimkatiman/continuous-improvement/strategic-compact"><img src="https://agentmods.dev/badge/skills/naimkatiman/continuous-improvement/strategic-compact.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 920 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00051 $0.00920
Opus 5 $0.00026 $0.00460
Sonnet 5 $0.00010 $0.00184
Haiku 4.5 $0.00005 $0.00092

Measured 8d ago against content hash 4c939a8644ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

strategic-compact scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/continuous-improvement/skills/strategic-compact/SKILL.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Strategic Compact Skill

Suggests manual /compact at strategic points in your workflow rather than relying on arbitrary auto-compaction.

When to Activate

  • Running long sessions that approach context limits (200K+ tokens)
  • Working on multi-phase tasks (research → plan → implement → test)
  • Switching between unrelated tasks within the same session
  • After completing a major milestone and starting new work
  • When responses slow down or become less coherent (context pressure)

Why Strategic Compaction?

Auto-compaction triggers at arbitrary points:

  • Often mid-task, losing important context
  • No awareness of logical task boundaries
  • Can interrupt complex multi-step operations

Strategic compaction at logical boundaries:

  • After exploration, before execution — Compact research context, keep implementation plan
  • After completing a milestone — Fresh start for next phase
  • Before major context shifts — Clear exploration context before different task

How It Works

This skill is a manual phase-boundary checklist, not a bundled runtime hook. Use it when planning or reviewing a long session:

  1. Name the current phase — research, planning, implementation, testing, debugging, release, or handoff.
  2. Check the next transition — decide whether the next phase needs fresh context or the current context is still load-bearing.
  3. Preserve state first — write the plan, todo list, findings, or handoff note that must survive compaction.
  4. Compact only at a boundary — if compaction helps, run /compact with a specific summary for the next phase.
  5. Resume from durable artifacts — after compaction, re-read the plan/files instead of relying on lost conversation context.

Runtime Boundary

The current plugin does not ship strategic-compact PreToolUse automation or a threshold script. Treat compaction as an operator/agent decision: this skill gives the decision guide, while Claude Code's native /compact command performs the actual compaction.

Read the full file on GitHub · 86 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 86 lines · 51 tokens per session scan A 4c939a8644ca

Subscribe to this mod's changes

strategic-compact is a skill published in the GitHub repository naimkatiman/continuous-improvement (7 stars, last pushed yesterday), licensed MIT. It adds 51 tokens to every session and 920 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.