strategic-compact
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
Skill by sangrokjung
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/sangrokjung-strategic-compact
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Shell scripts
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/strategic-compact
What's inside
- Skill name
strategic-compact- Description
- Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
- License
- MIT
- Instructions
- 60 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (2)
- SKILL.md
- suggest-compact.sh
SKILL.md (first lines)
# 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
## How It Works
The `suggest-compact.sh` script runs on PreToolUse (Edit/Write) and:
1. **Tracks tool calls** - Counts tool invocations in session
2. **Threshold detection** - Suggests at configurable threshold (default: 50 calls)
3. **Periodic reminders** - Reminds every 25 calls after threshold
## Hook Setup
Add to your `~/.claude/settings.json`:
```json
{
"hooks": {
"PreToolUse": [{
"matcher": "tool == \"Edit\" || tool == \"Write\"",
"hooks": [{
"type": "command",
"command": "~/.claude/skills/strategic-compact/suggest-compact.sh"
}]
}]
}
}
```
## Configuration
Environment variables:
- `COMPACT_THRESHOLD` - Tool calls before first suggestion (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. **Read the suggestion** - The hook tells you *when*, you decide *if*
## Related
- [The Longform Guide](https://x.com/affaanmustafa/status/2014040193557471352) - Token optimization section
- Memory persistence hooks - For state that survives compactionFrom sangrokjung/claude-forge, MIT.
More from sangrokjung/claude-forge
- 0.776score
harness-diet
sangrokjung
Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules without paths frontmatter) back under budget — migrate narrative to…
SkillBFreshness: B★ 863Claude Code +9 - 0.776score
skill-factory
sangrokjung
Analyze session work and automatically convert reusable patterns into Claude Code skills.
SkillBFreshness: B★ 863Claude Code +9 - 0.776score
systematic-debugging
sangrokjung
Structured debugging methodology — use before proposing fixes for any error or failure.
SkillBFreshness: B★ 863Claude Code +9 - 0.776score
humanize-korean
sangrokjung
Clean up translation-ese and AI-writing tics in Korean prose so it reads like a person wrote it — content (facts, numbers, proper nouns, quotes) stays 100%…
SkillBFreshness: B★ 863Claude Code +9 - 0.776score
review-loop
sangrokjung
Run the adversarial verification loop — implement, then hand the change to a fresh checker that did not write it, fix what it finds, and re-dispatch until…
SkillBFreshness: B★ 863Claude Code +9 - 0.776score
session-wrap
sangrokjung
Use when wrapping up a session before ending.
SkillBFreshness: B★ 863Claude Code +9 - 0.776score
cc-dev-agent
sangrokjung
Use when starting Claude Code projects, writing CLAUDE.md/spec.md, dispatching subagents, or requesting Agent Teams parallel development.
SkillBFreshness: B★ 863Claude Code +9 - 0.776score
relay
sangrokjung
Session relay — compresses what's been done so far (writes a one-liner for /compact) and generates a "next task" prompt (a baton) for the user to hand off.
SkillBFreshness: B★ 863Claude Code +9 - 0.776score
frontend-code-review
sangrokjung
Trigger when the user requests a review of frontend files (e.g., `.tsx`, `.ts`, `.js`).
SkillBFreshness: B★ 863Claude Code +9 - 0.773score
continuous-learning-v2
sangrokjung
Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.
SkillBFreshness: B★ 863Claude Code +9 - 0.773score
korean-spell-check
sangrokjung
Use Nara/PNU Korean spell-check surfaces conservatively to proofread Korean text, chunk long input, and return change-focused correction suggestions.
SkillBFreshness: B★ 863Claude Code +9 - 0.772score
loop-forge
sangrokjung
Turn a one-line description of a repetitive task into a reusable, self-guarding slash command.
SkillBFreshness: B★ 863Claude Code +9
Signals
- Stars
- 863
- Forks
- 184
- Open issues
- 22
- Last commit (this folder)
- Feb 23, 2026 (8 months ago)
- Last release
- Aug 25, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/sangrokjung/claude-forge
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.400score
strategic-compact
GGGODLIN
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
SkillAFreshness: A★ 72Claude Code +9 - 0.399score
strategic-compact
Fmarzochi
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
SkillAFreshness: A★ 67Claude Code +9 - 0.347score
strategic-compact
mturac
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
SkillCFreshness: C★ 83Claude Code +9 - 0.344score
strategic-compact
ysyecust
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
SkillCFreshness: C★ 59Claude Code +9 - 0.299score
strategic-compact
marshall0524
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
SkillDFreshness: D★ 41Claude Code +9 - 0.294score
strategic-compact
Luohaothu
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
SkillDFreshness: D★ 26Claude Code +9 - 0.281score
strategic-compact
Infopibe
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
SkillDFreshness: D★ 8Claude Code +9 - 0.257score
strategic-compact
ashutoshrathi0909-oss
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
SkillDFreshness: D★ 1Claude Code +9 - 0.244score
strategic-compact
sumitkashyape2
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
SkillDFreshness: DClaude Code +9 - 0.243score
strategic-compact
vibeeval
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
SkillDFreshness: D★ 540Claude Code +9 - 0.241score
strategic-compact
bh679
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
SkillDFreshness: DClaude Code +9
More from sangrokjung
- 0.776score
harness-diet
sangrokjung
Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules without paths frontmatter) back under budget — migrate narrative to…
SkillBFreshness: B★ 863Claude Code +9 - 0.776score
relay
sangrokjung
Session relay — compresses what's been done so far (writes a one-liner for /compact) and generates a "next task" prompt (a baton) for the user to hand off.
SkillBFreshness: B★ 863Claude Code +9 - 0.776score
cc-dev-agent
sangrokjung
Use when starting Claude Code projects, writing CLAUDE.md/spec.md, dispatching subagents, or requesting Agent Teams parallel development.
SkillBFreshness: B★ 863Claude Code +9 - 0.776score
frontend-code-review
sangrokjung
Trigger when the user requests a review of frontend files (e.g., `.tsx`, `.ts`, `.js`).
SkillBFreshness: B★ 863Claude Code +9 - 0.776score
humanize-korean
sangrokjung
Clean up translation-ese and AI-writing tics in Korean prose so it reads like a person wrote it — content (facts, numbers, proper nouns, quotes) stays 100%…
SkillBFreshness: B★ 863Claude Code +9 - 0.776score
review-loop
sangrokjung
Run the adversarial verification loop — implement, then hand the change to a fresh checker that did not write it, fix what it finds, and re-dispatch until…
SkillBFreshness: B★ 863Claude Code +9
Cite this page
strategic-compact skill. Agent Mart. https://agentmart.dev/skills/sangrokjung-strategic-compact (last updated 2026-10-24)