claude-code-plugin-ref…
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops; use night-market-operations.
Recommends context compression strategies for bloated or quota-heavy sessions. Use when context feels sluggish or quota burns faster than expected.
$ npx -y skills add athola/claude-night-market --skill compression-strategy --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/compression-strategyContext preview
The summary Claude sees to decide when to auto-load this skill.
Recommends context compression strategies for bloated or quota-heavy sessions. Use when context feels sluggish or quota burns faster than expected.
name: compression-strategy
description: Recommends context compression strategies for bloated or quota-heavy sessions. Use when context feels sluggish or quota burns faster than expected.
globs:
alwaysApply: false
progressive_loading: true
dependencies:
hub: []
modules:
- log-debugging-hygiene
- reversible-compression
model_hint: standardAnalyze current context usage and recommend optimal compression strategies.
1. `compression-strategy:analyze-context` 2. `compression-strategy:recommend-strategy` 3. `compression-strategy:estimate-savings`
Run `/context` to check current usage. Then estimate:
1. **Tool output accumulation**: How much context is from tool results vs. conversation? 2. **Stale content age**: How many turns since critical decisions were made? 3. **Active files**: Which files are still relevant vs. historical?
Based on analysis, recommend one of:
Best when:
Process: 1. Save critical state to `.claude/session-state.md` 2. Run `/clear` 3. Run `/catchup` to reload active files
Best when:
Process: 1. Run `Skill(conserve:clear-context)` to spawn continuation agent 2. Agent receives fresh context with saved state
Best when:
Process: 1. Archive old decisions/errors to `.claude/context-archive/` 2. Summarize completed work in memory 3. Continue with leaner context
Best when:
Process: 1. Identify delegatable tasks 2. Spawn specialized agents via `Task` tool 3. Main context stays lean
For the recommended strategy, estimate:
| Strategy | Typical Savings | Risk | |----------|-----------------|------| | /clear and /catchup | 70-90% | Low if state saved | | Continuation agent | 80-95% | Low, state preserved | | Archive and summarize | 20-40% | Very low | | Delegate to subagent | 30-50% | Low, parallel work | | Reversible compression (CCR) | 47-92% per archived output | Low, original cached |
The CCR row is per oversized tool output, not whole-context: a large Bash, Read, or Grep result is archived to a handle and replaced by a digest for future turns. Savings are content-type-dependent (logs compress hard, prose barely at all). See `modules/reversible-compression.md`.
Preserved context is saved to:
.claude/context-archive/pre-compact-YYYYMMDD-HHMMSS-SESSIONID.md
This is automatically created by the `pre_compact_preserve` hook before any `/compact` operation.
Load `modules/log-debugging-hygiene.md` when the bloat source is pasted log output (debug traces, CI failures, hook logs, JSONL). That module documents a three-tier filter-first workflow with benchmarked snippets and an honest framing of when compression is and is not warranted. On the committed `intake_queue.jsonl` fixture, `tail -n 100` beats lossless compression by 25 percentage points; the module formalizes that asymmetry.
Load `modules/reversible-compression.md` when large tool outputs (code search, log dumps, file reads) are the bloat source. That module documents the CCR pattern: the `tool_output_summarizer` hook archives any oversized output to a content-addressed handle under `.claude/context-archive/`, and `context_retrieve.py` fetches the original (or a slice) on demand, so the original survives `/clear` without staying resident.
/compression-strategy
Output:
Context Analysis: - Current usage: 52% - Tool output: ~15KB (3 tool results) - Stale content: ~40% (decisions from 8+ turns ago) Recommendation: Option C - Archive + Summarize - Archive old decisions to context-archive - Keep active files and recent decisions - Estimated savings: 25-35% Commands: 1. Read .claude/context-archive/ to see what's preserved 2. Summarize completed work 3. Continue with leaner context
stated reason
retrieval command are surfaced (not just a warning)
prose (compresses by roughly nothing)
A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops; use night-market-operations.
States load-bearing decisions, invariants, and weak points. Use when judging a design change. Do not use for gating; use night-market-change-control.
Rebuild the dev environment: uv, Python tiers, pins, traps. Use when onboarding or toolchain breaks. Do not use for daily commands; use night-market-operations.
Classify, gate, and review changes. Use when landing a PR, releasing, or amending rules. Do not use for failure triage; use night-market-debugging-playbook.
Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for settled battles; see failure-archaeology.
Bind loop 'done' to unfakeable gates. Use to harden egregore/herald loops or promote completion_integrity. Not for QA gates; use night-market-validation-and-qa.