strategic-compact

strategic-compact is a skill for Claude Code from hamzaPixl/pixl-ai. It costs 48 tokens per session (534 once invoked), scanned A, original, MIT.

A guide for managing a large conversation before its context limit is reached. It identifies decisions, tasks, files, and errors to preserve, summarize, or discard.

In plain words
What is it for?
Use it before compacting context to create a concise record of active work, decisions, paths, interfaces, and resolved problems.
Why use it?
It reduces the risk of losing important project knowledge when the conversation is compacted.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents.

Part of the pixl-crew plugin — 93 skills, 14 agents, 6 hooks shipped together

Good fit Use it before compacting context to create a concise record of active work, decisions, paths, interfaces, and resolved problems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hamzapixl/pixl-ai/strategic-compact
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add hamzaPixl/pixl-ai --skill strategic-compact
Clone the repo
git clone --depth 1 https://github.com/hamzaPixl/pixl-ai

Made for: Claude Code.

Or install pixl-crew, the plugin that ships this one along with the rest of its 93 skills, 14 agents, 6 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for strategic-compact

README.md
[![agentmods](https://agentmods.dev/badge/skills/hamzapixl/pixl-ai/strategic-compact/github.svg)](https://agentmods.dev/skills/hamzapixl/pixl-ai/strategic-compact)
Your own site
<a href="https://agentmods.dev/skills/hamzapixl/pixl-ai/strategic-compact"><img src="https://agentmods.dev/badge/skills/hamzapixl/pixl-ai/strategic-compact/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for strategic-compact

Your own site · 80×15
<a href="https://agentmods.dev/skills/hamzapixl/pixl-ai/strategic-compact"><img src="https://agentmods.dev/badge/skills/hamzapixl/pixl-ai/strategic-compact.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 534 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.00534
Opus 5.5 $0.00019 $0.00214
Sonnet 5.5 $0.00010 $0.00107
Haiku 4.5 $0.00005 $0.00053

Measured 1mo ago against content hash d478e62c4d2e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

strategic-compact scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/crew/skills/strategic-compact/SKILL.md · 67 lines

How it starts

The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Strategic Compact

Guide intelligent context management before compaction.

Step 1: Assess Current Context

Identify what's currently in the context window:

  • Files read (which ones, how recently)
  • Decisions made (architectural choices, trade-offs)
  • Active tasks (what's in progress, what's done)
  • Tool call history (what's been tried, what worked)

Step 2: Classify by Retention Priority

Priority What Action
Must keep Current task description and acceptance criteria Preserve
Must keep Architectural decisions made this session Preserve
Must keep Error messages and their resolutions Preserve
Should keep File paths and key line numbers Summarize
Should keep API contracts and type definitions Summarize
Can discard Full file contents already edited Discard
Can discard Search results from completed lookups Discard
Can discard Tool call metadata and verbose outputs Discard

Step 3: Generate Compact Summary

Create a compact state document:

## Active Task
<1-2 sentence description of what we're doing>

## Key Decisions
- <decision 1>
- <decision 2>

## Files Modified
- `path/to/file.ts` — <what was changed>

## Blocked On / Next Steps
- <what needs to happen next>

## Important Context
- <any critical information that would be lost>

Step 4: Recommend Action

Based on context usage, recommend:

  • Continue — context is fine, no action needed
  • Summarize — compress verbose outputs, keep key facts
  • Save and clear — run /session-wrap then /clear
  • Delegate — offload remaining work to a subagent with a context packet

Output

Present the compact summary and recommendation. If the user approves, save to .claude/memory/pre-compact-<timestamp>.md.

Read the full file on GitHub · 67 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 67 lines · 48 tokens per session scan A d478e62c4d2e

Subscribe to this mod's changes

strategic-compact is a skill published in the GitHub repository hamzaPixl/pixl-ai (2 stars, last pushed 6mo ago), licensed MIT. It adds 48 tokens to every session and 534 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

Migrate

Intakes external content (notes, CLAUDE.md, Cursor rules, Obsidian/Notion/Apple Notes exports), classifies chunks against the LifeOS taxonomy, and commits with provenance after confidence-tiered approval. USE WHEN /migrate, migrate content, import from other LifeOS, bring in old notes, import Cursor rules, import…

danielmiessler/LifeOS · 104 tokens

Cortex

LifeOS memory, prior-session recall, and learning capture. USE WHEN capture this learning, document this learning, what did we learn recently, recent learnings, cortex, knowledge, knowledge base, search knowledge, what do we know about, archive, harvest, knowledge status, develop note, add to knowledge, add a people…

danielmiessler/LifeOS · 184 tokens

wiki-dashboard

Create dynamic, queryable Obsidian dashboard views using Bases or Dataview. Use for auto-updating tables, indexes, or structured views of vault content; not for ordinary question answering.

Ar9av/obsidian-wiki · 42 tokens

relevance-coarse-filter

Cheap, high-recall first-pass filter that removes obvious junk from a detector candidate pool before expensive story-origin research and PR judgment. Decides keep, monitoronly, or reject — never ranks, writes angles, verifies dates, or decides whether to pitch.

elvisun/newsjack · 57 tokens

session-compact

AI DevKit · Compact a historical AI coding session with Jev when context is long, work is handed off or resumed, or durable continuation facts and memory candidates need extraction.

codeaholicguy/ai-devkit · 39 tokens

daily-briefing

Proactive daily briefing that fires on a recurring schedule, pulls recent memory and workspace context, composes a structured summary (action items, progress, radar, next steps), and delivers it to all active channels. Enable with a time like "set up my daily briefing at 9am". Disable, reschedule, or check status at…

vellum-ai/vellum-assistant · 75 tokens