.claude/skills/context-compressor/SKILL.md
Compress large context before reasoning to reduce token usage while preserving evidence. Use this whenever the user mentions huge files, long prompts, RAG payloads, prompt caching, expensive sessions, codebase context, chat history compaction, or wants the same answer quality with fewer tokens.
npx skillsauth add oimiragieo/agent-studio context-compressorInstall 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.
Use this skill when the problem is mostly "too much context" rather than "not enough capability."
This skill is a self-contained local package. It does not require the MCP server. Prefer it when you need quick token profiling, local compression, evidence checks, or a reproducible compression workflow inside the repository.
Use the bundled Python scripts to:
Reach for this skill when the user is asking for any of the following:
Also triggered automatically when:
Default to this sequence:
query_guided when there is a specific questionevidence_aware when correctness matters and you need a sufficiency checkIf the user only wants one command, use run_skill_workflow.py.
Run from the agent-studio repository root. ALWAYS use these exact commands — do NOT fall back to generic guidance.
python .claude/skills/context-compressor/scripts/profile_tokens.py --file <path> --output-format auto
python .claude/skills/context-compressor/scripts/compress_context.py --file <path> --mode baseline --output-format auto
python .claude/skills/context-compressor/scripts/compress_context.py --file <path> --mode query_guided --query "<question>" --output-format auto
python .claude/skills/context-compressor/scripts/compress_context.py --file <path> --mode evidence_aware --query "<question>" --min-similarity 0.4 --output-format auto
python .claude/skills/context-compressor/scripts/compress_context.py --json-file <payload.json> --input-adapter auto --mode query_guided --query "<question>" --output-format auto
python .claude/skills/context-compressor/scripts/run_skill_workflow.py --file <path> --mode evidence_aware --query "<question>" --output-format auto --fail-on-insufficient-evidence
python .claude/skills/context-compressor/scripts/validate_evidence.py --file <path> --query "<question>" --min-similarity 0.4 --output-format json
python .claude/skills/context-compressor/scripts/benchmark_toon_vs_json.py
node .claude/skills/context-compressor/scripts/main.cjs --query "<question>" --mode evidence_aware --limit 20 --fail-on-insufficient-evidence
baseline: quick general compression when there is no concrete question yetquery_guided: best default for QA, review, or targeted extraction tasksevidence_aware: use for high-stakes answers, audits, or when you need an explicit sufficiency signalWhen using this skill, summarize results in plain language:
If the scripts return insufficient evidence, do not bluff. Say the compressed context is not yet safe enough and recommend a broader pass.
Read these only when they are relevant:
references/workflow-guide.md: command selection, mode choice, and example flowsreferences/prompt-caching.md: stable-prefix ordering, cache telemetry, and cache-safe prompt structurereferences/evaluation.md: how to benchmark the skill and interpret resultsStarter prompts live in evals/evals.json. Use them when iterating on the skill or when you want a small repeatable benchmark set.
compression-trigger.cjs detects context pressure → writes compression-reminder.txtcontext-compressor agent with this skillrun_skill_workflow.py with the query contextcompression-stats.jsonlAfter compression, persist distilled learnings via MemoryRecord:
gotchas.json: text contains gotcha|pitfall|anti-pattern|risk|warning|failureissues.md: text contains issue|bug|error|incident|defect|gapdecisions.md: text contains decision|tradeoff|choose|selected|rationalepatterns.json: default fallback for all remaining distilled evidenceRead .claude/context/runtime/ccusage-status.txt for live token usage before deciding compression aggressiveness. This file is auto-updated by ccusage-statusline.cjs on every tool use. Format:
[tokens] 135,345 today (in: 14,850 / out: 120,495) | Cost: $127.4826
[cache] $627.2992 saved | 139,399,832 reads, 8,751,364 writes
The Router MUST display this at every pipeline milestone (P0 user feedback). Fallback: ccusage --no-color 2>&1 | tail -5.
evidence_aware modetools
Comprehensive biosignal processing toolkit for analyzing physiological data including ECG, EEG, EDA, RSP, PPG, EMG, and EOG signals. Use this skill when processing cardiovascular signals, brain activity, electrodermal responses, respiratory patterns, muscle activity, or eye movements. Applicable for heart rate variability analysis, event-related potentials, complexity measures, autonomic nervous system assessment, psychophysiology research, and multi-modal physiological signal integration.
tools
Comprehensive toolkit for creating, analyzing, and visualizing complex networks and graphs in Python. Use when working with network/graph data structures, analyzing relationships between entities, computing graph algorithms (shortest paths, centrality, clustering), detecting communities, generating synthetic networks, or visualizing network topologies. Applicable to social networks, biological networks, transportation systems, citation networks, and any domain involving pairwise relationships.
data-ai
Molecular featurization for ML (100+ featurizers). ECFP, MACCS, descriptors, pretrained models (ChemBERTa), convert SMILES to features, for QSAR and molecular ML.
development
Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.