caveman-compress
壓縮記憶檔案以降低 Token 費用
大型記憶檔案(如 CLAUDE.md)會在每個 AI 工作階段開始時浪費 Token。這個技能可將其壓縮約 46%,同時保留所有技術內容完整。
스킬 ZIP 다운로드
Claude에서 업로드
설정 → 기능 → 스킬 → 스킬 업로드로 이동
토글을 켜고 사용 시작
테스트해 보기
"caveman-compress" 사용 중입니다. 一個包含 TypeScript 偏好設定、測試指南和專案慣例的 706 Token CLAUDE.md 檔案,以完整文章形式撰寫。
예상 결과:
一個保留為 285 Token 的壓縮版本,以直接的猿人風格文章保留所有技術指示。標題、程式碼範例和 URL 保持不變。原始檔案已儲存為 CLAUDE.original.md。
"caveman-compress" 사용 중입니다. 一個包含架構描述、部署步驟和團隊慣例的 1145 Token 專案筆記檔案。
예상 결과:
一個 535 Token 的壓縮檔案。所有章節標題完全保留。程式碼區塊和 URL 完好。冗長的說明被精簡為要點事實。備份已儲存為 project-notes.original.md。
보안 감사
낮은 위험Static analysis flagged 107 potential issues across 10 files with a risk score of 100/100. After semantic evaluation, all flagged patterns are false positives. The external_commands findings (74 locations) are primarily markdown backticks in documentation files misidentified as shell execution. The one real subprocess call in scripts/compress.py uses hardcoded arguments with stdin input and no shell interpolation. Network findings (2 locations) are static URLs in README.md documentation, not runtime requests. Filesystem findings (2 locations) are standard path resolution for a file-processing tool. Environment access findings (9 locations) are legitimate ANTHROPIC_API_KEY and CAVEMAN_MODEL configuration for API usage. The critical heuristic finding about code execution plus network plus credential access is a false positive describing the normal operation of an Anthropic API client. No prompt injection attempts, data exfiltration patterns, or malicious intent detected. The tool has appropriate safeguards including file size limits (500KB), automatic backups, and retry logic with rollback on failure.
낮은 위험 문제 (3)
위험 요인
⚙️ 외부 명령어 (1)
🔑 환경 변수 (1)
품질 점수
만들 수 있는 것
減少持續的工作階段費用
將您的 CLAUDE.md 專案記憶檔案壓縮一次。較小的檔案會在每個工作階段開始時載入,為您每次使用 AI 時節省 Token。
優化團隊文件
壓縮共享的偏好檔案、樣式指南和專案慣例。團隊成員可以獲得相同的指示,但每個工作階段的輸入 Token 較少。
精簡長期專案筆記
將累積的待辦事項、會議紀錄和決策日誌壓縮為要點事實。保留所有資訊,但去除冗長的開銷。
이 프롬프트를 사용해 보세요
Compress the file at CLAUDE.md into caveman format.
Compress these memory files: CLAUDE.md, todos.md, and preferences.txt.
I updated CLAUDE.original.md with new coding standards. Compress it again to replace CLAUDE.md.
Set CAVEMAN_MODEL to claude-haiku and compress CLAUDE.md.
모범 사례
- 編輯 .original.md 備份檔案,然後重新壓縮。這能讓您的真相來源保持人類可讀的格式。
- 在主要更新記憶檔案後執行壓縮。新編輯的內容通常會加入較多冗長的說明,這些內容很適合壓縮。
- 在依賴壓縮輸出之前先審查。驗證會檢查技術內容,但風格變更可能會影響細微差別。
피하기
- 不要壓縮程式碼檔案、設定檔或任何主要為程式碼內容的檔案。工具會自動跳過這些檔案。
- 不要刪除 .original.md 備份。它是人類可讀的來源和復原點。
- 不要對未更改的檔案重複執行壓縮。每次執行都會消耗 API Token。只在有意義的編輯後才進行壓縮。