← 返回
未分类

Prompt Compression

Compress prompts locally before iterative AI runs to reduce tokens, with backup, undo, and compatibility for Ralph-style loops and token-billed providers.
本地压缩提示词以降低 token 消耗,支持备份、撤销,兼容 Ralph 循环和按 token 计费的供应商。
trinitybotserver trinitybotserver 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 330
下载
💾 1
安装
1
版本
#latest

概述

Trinity Compress (Skill)

Pre-run prompt compression for iterative AI dev loops.

Goal: reduce input tokens every iteration by compressing prompt files before your loop runs.

  • Works with Ralph-style loops, agent/skill directories, and most token-billed providers.
  • Runs as a local script (no model calls).
  • Creates .bak backups and supports instant undo.

What it installs into a repo

  • trinity-compress.config.json — rules + targets
  • scripts/trinity-compress.sh — compression script
  • Makefile snippet (optional): optimize-prompts, optimize-undo, etc.
  • .gitignore snippet: ignore *.bak
  • Installers:
  • scripts/install.ps1 (Windows)
  • scripts/install.sh (bash)

Requirements

  • bash 4+
  • jq
  • bc

Use

1) Install into your repo (copy assets or use the included installer scripts)

2) Run:

  • bash scripts/trinity-compress.sh balanced
  • or via Makefile target

Undo

  • Restores all *.bak backups from the last run.

Notes

  • This tool does not rewrite code blocks, URLs, file paths, or variable names.
  • Aggressive mode may reduce clarity; review before committing.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-12 05:44 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,404 📥 324,132
ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 842 📥 320,765
ai-agent

Find Skills

guipi888
场景驱动+关键词双模式技能发现工具。当用户用自然语言描述场景/需求(如"我想做一个海报""帮我分析股票"),或明确说"安装技能/find skills/找个skill"时,自动从官方内置、本地已安装、SkillHub、虾评、GitHub、C
★ 1,487 📥 550,564