← 返回
未分类

Prompt Compression

Compress prompt files locally before iterative AI loops to reduce input tokens, with backup and undo support, for Ralph-style loops and token-billed providers.
本地压缩提示文件,降低迭代 AI 循环的输入 token,支持备份和撤销,适用于 Ralph 风格循环和按 token 计费的供应商。
trinitybotserver
未分类 clawhub v1.0.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 167
下载
💾 0
安装
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.1 当前
    2026-05-12 06:16 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,215 📥 266,539
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 712 📥 243,832
ai-intelligence

Self-Improving + Proactive Agent

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