← Back to Skills Marketplace
Trunkate AI
by
trunkate-ai
· GitHub ↗
· v0.31.0
· MIT-0
219
Downloads
0
Stars
0
Active Installs
9
Versions
Install in OpenClaw
/install trunkate
Description
Semantically optimizes context history and large text blocks via the Trunkate AI API. Includes proactive context pruning hooks for automated token management.
Usage Guidance
This skill will read your OpenClaw session history file and send a filtered version to Trunkate's API (https://api.trunkate.ai) using the TRUNKATE_API_KEY you provide. That behavior is exactly what the skill claims to do, but it means potentially sensitive conversation content will leave your machine unless it is reliably redacted. The authors include a local redaction step and mechanisms for marking blocks as private ([PRIVATE] or [KEEP]), but redaction is based on regex heuristics (which can have false negatives and false positives). Before installing: 1) Confirm you trust trunkate.ai and are comfortable sending session history to an external service. 2) Avoid placing highly sensitive secrets in history, or explicitly mark them with [PRIVATE] / [KEEP]. 3) Review and test the redaction logic on representative histories to see whether it removes the kinds of secrets you care about. 4) If you do not want automatic transmissions before every LLM call, do not enable the PreRequest hook (or raise TRUNKATE_THRESHOLD). 5) Protect your TRUNKATE_API_KEY like any other secret and monitor API key usage for unexpected calls.
Capability Analysis
Type: OpenClaw Skill
Name: trunkate
Version: 0.31.0
The Trunkate AI skill provides semantic context optimization by sending session history to an external API (api.trunkate.ai) for pruning. While it transmits data externally, it is transparent about this behavior and includes robust local privacy protections in `scripts/activator.py`, which uses regex to redact secrets, system instructions, and user-defined `[PRIVATE]` blocks before transmission. The implementation follows security best practices, such as whitelisting environment variables in `hooks/openclaw/pre_request.py` to prevent accidental exfiltration of unrelated workspace credentials.
Capability Assessment
Purpose & Capability
The name/description (semantic context optimization) aligns with the code and instructions. Required binaries (python3) and env vars (TRUNKATE_API_KEY, OPENCLAW_HISTORY_PATH, OPENCLAW_CURRENT_TOKENS, OPENCLAW_TOKEN_LIMIT) are appropriate for the stated purpose.
Instruction Scope
The SKILL.md and hook scripts explicitly instruct the agent to read the OpenClaw session history file and (when threshold is met) POST a filtered copy to api.trunkate.ai/optimize, then emit OPENCLAW_ACTION:SET_HISTORY. This is within scope for a pruning/optimization tool but means full session text (minus locally-removed sections) is regularly transmitted to a third party.
Install Mechanism
No high-risk installer or remote arbitrary-download is used: the project is Python scripts and a requirements.txt (requests). SKILL.md documents a pip install step; there is no opaque external binary download. The runtime footprint is limited to Python and requests.
Credentials
Requested environment variables map to the skill's operation and are proportional. TRUNKATE_API_KEY is required and will be sent as a Bearer token to the external API (expected for a hosted service). Users should note that other secrets are not forwarded by the hook (pre_request.py whitelists only TRUNKATE_* and OPENCLAW_* and PATH), but the local redaction is heuristic and may miss sensitive items.
Persistence & Privilege
The skill does not request always:true and will not auto-enable itself globally. It runs as OpenClaw hooks when registered — standard for this class of skill and not an elevated platform privilege.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install trunkate - After installation, invoke the skill by name or use
/trunkate - Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.31.0
**Version 0.31.0**
- Added support for `[PRIVATE] ... [/PRIVATE]` tags, preventing marked content from being sent to the API.
- Updated skill documentation (SKILL.md) to clarify new private data protection and placeholder handling.
- Refined the context preservation hierarchy to include explicit handling of private/sensitive information.
- Added unit tests for private data detection and handling (`tests/test_activator_private.py`).
- General improvements to clarity, structure, and quick reference examples in the documentation.
v0.30.0
Version 0.30.0 (trunkate)
- Bumped version to 0.30.0.
- Updated documentation files (CHANGELOG.md, SKILL.md) and version tracking.
- No code or functional changes included in this release.
v0.28.0
trunkate v0.28.0
- Updated skill manifest (SKILL.md): increased version to 1.5.0, migrated and streamlined environment variable listing and requirements structure.
- Added TRUNKATE_THRESHOLD to supported optional environment variables.
- Synchronized version numbers in SKILL.md and version.txt.
- Documentation clarifications and environment variable details improved for easier integration.
v0.27.0
trunkate v0.27.0
- Updated SKILL.md to version 1.4.0 with improved metadata and documentation.
- Refined required and optional environment variables sections.
- Added `scripts: true` to skill metadata.
- No changes to core logic or APIs.
v0.26.0
**Summary:**
This release adds public repository, homepage, and bug tracker links to skill metadata and updates the version.
- Updated skill version to 1.2.0.
- Added `homepage`, `repository`, and `bugs` fields to SKILL.md metadata.
- No changes to core behavior or API.
- General maintenance and improved discoverability.
v0.25.0
- Added support for marking certain environment variables as optional; only TRUNKATE_API_KEY is now required.
- Updated metadata in SKILL.md to distinguish between required and optional environment variables.
- No changes to pruning logic or functional algorithms.
- Minor documentation updates for installation and configuration clarity.
v0.24.0
trunkate 0.24.0
- Expanded environment variable requirements in metadata, now including OpenClaw-related variables (e.g., OPENCLAW_HISTORY_PATH, OPENCLAW_CURRENT_TOKENS).
- Updated documentation to clarify that system instructions are stripped locally before transmission.
- No changes to core usage, but improved OpenClaw integration and compatibility details.
- Internal metadata and environment management improvements ensure better automation and hook performance.
v0.23.0
trunkate v0.23.0
- Documentation refined: PreRequest hooks are now described as providing "automated context management" instead of "automated, silent context management."
- Updated the description of PreRequest hook usage and clarified session history privacy implications for increased transparency.
- SKILL.md: Language changes for clarity and accuracy regarding background operation and memory management.
- No code changes; updates are documentation and clarity-focused only.
v0.22.0
trunkate-ai 1.0.0 introduces advanced semantic context optimization with proactive automated management.
- Adds semantic compression for large text blocks and conversation history via the Trunkate AI API.
- Integrates PreRequest and OnError hooks for invisible, automated context pruning on every call or error.
- Enables preservation of critical facts and data blocks using simple markup tags ([KEEP]...[/KEEP]) and customizable rules.
- Provides detailed setup, integration, and logging instructions for OpenClaw platforms.
- Supports environment variables for flexible configuration and debugging.
Metadata
Frequently Asked Questions
What is Trunkate AI?
Semantically optimizes context history and large text blocks via the Trunkate AI API. Includes proactive context pruning hooks for automated token management. It is an AI Agent Skill for Claude Code / OpenClaw, with 219 downloads so far.
How do I install Trunkate AI?
Run "/install trunkate" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Trunkate AI free?
Yes, Trunkate AI is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Trunkate AI support?
Trunkate AI is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Trunkate AI?
It is built and maintained by trunkate-ai (@engineering-trunkate-ai); the current version is v0.31.0.
More Skills