juliusbrussee/caveman

caveman-compressjuliusbrussee/caveman / skills/caveman-compress/SKILL.md

先检查发送范围和原文件备份,再压缩记忆文档

  • SKILL.md 已保存
  • 中文用法已整理
  • 安装与运行未实测
先判断是否解决你的问题

caveman-compress 是什么?

caveman-compress 将 Markdown 等自然语言文件压缩为简短表达,保留标题层级、代码、URL、路径和技术内容。压缩会把文件全文发送给 SKILL 配置的 Claude CLI、Anthropic API 或 OpenAI 兼容模型提供方,并覆盖原文件;可读备份写到源目录以外的数据目录。

中文说明由本站依据来源整理;英文原文保留在页面下方。

适合用在

  • 明确指定一个允许发送给当前模型提供方的自然语言文件,希望压缩上下文说明或待办。
  • 可以接受压缩结果替换原文件,并已确认源文规定的备份目录和恢复方式。

这些情况不适合

  • 含不能发送给当前提供方的私密或敏感内容,或无法确认凭证扫描与数据去向的文件。
  • 程序、配置、锁文件、数据结构文件,或需要原文逐字不变的内容。
  • 只粘贴文本但未指定文件路径;源文明确要求先给路径或先提出保存到文件的选择。

同名项目,请核对仓库和目录

按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

    打开本项目来源,核对 SKILL.md 及其引用的脚本和资料。

  2. 交给你正在用的 Agent

    在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。

  3. 确认识别,再做具体任务

    让 Agent 回报安装目录和识别到的名称 caveman-compress,然后按本页使用示例提供材料。

展开并复制给 Codex 的安装指令
发送给 Codex

安装并检查 caveman-compress

请在 Codex 的当前工作环境中安装并检查 caveman-compress 这个 Skill。

项目身份:juliusbrussee/caveman / caveman-compress
来源:https://github.com/juliusbrussee/caveman/blob/9b243662ff98d392bc0a95b865a554583d71be75/skills/caveman-compress/SKILL.md
已定位的源文件:skills/caveman-compress/SKILL.md

1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。
准备输入,再按步骤执行

装好以后,具体怎么用?

准备哪些材料

  • 提供明确绝对文件路径;确认该文件不是 .env、凭证文件等受禁名称,且内容不含私钥或云、Git、模型 API token。
  • 确认已安装 Skill 包所需 Python 环境和文件处理依赖,并能从 SKILL.md 所在目录运行 python3 -m scripts <absolute_filepath>。
  • 确认目标模型提供方可以接收文件全文;根据仓库配置核实 CLI/API 及模型端点,不从本指南推断账户、费用或保留政策。

会得到什么

  • 被覆盖的压缩版自然语言文件,以及系统数据目录中的 <filename>.original.md 可读原稿备份;另需记录实际接收方和验证结果。

实际使用顺序

  1. 先逐项核对目标路径、扩展名、敏感数据和模型接收方;若提供方不应看到内容,就停止压缩。
  2. 读取同目录 scripts/ 实际内容,再从 SKILL.md 目录执行源文给出的 python3 -m scripts <absolute_filepath>;不要替换成未经源文确认的命令或路径。
  3. 处理前确认当前原文件已备份或理解恢复方式;来源描述压缩会覆盖原文件,并把 <filename>.original.md 放在系统数据目录,不与 Skill 自动加载文件并排。
  4. 查看工具对文件类型的无 token 检查、模型压缩、输出验证和最多两轮定向修正;失败耗尽重试时应保持原文件未改并报告错误。
  5. 对照压缩前后版本,检查所有 Markdown 标题、嵌套列表、代码块、行内代码、链接、路径、命令、数字和技术术语是否完整;确认备份文件实际存在后再交付。
使用示例

从一个具体任务开始

本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。

安装并识别 Skill 后发送

复制一个具体任务

教学示例:请使用 caveman-compress 压缩绝对路径 `/work/demo/CLAUDE.md`。这是虚构路径,先停止实际执行;仅根据该 Skill 说明列出正式运行前要检查的文件名、内容敏感项、配置模型提供方、备份目录和恢复条件。不要读取、上传、修改任何本机文件。
预期结果

预期只得到运行前检查清单,并指出本例未运行、路径是虚构的;不会声称已备份或压缩文件。

使用前先看这些限制

使用条件与边界

  • 这是明确的数据外发边界:完整文件文本发给 scripts/compress.py 配置的模型提供方;不要压缩提供方不应看到的文件。
  • 来源列出敏感文件名与私钥、云/Git/模型 API 凭证文本拒绝逻辑;不能仅凭文件扩展名安全就推断正文可分享。
  • 压缩会覆盖原文件;备份位于 $XDG_DATA_HOME/caveman-compress/backups/ 或 Windows %LOCALAPPDATA%\caveman-compress\backups\,不在源文件旁边。运行前必须核对实际目录与备份。
  • 来源仅允许 .md、.txt、.typ、.typst、.tex 和无扩展名自然语言文件;明确排除 .py、.js、.ts、.json、.yaml、.yml、.toml、.env、.lock、.css、.html、.xml、.sql、.sh。
针对这个 Skill 的疑问

常见问题

压缩文件内容会留在本机吗?

源文明确文件全文会发送给脚本配置的模型提供方;仓库 README 还说明压缩 Skill 与其他功能的数据路径不同。应先按实际配置确认接收方,不能把“Skill 在本机运行”理解成文件绝不外发。

原文件会被覆盖吗?

会。源码说明输出覆盖原文件,另在系统数据目录保存 .original.md 备份;执行前应确认备份位置可访问,并在完成后检查备份确实存在。

我直接粘贴文本可以压缩吗?

该版本要求显式文件路径。收到裸文本时应先询问路径,或提出先保存为文件;不能把 Agent 的解释文字混进压缩结果。

如果处理报错,原文还在吗?

源文规定验证失败可做最多两次定向修正;仍失败时报告错误并保持原文件不变。实际是否如此须根据当前脚本执行结果核实。

需要核对时再展开原文

来源原文与资料状态

源文件
已保存 SKILL.md,抓取于 2026-11-17T10:53:18.264Z
中文使用说明
已针对下方源文件版本整理用途、用法和常见问题
安装与任务测试
本站未执行安装或任务测试
来源复核
本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料

skills/caveman-compress/SKILL.md · 抓取时间 2026-11-17T10:53:18.264Z

以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。

抓取成功不代表已完成安装或任务测试。

来源 description(原文)

Compress a memory file such as CLAUDE.md or a todo list into caveman format to save input tokens, keeping a readable backup. Sends the file's text to the configured model provider. Trigger: /caveman-compress.

查看源文件章节 / Source sections
  • 原文:Caveman Compress
  • 原文:Purpose
  • 原文:Trigger
  • 原文:Process
  • 原文:Compression Rules
  • 原文:Remove
  • 原文:Preserve EXACTLY (never modify)
  • 原文:Preserve Structure
  • 原文:Compress
  • 原文:Pattern
  • 原文:Boundaries
原文:Purpose

> **Data leaves the machine.** Compression sends the file's full text to the model provider that `scripts/compress.py` is configured for: the `claude` CLI, the Anthropic API, or an OpenAI-compatible endpoint. Files whose names look like secrets (`.env`, `credentials`, `secrets`, `.netrc`, …) are refused before they are read, and a file whose text holds a credential (a private key block, or a cloud, Git host or model API token) is refused before anything is sent. Don't compress a file the provider shouldn't see. Compress natural language files (CLAUDE.md, todos, preferences) into caveman-speak to reduce input tokens. Compressed version overwrites original. Human-readable backup saved as `<filename>.original.md`, but NOT beside the source file — it lives in an out-of-tree data dir (`$XDG_DATA_HOME/caveman-compress/backups/<parent-dir-name>/`, or `%LOCALAPPDATA%\caveman-compress\backups\<parent-dir-name>\` on Windows) so skill auto-loaders don't re-ingest it as a live file.

原文:Trigger

`/caveman-compress <filepath>` or when user asks to compress a memory file. **Requires an explicit filepath.** If the user pastes raw text instead of naming a file, do NOT improvise an inline compression — ask them for the filepath to compress, or offer to save the pasted text to a file first. Writing your own reasoning/commentary about the request into the compressed output (e.g. "User passed text directly, not a filepath...") is the exact failure this guards against — never let that leak into a saved file.

原文:Process

1. The compression scripts live in `scripts/` (adjacent to this SKILL.md). If the path is not immediately available, search for `scripts/__main__.py` next to this SKILL.md. 2. From the directory containing this SKILL.md, run: python3 -m scripts <absolute_filepath> 3. The CLI will: - detect file type (no tokens) - call Claude to compress - validate output (no tokens) - if errors: cherry-pick fix with Claude (targeted fixes only, no recompression) - retry up to 2 times - if still failing after 2 retries: report error to user, leave original file untouched 4. Return result to user

原文:Remove

- Articles: a, an, the - Filler: just, really, basically, actually, simply, essentially, generally - Pleasantries: "sure", "certainly", "of course", "happy to", "I'd recommend" - Hedging: "it might be worth", "you could consider", "it would be good to" - Redundant phrasing: "in order to" → "to", "make sure to" → "ensure", "the reason is because" → "because" - Connective fluff: "however", "furthermore", "additionally", "in addition"

原文:Preserve EXACTLY (never modify)

- Code blocks (fenced ``` and indented) - Inline code (`backtick content`) - URLs and links (full URLs, markdown links) - File paths (`/src/components/...`, `./config.yaml`) - Commands (`npm install`, `git commit`, `docker build`) - Technical terms (library names, API names, protocols, algorithms) - Proper nouns (project names, people, companies) - Dates, version numbers, numeric values - Environment variables (`$HOME`, `NODE_ENV`)

原文:Preserve Structure

- All markdown headings (keep exact heading text, compress body below) - Bullet point hierarchy (keep nesting level) - Numbered lists (keep numbering) - Tables (compress cell text, keep structure) - Frontmatter/YAML headers in markdown files

文件 SHA256:788d6fd86a35007845fd709fbcb788c7eda3c7dc51e63c67e276b0964d77faec

仓库许可证记录:未提供;not-established,查看来源。

Skills.sh收录简介 · 2026-07-28

Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to save input tokens. Preserves all technical substance, code, URLs,…

查看历史简介来源

这份历史简介在采集时已截断;完整用途和触发条件需打开来源核对。

历史收录数据

Skill标识caveman-compress
来源仓库juliusbrussee/caveman
榜单快照2026-07-28
榜单口径Skills.sh累计安装量
快照名次85
快照累计安装量265753

历史资料说明

  • 所保留的来源简介在采集时已截断;完整触发条件、依赖及排除项须阅读源文件,本站不补写缺失部分。
  • 安装量用于说明当时的收录次序,不是效果、可信度或当前可用性的证明。

此页用于识别项目与来源。安装入口可在该Skill的Skills.sh页面查看;当前目录是否仍存在、附带脚本和账户依赖尚需按具体版本确认。

返回 Skills 目录,按任务继续筛选 · MCP与Skills教程与资源