跳到正文
TakoAPI
返回技能列表

compression

由 trinitybotserver 提供

AI & LLMs
—暂无评分
你的评分

简介

Pre-run prompt compression for iterative AI dev loops.

描述

该技能的功能

A local script that compresses prompt files before AI dev loops run, reducing input token counts on each iteration. It preserves code blocks, URLs, file paths, and variable names. Creates .bak backups for instant undo.

Runs entirely locally with no model calls, so token savings happen at zero API cost.

何时使用

  • Cutting token costs before running long agent loops
  • Batch-compressing skill directories before iterative dev sessions
  • Reverting prompt changes when compressed output loses clarity
  • Adding prompt optimization as a Makefile step in AI-heavy repos
  • Trimming prompt files before submitting to token-billed API providers

示例工作流

输入

User asks: compress all prompts in my agent directory before running the dev loop

智能体
  1. 1

    Installs trinity-compress.config.json with target paths and compression rules

  2. 2

    Copies scripts/trinity-compress.sh into the repo

  3. 3

    Runs bash scripts/trinity-compress.sh balanced

  4. 4

    Reports token reduction and lists .bak backups created

输出

Prompt files compressed with .bak backups saved; ready to run the agent loop with reduced token usage

安装

clawhub install trinitybotserver/compression

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接