← 返回 Skills 市场
Trunkate AI
作者
trunkate-ai
· GitHub ↗
· v0.31.0
· MIT-0
219
总下载
0
收藏
0
当前安装
9
版本数
在 OpenClaw 中安装
/install trunkate
功能描述
Semantically optimizes context history and large text blocks via the Trunkate AI API. Includes proactive context pruning hooks for automated token management.
安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install trunkate - 安装完成后,直接呼叫该 Skill 的名称或使用
/trunkate触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
常见问题
Trunkate AI 是什么?
Semantically optimizes context history and large text blocks via the Trunkate AI API. Includes proactive context pruning hooks for automated token management. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 219 次。
如何安装 Trunkate AI?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install trunkate」即可一键安装,无需额外配置。
Trunkate AI 是免费的吗?
是的,Trunkate AI 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Trunkate AI 支持哪些平台?
Trunkate AI 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Trunkate AI?
由 trunkate-ai(@engineering-trunkate-ai)开发并维护,当前版本 v0.31.0。
推荐 Skills