Strategic compact

From mshadmanrahman/pm-pilot · View interactive version

Strategic compact is an AI agent skill from the GitHub repository mshadmanrahman/pm-pilot. Monitor context usage and suggest compaction at logical milestones

How to use this skill

Skill file

Strategic Compact

Proactively manage context window to prevent degraded performance in long sessions.

When to Use

Procedure

  1. Assess Context State
  1. Identify Compaction Point

Suggest compaction at natural milestones:

  1. Preserve Key State

Before suggesting /clear, ensure these are persisted:

  1. Suggest Compaction

Output:

```

Context check: ~{percent}% used

Milestone: {what was just completed}

Recommendation: {compact now / safe to continue / approaching limit}

Before /clear:

```

  1. Post-Compaction Recovery

After /clear, use session-init skill to restore context.

Output Format

Context check: ~65% used
Milestone: Implementation phase complete
Recommendation: Good time to compact before code review

Before /clear:
- [ ] Handoff doc written
- [ ] Work committed (3 files)
- [ ] Todo updated

Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.