Token导航 LogoToken导航

Agent Skill · 开发

trunkate(trunkate 开发)

trunkate 用于补充开发相关能力,适合在 OpenClaw 中需要让 Agent 承接开发相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

trunkate 是开发类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为接触敏感数据;许可证为 MIT-0,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 5,368。

总安装 6,439周安装 271GitHub Stars 公开资料未说明下载 2,255核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
0.31.0

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:trunkate(trunkate 开发)
来源仓库:https://github.com/engineering-trunkate-ai/trunkate
安装命令:
openclaw skills install trunkate
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install trunkate

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

通过 Trunkate AI API 从语义上优化上下文历史记录和大文本块。包括用于自动令牌管理的主动上下文修剪挂钩。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install trunkate;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

trunkate 怎么安装?

在终端执行 openclaw skills install trunkate。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

trunkate 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

trunkate 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

trunkate 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

trunkate 用的人多吗?

公开数据是累计安装 6,439 次,近一周安装 271 次,下载 2,255 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

trunkate 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
trunkate

trunkate 开发 · 本页

6,439—接触敏感数据MIT-0通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
trunkate-ai
description
>
version
0.29.0
author
Trunkate
homepage
https://trunkate.ai
repository
https://github.com/Trunkate-AI/trunkate-ai-skills
bugs
https://github.com/Trunkate-AI/trunkate-ai-skills/issues
bins
["python3"]
os
["linux", "darwin"]
scripts
true
requires
bins
["python3"]
env
["TRUNKATE_API_KEY", "OPENCLAW_HISTORY_PATH", "OPENCLAW_CURRENT_TOKENS", "OPENCLAW_TOKEN_LIMIT"]
optional_env
["OPENCLAW_LAST_ERROR_MESSAGE", "TRUNKATE_THRESHOLD", "TRUNKATE_AUTO_BUDGET", "TRUNKATE_API_URL", "TRUNKATE_DEBUG"]
install
kind
shell
command
pip install -r requirements.txt
bins
["python3"]
label
Install Python dependencies

Trunkate AI Skill

Semantic context optimization and automated history pruning. Trunkate AI ensures high-density reasoning by semantically compressing text via the private Trunkate API, preserving core logic and project facts while stripping redundant boilerplate, repetitive logs, and low-signal conversation turns.

Quick Reference

SituationAction
Systematic PrecisionPreRequest hook triggers scripts/activator.py on every call
Massive file/log ingestionRun: trunkate --text "$(cat log.txt)" --budget "20%"
Context overflow errorSystem triggers scripts/error-detector.py for emergency wipe
High token costs / LatencyProactive "Smart Buffer" maintains constant context density
Critical facts preservationWrap blocks in [KEEP] ... [/KEEP] tags for 100% fidelity
Private/sensitive dataWrap in [PRIVATE] ... [/PRIVATE] tags — never sent to API
Review performance ROICheck references/examples.md for semantic fidelity metrics
Multi-agent context handoffCondense context before spawning sub-agents via sessions_spawn
Focus pivotingUse manual prune with --task to reset reasoning attention

OpenClaw Setup (Recommended)

OpenClaw is the primary platform for this skill. It uses workspace-based prompt injection with automated lifecycle hooks for background memory management.

Installation

Via ClawdHub (recommended):

clawdhub install trunkate-ai

Manual:

git clone https://github.com/Trunkate-AI/trunkate-ai-skills.git ~/.openclaw/skills/trunkate-ai

Skill Structure

Trunkate AI follows a standardized event-driven architecture to ensure high reliability and low latency:

trunkate-ai/
├── assets/                     # Project initialization templates
│   └── TRUNKATE_RULES.md       # User rules for "Never-Prune" blocks
├── hooks/                      # Active lifecycle hooks
│   └── openclaw/
│       ├── HOOK.md             # Technical documentation for hooks
│       └── pre_request.py      # THE HOOK: Intercepts outgoing LLM calls
├── references/                 # Technical standards and guides
│   ├── examples.md             # API usage examples (Before/After)
│   ├── hooks-setup.md          # Integration guide for Python hooks
│   └── openclaw-integration.md # Mapping of OpenClaw variables
├── scripts/                    # Core executable logic
│   ├── activator.py            # Main entry point (Proactive Systematic Hook)
│   ├── error_detector.py       # Reactive hook for context failures
│   └── trunkate.py             # Core API client (Python Native)
├── SKILL.md                    # This file
├── requirements.txt            # Dependencies (requests)
└── version.txt                 # Version tracking

Initialize Optimization Rules

To protect specific files or data blocks from being sent to the API, customize the local rules template:

cp assets/TRUNKATE_RULES.md assets/MY_PROJECT_RULES.md

Optimization Strategy

Trunkate AI applies a semantic preservation hierarchy to ensure you never lose critical project requirements during compression.

Preservation Hierarchy (Protected Context)

Content TypePreservation PriorityStrategy
Atomic BlocksCritical100% Verbatim; wrap in [KEEP] ... [/KEEP] tags
Private DataCritical100% Verbatim; wrap in [PRIVATE] ... [/PRIVATE] tags. Content never leaves the client — replaced with __PRIVATE_N__ placeholders before API transmission.
System InstructionsCritical100% Verbatim for <system> tags; stripped locally before transmission
Active Task/GoalHighFull fidelity retention of current user intent
Project FactsHighCore conventions and facts (e.g. from CLAUDE.md)
Recent TurnsHighVerbatim retention of the last 3-5 conversation turns
Logic BlocksMediumSemantic compression via Trunkate API
Large Logs/DumpsLowSummary transformation (extracting error patterns)
BoilerplateNoneAggressive pruning of license headers and noise

Hook Integration

Trunkate AI is designed for automated background operation via triggers. Configure these in your OpenClaw settings to explicitly enable memory management as a background utility. Note that enabling the PreRequest hook will automatically transmit your OpenClaw session history to api.trunkate.ai.

Proactive Trigger (PreRequest)

Configure this in .openclaw/config.json to prune history BEFORE every LLM call. This is the primary method for maintaining "Always-On" context efficiency.

Hook Config:

{
  "hooks": {
    "PreRequest": [
      {
        "type": "command",
        "command": "python3 hooks/openclaw/pre_request.py"
      }
    ]
  }
}

Error Detector (OnError)

Triggers on context failures (e.g., 429 or 400 errors from the model) to perform emergency history wipes.

Error Config:

{
  "hooks": {
    "OnError": [
      {
        "type": "command",
        "command": "python3 scripts/error_detector.py"
      }
    ]
  }
}

Logging & ROI Tracking

When manual or proactive pruning occurs, a summary of the action should be logged to ensure traceability.

Optimization Log Entry

Append significant optimizations to a local tracking file for review:

[TRK-YYYYMMDD-XXX] Category (e.g., proactive_prune | manual_summarization)

Logged: ISO-8601 timestamp Original Size: Token count before optimization Optimized Size: Token count after optimization ROI: Percentage reduction (e.g., 85%) Trigger: Proactive threshold | Context Error | Manual Call

Summary

One-line description of the optimized content (e.g., "Pruned 15 turns of build logs")

Preserved State

List of critical facts or logic blocks that were protected via [KEEP], [PRIVATE], or Rules.

suggested_budget_update

If reasoning quality dropped, suggest increasing TRUNKATE_AUTO_BUDGET.


Detection Triggers

Automatically trigger trunkate or advise the user to adjust the TRUNKATE_THRESHOLD when you notice these signals.

Cognitive Load (Internal Signals)

  • "I am repeating previous mistakes despite direct user corrections..."
  • "I've forgotten primary project facts (e.g., which package manager to use)..."
  • "The conversation history is 90% repetitive logs or stack traces..."
  • "I'm having trouble focusing on the core logic due to context noise..."
  • "I am hallucinating file paths or variable names that do not exist..."

Massive Ingestion (External Signals)

  • Reading a 10,000-line stack trace from a build failure.
  • Analyzing a full npm install or pip install output.
  • Parsing a large database schema or raw SQL dump.
  • Processing raw data exports or multi-megabyte JSON payloads.

Environment Variables

VariableRequirementPurpose
TRUNKATE_API_KEYREQUIREDAuthentication for api.trunkate.ai.
TRUNKATE_THRESHOLDOptionalContext usage % before trigger (e.g. 0.8 for 80%).
TRUNKATE_AUTO_BUDGETOptionalTarget for optimized history (e.g., 2000 or "20%").
TRUNKATE_API_URLOptionalOverride default for local testing or dev environments.
TRUNKATE_DEBUGOptionalEnable verbose logging of hook execution to console.

Best Practices

  1. Background Operation: Truncation runs as an infrastructure task. Transparency is maintained via log files.
  2. Contextual Tasking: When calling manually, use --task to guide the semantic summarizer (e.g. "Focus on the auth handler logic").
  3. Protect Critical Files: Update TRUNKATE_RULES.md whenever you add a new foundational file or secret environment variables.
  4. Log Immediately: If a large tool output is generated, trunkate it before it gets buried and degrades the next reasoning step.
  5. Recursive Handling: If a block remains too large, truncate sub-modules individually before a final consolidation.
  6. Task Pivoting: Use trunkate with a new task description to clear your "mental workspace" when shifting from backend to frontend.

Integration with Multi-Agent Workflows

When spawning sub-agents (e.g., via OpenClaw sessions_spawn), use Trunkate to optimize the hand-off context:

  1. Run trunkate on the primary context with a task specific to the sub-agent's goal.
  2. Pass the high-density optimized context as the initial prompt to the sub-agent.
  3. This ensures the sub-agent has the maximum possible token space for its specialized task.

Periodic Review

Review the performance metrics and technical standards at natural breakpoints:

  • Before major tasks: Check if history is too stale or noisy via references/examples.md.
  • After feature completion: Evaluate the token efficiency ROI in your logs.
  • Weekly: Tune the TRUNKATE_THRESHOLD based on your model's recent reasoning performance.

Safety Boundaries & Permissions

To comply with OpenClaw automated health/safety grades:

  • Safety Boundaries: When performing shell execution (exec) to run local Python scripts (such as activator.py or .openclaw hooks), the skill is strictly restricted to semantic compression and logging. The hook execution environment is whitelisted (minimized) to only pass necessary TRUNKATE_* and OPENCLAW_* variables, preventing unauthorized access to other workspace secrets. It contains safety boundaries to ensure it does not execute unknown payloads, access external network resources (other than api.trunkate.ai for optimization), or execute arbitrary code. Privacy: Content wrapped in [PRIVATE]…[/PRIVATE] tags is automatically extracted locally and replaced with __PRIVATE_N__ placeholders before any API call — the original private data never leaves your machine. Additionally, [KEEP] blocks, <system> tags, .env markdown blocks, and regex-detected secrets are also stripped locally. Note that the regex-based auto-detection may not catch all generalized secrets; use explicit [PRIVATE] tags for guaranteed protection.
  • Permissions: This skill does not require "Human-in-the-loop" approval because it does not perform destructive actions (like deleting tickets or pushing code). It operates purely on localized context and data streams.

*Trunkate AI: Ensuring your context window is always secure, lean, dense, and effective.*

平台分布

OpenClaw

96.13%
按下载量换算2,168

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills