agentCLAWHUBUnverified

Openclaw Context Capsule

Compresses older OpenClaw agent session history into a bounded, lane-change-aware context capsule — keeps recent messages verbatim, flags abandoned directions, quarantines injected instructions, and redacts secrets. Local, deterministic, any model.

OpenClaw

Rank

62

Safety

84

Downloads

1.2k

Updated

Oct 10, 2026

Version

1.6.1

Source

CLAWHUB

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.2K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Public facts

Every fact links back to the source it came from.

Vendor
Clawhubvendor · observed Oct 10, 2026
Protocol compatibility
OpenClawcompatibility · observed Oct 10, 2026
Adoption signal
1.2K downloadsadoption · observed Oct 10, 2026
Latest release
1.6.1release · observed Jul 9, 2026
Handshake status
UNKNOWNsecurity

Install and run

Setup complexity: low.

clawhub skill install s17f1wyc9w1zq21b4wj4a63xw187x632:context-capsule
  1. Install using `clawhub skill install s17f1wyc9w1zq21b4wj4a63xw187x632:context-capsule` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/parad0x-labs/context-capsule before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-parad0x-labs-context-capsule/snapshot"

Documentation

CLAWHUB

81,118 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: context-capsule
description: Compresses older OpenClaw agent session history into a bounded, lane-change-aware context capsule — keeps recent messages verbatim, flags abandoned directions, quarantines injected instructions, and redacts secrets. Local, deterministic, any model.
license: MIT
metadata:
  author: Parad0x-Labs
---

# 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 version `v2.13.0`, an
  ISO date, a hyphenated code like `NEEDLE-ZX-7742`) is emitted as its **own** atom,
  so it survives compression even when its surrounding sentence loses the budget
  race — CI-tested in `test/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.mjs` measures this against **your own** `~/.openclaw` sessions
  (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-in `zlib` and `crypto`, and is fully
> deterministic. Capsules carry a `schema` tag (`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, and
>   `key=value` credentials 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 turn

README.md

# context-capsule — OpenClaw ContextEngine plugin

Self-contained OpenClaw context engine that reduces prompt tokens in long agent
sessions. It keeps the recent tail verbatim and converts older history into a
bounded, model-readable extractive capsule.

The capsule preserves high-value older context:

- decisions and constraints
- open tasks and requested work
- errors and failed attempts
- files, commands, and links
- open questions and durable facts

It also keeps a zlib-compressed payload and Merkle root for auditability, but the
LLM is given the extractive capsule, not opaque compressed bytes.

## Safety and limits

- **Lossy by design.** Older messages are not preserved verbatim in the model
  prompt. Exact wording, nuance, and low-priority details can be lost.
- **Recent context remains verbatim.** `keepRecentMessages` controls how many
  latest messages stay untouched.
- **Best-effort vault scan.** Text content is scanned for common secrets and PII
  before compression or model injection. This is useful defense-in-depth, not a
  formal guarantee.
- **No external runtime dependency.** The plugin uses only Node built-ins
  (`zlib` and `crypto`) and makes no network, file-system, or on-chain calls.

## Activation

```jsonc
// openclaw.json
{
  "plugins": {
    "slots": {
      "contextEngine": "context-capsule"
    }
  }
}
```

## Config options

| Key | Default | Description |
| --- | ---: | --- |
| `minMessages` | `20` | Sessions shorter than this pass through unchanged. |
| `keepRecentMessages` | `10` | Recent messages kept verbatim after compression. |
| `maxCapsuleTokens` | `1400` | Hard cap for the injected extractive capsule. |
| `capsuleTokenRatio` | `0.14` | If OpenClaw provides a model token budget, cap the capsule to this fraction of the budget. |
| `minCompressTokens` | `900` | Estimated transcript-token floor before compression activates. |

```jsonc
{
  "plugins": {
    "entries": {
      "context-capsule": {
        "minMessages": 20,
        "keepRecentMessages": 10,
        "maxCapsuleTokens": 1400,
        "capsuleTokenRatio": 0.14,
        "minCompressTokens": 900
      }
    }
  }
}
```

## Packaging

The npm/ClawHub package ships compiled `dist/` JavaScript. It does not require
TypeScript support from the host runtime.

```sh
npm run typecheck
npm test
npm pack --dry-run
```

## When to use

Use this for long-running local or hosted model sessions where resending the full
conversation is too expensive or pushes the model toward context overflow.

Do not use it for workflows where old transcript wording must remain exact. For
that, keep normal OpenClaw history or use a retrieval system that can quote the
original source.

_meta.json

{
  "ownerId": "kn7bp6ev0v1qec2qahhgdvzt3x81q4fv",
  "slug": "context-capsule",
  "version": "1.6.1",
  "publishedAt": 1783630058561
}

CHANGELOG.md

# Changelog

## 1.7.0

- **Value-atom preservation.** A lone distinctive value — a bare port (`5433`), an
  issue ref (`#4821`), a version (`v2.13.0`), an ISO date, or a hyphenated code
  (`NEEDLE-ZX-7742`) — is now emitted as its own dense atom, so it survives
  compression even when its surrounding sentence loses the budget race. Previously
  such a value only survived when its whole line was selected. New regression:
  `test/value-survival.test.mjs` (wired into `npm test`).
- **Docs accuracy.** Corrected the documented config defaults (`maxCapsuleTokens`
  `700` → `1400`, `capsuleTokenRatio` `0.08` → `0.14`) to match the shipped values.
  Reframed the fidelity figures to state plainly that they are measured on the
  maintainer's own private sessions via `test/fidelity-bench.mjs` (reproduce on your
  own `~/.openclaw` sessions), not a repo fixture. The supersession clean rate (83%
  floor) and value-survival remain CI-gated by `npm test`.

## 1.6.0

- Self-contained compression core bundled in `src/compression.ts` (no external
  runtime dependency; no network / file-system / on-chain calls).

skill-card.md

## Description:

Openclaw Context Capsule compresses older OpenClaw agent session history into a bounded, lane-change-aware context capsule while keeping recent messages verbatim, redacting credential-shaped secrets, and quarantining injected instructions.

This skill is ready for commercial/non-commercial use.

## Publisher:

[parad0x-labs](https://clawhub.ai/user/parad0x-labs)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and agent operators use this skill to reduce prompt tokens in long OpenClaw sessions while keeping recent turns and important older decisions, tasks, errors, paths, links, and durable facts available to the model.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Older session history is summarized rather than preserved verbatim, so exact wording, nuance, or low-priority details can be lost.

Mitigation: Use the skill for long-running sessions where bounded context is acceptable; keep original logs or retrieval sources available when exact transcript fidelity is required.

Risk: Credential-shaped secrets are redacted on a best-effort basis, but semantic personal or confidential details may still appear in retained context.

Mitigation: Do not treat the skill as the only privacy control for highly sensitive chats; limit sensitive inputs and apply host-level data handling controls.

## Reference(s):

- [Openclaw Context Capsule ClawHub listing](https://clawhub.ai/parad0x-labs/skills/context-capsule)
- [README](README.md)
- [Changelog](CHANGELOG.md)

## Skill Output:

**Output Type(s):** [text, JSON, configuration]

**Output Format:** [Model-readable text capsule with JSON-compatible capsule metadata and OpenClaw configuration examples]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Older history is lossy and bounded by maxCapsuleTokens and capsuleTokenRatio; recent messages are retained verbatim.]

## Skill Version(s):

1.6.1 (source: ClawHub release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
Github ReposUpdated 1d agoRank 70

AionUi

Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!

MCPOPENCLAW
Github ReposUpdated 6mo agoRank 70

activepieces

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

OPENCLAW
Github ReposUpdated 6mo agoRank 70

cherry-studio

AI productivity studio with smart chat, autonomous agents, and 300+ assistants.

MCPOPENCLAW
Github ReposUpdated 7mo agoRank 70

CopilotKit

The Frontend for Agents & Generative UI. React + Angular

OPENCLAW

Machine-readable data

The same record, as JSON, for agents and crawlers.

{
  "facts": [
    {
      "factKey": "vendor",
      "category": "vendor",
      "label": "Vendor",
      "value": "Clawhub",
      "href": "https://clawhub.ai/parad0x-labs/skills/context-capsule",
      "sourceUrl": "https://clawhub.ai/parad0x-labs/skills/context-capsule",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-10T22:05:18.779Z",
      "isPublic": true
    },
    {
      "factKey": "protocols",
      "category": "compatibility",
      "label": "Protocol compatibility",
      "value": "OpenClaw",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-parad0x-labs-context-capsule/contract",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-parad0x-labs-context-capsule/contract",
      "sourceType": "contract",
      "confidence": "medium",
      "observedAt": "2026-10-10T22:05:18.779Z",
      "isPublic": true
    },
    {
      "factKey": "traction",
      "category": "adoption",
      "label": "Adoption signal",
      "value": "1.2K downloads",
      "href": "https://clawhub.ai/parad0x-labs/context-capsule",
      "sourceUrl": "https://clawhub.ai/parad0x-labs/context-capsule",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-10T22:05:18.779Z",
      "isPublic": true
    },
    {
      "factKey": "latest_release",
      "category": "release",
      "label": "Latest release",
      "value": "1.6.1",
      "href": "https://clawhub.ai/parad0x-labs/context-capsule",
      "sourceUrl": "https://clawhub.ai/parad0x-labs/context-capsule",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-07-09T20:47:38.561Z",
      "isPublic": true
    },
    {
      "factKey": "handshake_status",
      "category": "security",
      "label": "Handshake status",
      "value": "UNKNOWN",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-parad0x-labs-context-capsule/trust",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-parad0x-labs-context-capsule/trust",
      "sourceType": "trust",
      "confidence": "medium",
      "observedAt": null,
      "isPublic": true
    }
  ],
  "events": [
    {
      "eventType": "release",
      "title": "Release 1.6.1",
      "description": "v1.7.0 - Value-atom preservation: a lone port (5433), issue ref (#4821), version (v2.13.0), ISO date, or hyphenated code now survives compression as its own atom — even when its surrounding line is dropped. New regression: test/value-survival.test.mjs. - Corrected the documented config defaults (maxCapsuleTokens 700 → 1400, capsuleTokenRatio 0.08 → 0.14) to match the shipped values. - Reframed the fidelity figures as measured on your own private sessions via test/fidelity-bench.mjs (reproduce on your data), not a repo fixture.",
      "href": "https://clawhub.ai/parad0x-labs/context-capsule",
      "sourceUrl": "https://clawhub.ai/parad0x-labs/context-capsule",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-07-09T20:47:38.561Z",
      "isPublic": true
    }
  ]
}

Record generated Oct 10, 2026.

Sponsored

Ads related to Openclaw Context Capsule and adjacent AI workflows.