agentsclimarketplace

Strategic compact

Skill TheophilusChinomona/idev/skills/strategic-compact

Suggests manual /compact at logical task boundaries (after exploration, planning, milestones) instead of arbitrary auto-compaction. Use when the user wants automatic /compact reminders, asks about managing context size, or when deciding whether to suggest compaction at a phase boundary.From its SKILL.md

Install
npx -y skills add TheophilusChinomona/idev --skill strategic-compact

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.9 KB, 861 tokens by cl100k_base, as published. Nobody here has run it

Strategic Compact Skill

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

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

What Claude should do when this skill loads

  1. At phase boundaries (plan finalized, milestone complete, bug fixed, long exploration finished), suggest the user run /compact — briefly, with the reason.
  2. When the PostToolUse hook below injects a [strategic-compact] reminder, treat it as a prompt to evaluate whether the current moment is a logical boundary; only suggest /compact if it is. Never suggest it mid-implementation.
  3. Remind the user that durable state survives compaction: .claude/idev/smart-context/index.json, .claude/idev/project-map/project.map.md, and the other .claude/idev/ caches.

How the hook works

suggest-compact.sh (Unix) / suggest-compact.ps1 (Windows) run on PostToolUse with matcher Edit|Write:

  1. Read the hook JSON from stdin and extract session_id
  2. Increment a per-session counter file in the temp directory
  3. Every N calls (default 50), emit hookSpecificOutput JSON on stdout, which Claude Code injects as additional context for Claude

Hook Setup

The hook is pre-registered by the plugin's hooks/hooks.json (PostToolUse, matcher Edit|Write) but off by default — the script exits instantly unless the per-project opt-in flag exists. Enable it with:

/idev:hooks enable compact

which creates <project>/.claude/idev/compact-suggestions-enabled. Disable with /idev:hooks disable compact. No settings.json editing, takes effect immediately.

<details><summary>Manual wiring (only if you can't use the plugin-registered hook)</summary>

Add to ~/.claude/settings.json — NOTE: ${CLAUDE_PLUGIN_ROOT} is NOT expanded in user settings; use the absolute plugin path. The matcher is a regex over tool names, not an expression language:

{
  "hooks": {
    "PostToolUse": [{
      "matcher": "Edit|Write",
      "hooks": [{
        "type": "command",
        "command": "bash \"<idev-plugin-root>/skills/strategic-compact/suggest-compact.sh\""
      }]
    }]
  }
}

(Windows: powershell -ExecutionPolicy Bypass -File "<idev-plugin-root>\\skills\\strategic-compact\\suggest-compact.ps1".) The opt-in flag file is still required either way.

</details>

Configuration

  • IDEV_COMPACT_THRESHOLD - Edit/Write calls between suggestions (default: 50)

Best Practices

  1. Compact after planning - Once plan is finalized, compact to start fresh
  2. Compact after debugging - Clear error-resolution context before continuing
  3. Don't compact mid-implementation - Preserve context for related changes
  4. The hook tells you when, you decide if
PhaseCompact AfterWhy
ExplorationReading 10+ filesResearch context no longer needed
PlanningPlan finalizedImplementation needs fresh context
DebuggingBug fixedError traces no longer needed
Feature completeTests passReady for next feature

Related

  • smart-context skill - For context that persists across compaction
  • project-map skill - The map survives compaction at .claude/idev/project-map/project.map.md

What ships with it: 2 files

4.7 KB alongside SKILL.md, 2 of them executable

Gives 0 of the 12 instructions most roadmap strategy skills give in 861 tokens

Counted across 614 of the 719 authors here whose files we hold, read 2026-09-06

  • Check for product marketing context firstin 39 of 614, across 16 files
  • Use compact with a custom summaryin 32 of 614, across 16 files
  • Compact after planningin 30 of 614, across 16 files
  • Do not compact mid-implementationin 30 of 614, across 17 files
  • Structure launch marketing across three channel typesin 21 of 614, across 5 files
  • Read the compaction suggestionin 20 of 614, across 10 files
  • Write before compactingin 17 of 614, across 11 files
  • Write important context to files before compactingin 16 of 614, across 5 files
  • Recruit early users one-on-onein 16 of 614, across 3 files
  • Identify 3-5 core content pillarsin 15 of 614, across 9 files
  • Target a specific keyword or questionin 14 of 614, across 4 files
  • Stagger announcements to maintain momentumin 14 of 614, across 4 files

Said here and by no other author read

  • Evaluate if current moment is logical boundary
  • Remind user that durable state survives compaction

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 625,312. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.