context-compression
An agent skill by muratcankoylan, from muratcankoylan/Agent-Skills-for-Context-Engineering. Tags: automation, developer-tools, documents, performance, strategy.
What it does
This skill should be used when long-running agent sessions need context compression, structured summarization, compaction, token-per-task optimization, or durable handoff summaries that preserve decisions, files, risks, and next actions.
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add muratcankoylan/Agent-Skills-for-Context-Engineering --skill context-compression
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering
cp -r Agent-Skills-for-Context-Engineering/skills/context-compression ~/.claude/skills/context-compression
Safety box score
Grade A, minimal risk: 4 of 100 risk points, rated 2026-10-20. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill is a documentation-and-Python utility for context compression, probe generation, and evaluation. It does not ship network access, filesystem mutation, or credential handling; the main risk is ordinary local code execution plus the fact that its evaluator is mostly heuristic/stubbed rather than a real judge pipeline.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 1 (low) | `scripts/compression_evaluator.py` is a runnable Python module with a `__main__` demo; it executes local code, but it does not spawn shells or run downloaded code. |
| Network access | 0 (none) | No outbound requests or downloads are implemented in the shipped code; the file notes that LLM judge calls are "stubbed for demonstration". |
| Filesystem reach | 0 (none) | The shipped files only read their own source via import/tests and operate on in-memory strings; there are no writes or deletes outside the project. |
| Secrets & credentials | 0 (none) | Nothing in the skill reads tokens, keys, passwords, `.env` files, browser sessions, or other credential stores. |
| Privilege & persistence | 0 (none) | There is no use of sudo, global installs, services, scheduled tasks, or OS/shell configuration changes. |
| Instruction hijack surface | 0 (none) | `references/evaluation-framework.md` includes a judge `System Prompt` example, but it does not instruct the agent to ignore higher-priority rules, hide actions, or fetch external instructions. |
| Irreversible actions | 0 (none) | The skill is evaluative/documentary only; it does not push, deploy, post, pay, book, or delete anything. |
| Transparency | 0 (none) | All shipped artifacts are plain-text Markdown and Python; there are no binaries, minified blobs, base64 payloads, or unpinned installers. |
Before installing
- Read `scripts/compression_evaluator.py` and confirm you are comfortable running a local Python module with a demo entrypoint.
- If you need real LLM judging, inspect the stubbed `_evaluate_criterion` path first; as shipped it uses heuristics only.
- Review `references/evaluation-framework.md` if you plan to adopt the rubric, since it includes an embedded judge system prompt and blinding guidance.
Rated 2026-10-20 by an automated review of 4 files from the skill's repository.
Source
- Repository
- muratcankoylan/Agent-Skills-for-Context-Engineering (all skills from this repository)
- Path
- skills/context-compression/SKILL.md
- Branch
- main
- Updated
- 2026-09-19
Related skills
- context-degradation — This skill should be used for diagnosing and mitigating context degradation: lost-in-middle failures, context poisoning, context clash, context confusion.
- context-optimization — This skill should be used for improving context efficiency: context budgeting, observation masking, prefix or KV-cache strategy, partitioning.
- latent-briefing — This skill should be used when the user asks to "share memory between agents", "KV cache compaction for multi-agent", "orchestrator worker context".
- reasoning-trace-optimizer — Debug and optimize AI agents by analyzing reasoning traces, context degradation, tool confusion, instruction drift, repeated task failures.
- self-improvement-loops — This skill should be used when the harness, scaffold, workflow, or optimizer itself is the optimization target: recursive self-improvement (RSI) loops.
- bdi-mental-states — This skill should be used when modeling agent mental states with BDI concepts: beliefs, desires, intentions, RDF-to-belief transformations.