skills/strategic-compact/SKILL.md
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
npx skillsauth add nhouseholder/nicks-claude-code-superpowers strategic-compactInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Suggests manual /compact at strategic points in your workflow rather than relying on arbitrary auto-compaction.
Files are more reliable than conversation memory after compaction. Write critical state (current progress, decisions, blockers) to files before compaction. But compaction summaries still help with orientation — they're complementary, not useless.
Before any compaction or handoff, ask: "What do I know right now that exists ONLY in conversation context?" Write it to a file. Then compact.
This is the difference between a useful compaction and a lossy one:
session_requirements.md → compact → summary can be vague because the file has everythingAuto-compaction triggers at arbitrary points:
Strategic compaction at logical boundaries:
The suggest-compact.js script runs on PreToolUse (Edit/Write) and:
Environment variables:
COMPACT_THRESHOLD — Tool calls before first suggestion (default: 50)The problem with repeated compaction: Each compaction loses fidelity. After 2-3 compactions, nuanced details, user preferences, approach decisions, and subtle context degrade. The summary of a summary of a summary is a skeleton.
The solution: When context is running low, create a full handoff document and advise starting a fresh session instead of compacting again.
| Situation | Action | |-----------|--------| | First time context is low | Compact — fidelity loss is minimal | | After 2+ compactions in a session | Suggest a handoff document — fidelity is degrading | | After 3+ compactions in a session | Strongly recommend pausing and resuming in a fresh session — context quality degrades significantly beyond this point | | Complex multi-step task still in progress | Auto-handoff — too much state to survive compaction | | User has given detailed requirements this session | Auto-handoff — requirements MUST survive intact | | Debugging session with deep context | Auto-handoff — root cause analysis needs full detail |
When auto-handoff triggers, follow the auto-handoff skill's handoff document protocol — it owns the template, format, and delivery message. Write to ~/.claude/projects/<project>/memory/handoff.md and commit to GitHub.
Use this table when compaction (not handoff) is appropriate:
| Phase Transition | Compact? | Why | |-----------------|----------|-----| | Research → Planning | Yes | Research context is bulky; plan is the distilled output | | Planning → Implementation | Yes | Plan is in TodoWrite or a file; free up context for code | | Implementation → Testing | Maybe | Keep if tests reference recent code; compact if switching focus | | Debugging → Next feature | Yes | Debug traces pollute context for unrelated work | | Mid-implementation | No | Losing variable names, file paths, and partial state is costly | | After a failed approach | Yes | Clear the dead-end reasoning before trying a new approach | | Already compacted once | No — use auto-handoff instead | Compounding fidelity loss |
Understanding what persists helps you compact with confidence:
| Persists | Lost |
|----------|------|
| CLAUDE.md instructions | Intermediate reasoning and analysis |
| TodoWrite task list | File contents you previously read |
| Memory files (~/.claude/memory/) | Multi-step conversation context |
| Git state (commits, branches) | Tool call history and counts |
| Files on disk | Nuanced user preferences stated verbally |
Before spawning any agent that will produce large output (research, planning, code generation), check:
If yes to any → compact first, then spawn the agent. An agent that consumes remaining context leaves the user unable to say "continue" — Claude literally cannot respond.
This is the #1 cause of the "continue gets no response" bug.
Before EVERY /compact, save a checkpoint file. This is the difference between safe compaction and lossy compaction.
Write to ~/.claude/projects/<project>/memory/pre_compact_checkpoint.md (overwritten each time):
# Pre-Compact Checkpoint — <timestamp>
## What we were doing
<1-2 sentence summary of current task>
## Key numbers / data computed this session
<Any stats, counts, P/L figures, measurements — these WILL be lost in compaction>
## Decisions made
<Approach choices, user preferences stated this session, "we decided X because Y">
## Current progress
<What's done, what's next, any blockers>
## Files modified this session
<List of files changed and why>
After compaction, the first thing to do is re-read this file. It costs ~200 tokens to read but saves thousands in re-discovery.
When NOT to checkpoint (skip the file, just compact):
/compact/compact with a summary — Add a custom message: /compact Focus on implementing auth middleware nextpre_compact_checkpoint.mdcontinuous-learning skill — Extracts patterns before session endstools
Unified context management and session continuity skill. Combines total-recall, strategic-compact, /ledger, and session continuity. Runs in background to preserve critical context across compaction and sessions.
tools
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
tools
Suggest /ultraplan for complex planning tasks on Claude Code CLI (2.1.91+ only). Research preview.
tools
UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 9 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient. Integrations: shadcn/ui MCP for component search and examples.