Hayatelin/caveman-zh-CN / skills/caveman-compress
caveman-compress
Unverified把自然语言的记忆文件(CLAUDE.md、待办、偏好设置)压缩成 caveman 格式,省下 input token。 完整保留所有技术内容、代码、URL 与结构。 压缩版会覆写原文件,人类可读的备份存成 FILE.original.md。 Trigger: /caveman-compress FILEPATH or "compress memory file"
| File | Kind | Size |
|---|---|---|
| README.md | markdown | 5.4 KB |
| SECURITY.md | markdown | 1.5 KB |
| SKILL.md | skill md | 4.4 KB |
| scripts/__init__.py | script | 224 B |
| scripts/__main__.py | script | 30 B |
| scripts/benchmark.py | script | 2.4 KB |
| scripts/cli.py | script | 2.0 KB |
| scripts/compress.py | script | 12.8 KB |
| scripts/detect.py | script | 4.6 KB |
| scripts/validate.py | script | 5.6 KB |
SECURITY.md
View on GitHub# 安全性
## Snyk High Risk 评等
`caveman-compress` 因为静态分析的启发式规则而被 Snyk 评为 High Risk。本文说明这个 skill 做什么、不做什么。
### 什么触发了这个评等
1. **使用 subprocess**:当 `ANTHROPIC_API_KEY` 未设置时,skill 会通过 `subprocess.run()` 调用 `claude` CLI 作为备援。这个 subprocess 调用使用固定的参数数组——不会发生 shell 字符串插值。用户的文件内容是走 stdin 传入,不是当成 shell 参数。
2. **文件读写**:skill 读取用户明确指定的那个文件,压缩后写回同一个路径,并在旁边存一份 `.original.md` 备份。不会读写用户指定路径以外的任何文件。
### 这个 skill 不做的事
- 不把用户的文件内容当代码运行
- 除了 Anthropic 的 API(通过 SDK 或 CLI)之外,不发任何网络请求
- 不访问用户提供路径以外的文件
- subprocess 调用不使用 shell=True,也不做字符串插值
- 除了被压缩的文件之外,不搜集也不发送任何数据
### 认证行为
若 `ANTHROPIC_API_KEY` 有设置,skill 直接使用 Anthropic Python SDK(不开 subprocess)。若未设置,则退回 `claude` CLI,沿用用户现有的 Claude 桌面版认证。
### 文件大小限制
超过 500KB 的文件会在任何 API 调用之前就被拒绝。
### 反馈安全性漏洞
如果你认为找到了真正的安全性问题,请开一个 GitHub issue 并加上 `security` 标签。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |