compaction-advisor

Provides context-aware compaction guidance with intelligent checkpointing. Monitors context during long tasks and suggests checkpoints before compaction interrupts your work.

16 stars

Best use case

compaction-advisor is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Provides context-aware compaction guidance with intelligent checkpointing. Monitors context during long tasks and suggests checkpoints before compaction interrupts your work.

Teams using compaction-advisor should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/compaction-advisor/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/compaction-advisor/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/compaction-advisor/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How compaction-advisor Compares

Feature / Agentcompaction-advisorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Provides context-aware compaction guidance with intelligent checkpointing. Monitors context during long tasks and suggests checkpoints before compaction interrupts your work.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Compaction Advisor

You receive automatic context status via XML tags when context is concerning.

## Message Types

### 1. Context Status (on user prompts)

When you see these tags at the start of a conversation turn:

```
<context-status>CRITICAL: Only 12k tokens free. Run /compact before any task.</context-status>
<context-status>WARNING: 25k tokens free. Only small tasks safe.</context-status>
<context-status>CAUTION: 40k tokens free. Medium tasks OK, compact before large.</context-status>
```

When context is healthy (50k+ free), you won't see any tag.

### 2. Checkpoint Suggestions (during long tasks)

During multi-step work, you may see:

```
<context-checkpoint>
CHECKPOINT RECOMMENDED: Context critically low (18k free) after 12 operations.
Good time to pause and /compact. Summarize progress so far and key context to preserve.
</context-checkpoint>
```

This means you've been working for a while and context is running low.

### 3. PreCompact Warning (emergency)

Just before auto-compaction triggers:

```
<precompact-warning>
AUTO-COMPACTION IMMINENT
Context window is full. Compaction will happen after this message.
</precompact-warning>
```

## How to Respond

### When you see `<context-status>` CRITICAL

Immediately advise:
```
Context is critically low (12k free). Before we proceed, run:
/compact Focus on [relevant context to preserve]
```

### When you see `<context-status>` WARNING

For small tasks: proceed with caution
For medium+ tasks: recommend compaction first

```
Context is at 25k free. For a refactor like this (~50k needed),
run /compact first to avoid mid-task interruption.
```

### When you see `<context-checkpoint>`

This is mid-task. Pause and offer a checkpoint:

```
Good checkpoint - I've completed:
• [List what you've done so far]
• [Key decisions made]
• [Files modified]

Context is at 18k. To continue safely, run:
/compact Focus on [key context for remaining work]

After compacting, I'll continue with [next steps].
```

### When you see `<precompact-warning>`

This is urgent. Quickly summarize:

```
Compaction is about to happen. Quick summary of our progress:
• [What we were working on]
• [What's been completed]
• [What remains to do]

After compaction, remind me to [specific next step].
```

### When you see nothing

Context is healthy. Proceed normally without mentioning it.

## Task Size Reference

| Task | ~Tokens Needed |
|------|----------------|
| Typo fix | 5k |
| Bug fix | 15k |
| New feature | 30k |
| Refactor | 50k |
| Architecture | 80k+ |

## Compact Commands

```
/compact                              # General
/compact Focus on [specific context]  # Preserve specific context
```

Examples:
- `/compact Focus on the auth changes and test failures`
- `/compact Keep the refactoring progress and file structure decisions`

## Key Points

- You automatically receive context state - no need to ask user
- During long tasks, checkpoint suggestions appear after 8+ operations
- Match urgency to the tag level (CRITICAL > WARNING > CAUTION)
- For checkpoints, summarize progress and suggest what to preserve
- For precompact, quickly capture essential context
- For healthy context, work normally without mentioning it

Related Skills

dotnet-advisor

16
from diegosouzapw/awesome-omni-skill

Routes .NET/C# work to domain skills. Loads coding-standards for code paths.

database-expert-advisor

16
from diegosouzapw/awesome-omni-skill

Database design, optimization, and operations expert

cto-advisor

16
from diegosouzapw/awesome-omni-skill

Technical leadership guidance for engineering teams, architecture decisions, and technology strategy. Includes tech debt analyzer, team scaling calculator, engineering metrics frameworks, technology evaluation tools, and ADR templates. Use when assessing technical debt, scaling engineering teams, evaluating technologies, making architecture decisions, establishing engineering metrics, or when user mentions CTO, tech debt, technical debt, team scaling, architecture decisions, technology evaluation, engineering metrics, DORA metrics, or technology strategy.

ceo-advisor

16
from diegosouzapw/awesome-omni-skill

Executive leadership guidance for strategic decision-making, organizational development, and stakeholder management. Includes strategy analyzer, financial scenario modeling, board governance frameworks, and investor relations playbooks. Use when planning strategy, preparing board presentations, managing investors, developing organizational culture, making executive decisions, or when user mentions CEO, strategic planning, board meetings, investor updates, organizational leadership, or executive strategy.

backend-expert-advisor

16
from diegosouzapw/awesome-omni-skill

Backend expert guidance for API/DB/Security/Architecture

stardew-wiki-advisor

16
from diegosouzapw/awesome-omni-skill

Query Stardew Valley Wiki using natural language. Ask about crops, NPCs, strategies, and more.

legal-advisor

16
from diegosouzapw/awesome-omni-skill

Draft privacy policies, terms of service, disclaimers, and legal notices. Creates GDPR-compliant texts, cookie policies, and data processing agreements.

codex-advisor

16
from diegosouzapw/awesome-omni-skill

Get a second opinion from OpenAI Codex CLI for plan reviews, code reviews, architecture decisions, and hard problems. Use when you need external validation, want to compare approaches, or are stuck on a difficult problem.

architecture-advisor

16
from diegosouzapw/awesome-omni-skill

Helps solo developers with AI agents choose optimal architecture (monolithic/microservices/hybrid)

advisor

16
from diegosouzapw/awesome-omni-skill

Interactive workflow advisor that helps you choose optimal AI primitives from agentconfig.org based on your specific workflow needs, skill level, and tooling preferences. Use when deciding which primitives to implement or how to structure your AI configuration.

Advisory Board Builder

16
from diegosouzapw/awesome-omni-skill

Recruit, structure, and manage advisory boards for strategic guidance

tech-advisor

16
from diegosouzapw/awesome-omni-skill

Recomienda stack tecnológico óptimo basado en requisitos del proyecto