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.01444 |
| Opus 5 | $0.00026 | $0.00722 |
| Sonnet 5 | $0.00010 | $0.00289 |
| Haiku 4.5 | $0.00005 | $0.00144 |
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 11d 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 — 135 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 never wanders back into a dropped plan. On a held-out pivot set it cleans 83% of abandoned subjects with zero wrongly flagged live choices.
- 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 — CI-tested intest/value-survival.test.mjs. On the maintainer's own real sessions the capsule kept ~79% of key signals at ~5× reduction and ~93% at ~3.4×;test/fidelity-bench.mjsmeasures this against your own~/.openclawsessions (run it on your data to reproduce — the figures are from private sessions, not a repo fixture).
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 CI-gated by
npm test):
- 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
29 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.
- CHANGELOG.md 1.1 KB
- demo/compression.js 53 KB runs code
- demo/index.html 8.0 KB
- demo/platform.browser.js 2.2 KB runs code
- demo/README.md 3.2 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 2.6 KB
- src/compression.ts 53 KB runs code
- src/index.ts 14 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 12 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.
- 11d 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 (22 stars, last pushed 8d ago), licensed MIT. It adds 51 tokens to every session and 1,444 once invoked, about $0.0003 per session on Opus 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
engraphis-memory
Give the agent durable, scoped, explainable memory across sessions and repositories through the Engraphis MCP tools. Use when you learn a convention, decision, bug cause/fix, or user preference worth keeping; when prior context would help before you answer or act (to avoid re-asking or re-deriving); when asked "why is…
memorywhale
Query and write durable debugging memory recorded by MemoryWhale. Use when debugging a failure that may have happened before, when you need the exact error/flags/output from an earlier attempt, when the user asks "how did we fix this last time?", or once you've figured out why something failed / how a fix worked and…
card-refresh
Use when refreshing stale Brigade memory cards from the care refresh queue - category allowlist, grounded edits that cite on-disk sources of truth, archive-only retention, and reinforce-in-place instead of near-duplicate siblings (#724). Never delete, remove, or prune.
help
Show how to use Cortex persistent memory. Use when the user asks about Cortex, memory, storing decisions, or recalling past work.
recall
Search Cortex memory for past decisions, conventions, and lessons. Use when the user asks about previous work, past decisions, or what they learned about something.
store
Store a decision or lesson in Cortex persistent memory. Use when the user wants to save a decision, convention, lesson learned, or important knowledge for future sessions.