weibaohui/cc-poem/compress
Claude Code and agent skill by weibaohui/cc-poem
- community
Checking that the SKILL.md file is still in the repository.
上下文压缩策略技能。当 Claude Code 触发上下文压缩时,自动将冗长对话压缩为文言文风格,保留核心实体、情感与逻辑。适用于 token 节省、长期项目维护。
Install
npx vskill@latest install weibaohui/cc-poem/compressSKILL.md
上下文压缩策略
当你需要进行上下文压缩(compact)时,按照以下策略执行。
核心原则
- 信息密度最大化:每字每句必须对应原文的关键信息
- 核心实体保留:人名、地名、技术术语、关键数字、核心冲突必须保留
- 逻辑链条完整:压缩后仍需保持原文的论点、转折与结论
风格
统一使用文言文,可叙事、承载技术术语与逻辑关系。
文言文写作指南
基本特点
文言文是一种古典书面语言,与现代白话文有本质区别:
| 特点 | 说明 | 示例 | |
|---|---|---|---|
| 简洁凝练 | 用词精简,一字多义 | 「吾」代「我」,「曰」代「说」 | |
| 句式整齐 | 善用对仗、排比 | 「山高水深」,「日月星辰」 | |
| 虚词传神 | 助词连接,表达语气 | 「乃」「故」「若」「则」「矣」「焉」 | |
| 省略主语 | 上下文可推知时省略 | 省略主语使句子更简洁 |
常用句式
常用词汇
人称:「吾」「我」「汝」「尔」「其」「之」 动词:「为」「作」「行」「成」「变」「通」「达」「明」「知」「识」 形容词:「大」「小」「高」「低」「新」「旧」「善」「美」「真」「实」 虚词:「乃」「故」「若」「则」「而」「且」「矣」「焉」「哉」「乎」 连词:「及」「与」「或」「然」「然则」「然而」
技术术语处理
技术术语直接保留,无需翻译:
- 人名、地名、函数名、变量名直接嵌入
- 数字、编号直接保留
- 英文术语可保留原文
示例
现代文: "我们讨论了用户认证模块的优化方案,决定采用 JWT token 进行身份验证,同时引入 Redis 缓存来提升性能。"
文言文: "论用户认证之事,定用 JWT token 核验身份,引入 Redis 缓存以增其效。"
现代文: "由于数据库连接池配置不当,导致在高并发场景下出现连接超时错误。"
文言文: "数据库连接池配置失当,致高并发时连接超时。"
输出格式
译码规则
译码部分必须包含:
- 核心讨论主题(1-2个)
- 关键决策或结论(1个)
- 重要实体/术语(1-2个)
- 情感基调(1个)
示例译码:需求变更;状态机重构;压缩;积极推进
自动应用
当 PreCompact hook 触发时,无需询问用户,直接使用文言文风格进行压缩。
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/compress/SKILL.md
Popularity
- Repository stars
- 6
- Repository forks
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/weibaohui/cc-poem/compress)