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.
npx skills add Parad0x-Labs/openclaw-skills --skill context-capsulegit clone --depth 1 https://github.com/Parad0x-Labs/openclaw-skillsWrote 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.
[](https://agentmods.dev/skills/parad0x-labs/openclaw-skills/context-capsule)<a href="https://agentmods.dev/skills/parad0x-labs/openclaw-skills/context-capsule"><img src="https://agentmods.dev/badge/skills/parad0x-labs/openclaw-skills/context-capsule/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.
<a href="https://agentmods.dev/skills/parad0x-labs/openclaw-skills/context-capsule"><img src="https://agentmods.dev/badge/skills/parad0x-labs/openclaw-skills/context-capsule.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00051 | $0.01659 |
| Opus 5.5 | $0.00020 | $0.00664 |
| Sonnet 5.5 | $0.00010 | $0.00332 |
| Haiku 4.5 | $0.00005 | $0.00166 |
Grade B, and why
context-capsule scanned grade B with 2 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 23d 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.
Instruction-override phrasingmediumPrompt injection
Text telling the model to disregard its earlier instructions or safety rules is the shape of a prompt injection, whoever wrote it.
> ("ignore previous instructions", "you are now…", "reveal your prompt") are Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
Asks the agent to reveal its instructionslowSystem prompt leakage
Directions to print, repeat or translate the system prompt extract configuration the operator did not intend to expose.
> ("ignore previous instructions", "you are now…", "reveal your prompt") are Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
How it starts
The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context Capsule
Compress older agent session history before it hits the LLM, so long chats stop re-sending the full transcript every turn. It keeps the recent tail verbatim and turns older history into a bounded extractive capsule with decisions, tasks, errors, paths, links, questions, and durable facts. Works with any model — Claude, GPT, Ollama, Mistral, LM Studio.
What sets it apart:
- Lane-change aware. When the session pivots ("replace X with Y", "forget X,
use Y instead"), the capsule marks the abandoned direction as superseded and
keeps the live one, so the model is steered away from a dropped plan. On the
6-case pivot set in
test/supersession-bench.mjs(5 pivots, 1 no-pivot control, 6 abandoned subjects) v1.7.0 strikes or omits 6 of 6 abandoned subjects and flags 0 live choices at budgets 700 and 1,400;npm testfails below 83% or on any wrongly flagged live choice. Pivots stated without an explicit cue are not detected. - High fidelity per token. Distinctive signals — file paths, IDs, ports,
URLs, commands, errors, decisions — are emitted as dense atoms. As of v1.7.0,
a lone value (a bare port
5433, an issue ref#4821, a versionv2.13.0, an ISO date, a hyphenated code likeNEEDLE-ZX-7742) is emitted as its own atom, so it survives compression even when its surrounding sentence loses the budget race (test/value-survival.test.mjs). On the public 109-message fixture inbench/fixtures, with default settings the model receives 2,061 estimated tokens per call instead of 7,281, and 21 of 40 fixture questions still have their answer keywords in that text (35 with full history). Key-signal recall of the capsule alone is 65% at a 1,200-token budget and 86% at 2,000 (test/fidelity-bench.mjs, which also runs on your own~/.openclawsessions). These are availability checks, not model-answer accuracy, which has not been measured. Details:docs/CONTEXT_CAPSULE_BENCHMARK.mdin the repository.
Self-contained (v1.7.0): The compression core is bundled directly in this skill (
src/compression.ts). There is no external runtime dependency, and the plugin makes no network, file-system, or on-chain calls. Everything runs locally using only Node's built-inzlibandcrypto, and is fully deterministic. Capsules carry aschematag (context-capsule.v2).
Protections (defense-in-depth, all checked by
npm test, which runs in the repository's skills CI lane and before every publish):
- Secret redaction (every surface). API keys (OpenAI, Anthropic, AWS, Google, GitHub classic + fine-grained, GitLab, npm, Slack, Stripe, SendGrid, Twilio), JWTs, PEM blocks, URL basic-auth,
DATABASE_URL=DSNs, andkey=valuecredentials are detected by prefix/shape/context — never by raw entropy, so public IDs (git SHAs, UUIDs, chain addresses) are untouched. Redaction runs before compression, so no secret survives even in the zlib audit blob, and again on output — the core never emits a secret even if called directly. Each redaction carries a one-way SHA-256 fingerprint ([REDACTED_AWS_KEY#a1b2c3d4]) so the same key is correlatable across turns without ever exposing its value. Best-effort pattern matching — strong, not a guarantee for the most sensitive chats.- Injection quarantine — instruction-injection patterns in older history ("ignore previous instructions", "you are now…", "reveal your prompt") are wrapped as inert untrusted text, never surfaced as a live instruction.
- Bounded work — every extraction pass runs on size-capped input, so a megabyte message or an adversarial string finishes in milliseconds instead of hanging the turn.
What ships with it
36 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- bench/check-drift.mjs 1.2 KB runs code
- bench/fixture-bench.mjs 7.5 KB runs code
- bench/fixtures/agent-session-100.json 33 KB
- bench/fixtures/recovery-questions.json 8.6 KB
- bench/results/fidelity-fixture.json 587 B
- bench/results/latest.json 11 KB
- bench/results/latest.md 1.1 KB
- CHANGELOG.md 3.1 KB
- demo/compression.js 54 KB runs code
- demo/index.html 8.0 KB
- demo/platform.browser.js 2.2 KB runs code
- demo/README.md 3.4 KB
- demo/vendor/noble-hashes/_md.js 8.2 KB runs code
- demo/vendor/noble-hashes/_u64.js 4.9 KB runs code
- demo/vendor/noble-hashes/sha2.js 19 KB runs code
- demo/vendor/noble-hashes/utils.js 20 KB runs code
- demo/vendor/pako.esm.mjs 221 KB runs code
- openclaw.plugin.json 1.3 KB
- package-lock.json 2.3 KB
- package.json 1.5 KB
- README.md 3.6 KB
- src/compression.ts 53 KB runs code
- src/index.ts 15 KB runs code
- src/platform.browser.ts 2.4 KB runs code
- src/platform.ts 2.4 KB runs code
- src/types/openclaw-host.d.ts 1007 B runs code
- test/compression-smoke.mjs 1.2 KB runs code
- test/fidelity-bench.mjs 6.6 KB runs code
- test/hardening-bench.mjs 8.3 KB runs code
- test/platform-parity.test.mjs 9.5 KB runs code
- test/plugin-load.test.mjs 13 KB runs code
- test/quality.test.mjs 4.0 KB runs code
- test/secret-bench.mjs 5.8 KB runs code
- test/supersession-bench.mjs 10 KB runs code
- test/value-survival.test.mjs 2.2 KB runs code
- tsconfig.json 463 B
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.
- 23d ago Changed · +12 lines 50f766b9272a
- 2mo ago First seen · 135 lines · 51 tokens per session scan B 685906e53b45
context-capsule is a skill published in the GitHub repository Parad0x-Labs/openclaw-skills (23 stars, last pushed 17d ago), licensed MIT. It adds 51 tokens to every session and 1,659 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 2 findings (instruction-override phrasing, asks the agent to reveal its instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
brain-save
Create and manage governed memories by capturing one fact, decision, pattern, or convention, or by retiring an outdated memory. This is side-effecting and never auto-fires. Use when preserving a durable fact without a full recompile or changing a memory's lifecycle. Trigger with "/brain-save".
brain
Search and analyze governed notes, decisions, runbooks, and conventions, returning a qmd:// citation for every supported claim. Use when checking what the brain has captured about architecture, infrastructure, decisions, or operating practices. Trigger with "/brain", "ask the brain", or "check my knowledge base".
notes
Skill "notes" from Pinvou/pinvou-agent, covering ima notes, operations, write rules, examples and response handling.
context-recovery
Recovers project handoff context from local Codex, Claude Code, Gemini, CodeBuddy, and codexmate-derived sessions. Use when the user asks what happened in prior project/PR/branch/file/error work, needs a handoff brief, wants old decisions or validations recovered, or asks to summarize cross-session project activity…
shodh-memory
Persistent memory system for AI agents. Use this skill to remember context across conversations, recall relevant information, and build long-term knowledge. Activate when you need to store decisions, learnings, errors, or context that should persist beyond the current session.
learn
Manually record an insight, correction, preference, or rule that the agent should remember for future tasks.