技能详情(站内镜像,无评论)
Package:compression
安装(复制给龙虾 AI)
将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。
请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「compression」。简介:Agent skill by @trinitybotserver on ClawHub.。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/trinitybotserver/compression/SKILL.md
(来源:yingzhi8.cn 技能库)
SKILL.md
# 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.