AI 應答壓縮模式,將上下文使用量減少 30-50% 的效率化模式。
Enables compressed responses using symbols and abbreviations to reduce token usage by 30-50%.
/plugin marketplace add wasabeef/claude-code-cookbook/plugin install cook-zh-tw@claude-code-cookbookAI 應答壓縮模式,將上下文使用量減少 30-50% 的效率化模式。
Token 效率模式透過視覺符號和縮略語系統,壓縮 Claude 的應答內容。 產生的程式碼品質和內容完全不會改變。改變的只是說明方式。
# 模式啟用
「使用 Token 效率模式回應」
「使用 --uc 模式」
「使用簡潔模式」
| 符號 | 意義 | 使用範例 |
|---|---|---|
| → | 導致、引起 | auth.js:45 → 🛡️ 安全風險 |
| ⇒ | 轉換成 | input ⇒ validated_output |
| ← | 回滾、返回 | migration ← rollback |
| ⇄ | 雙向 | sync ⇄ remote |
| & | 且、結合 | 🛡️ security & ⚡ performance |
| | | 或、分隔 | react|vue|angular |
| : | 定義、指定 | scope: file|module |
| » | 然後、序列 | build » test » deploy |
| ∴ | 因此 | tests ❌ ∴ code broken |
| ∵ | 因為 | slow ∵ O(n²) algorithm |
| 符號 | 意義 | 用途 |
|---|---|---|
| ✅ | 完成、成功 | 任務正常結束 |
| ❌ | 失敗、錯誤 | 需要立即處理 |
| ⚠️ | 警告 | 建議檢視 |
| 🔄 | 進行中 | 目前活躍 |
| ⏳ | 等待中 | 稍後執行 |
| 🚨 | 緊急、重要 | 高優先級 |
| 符號 | 領域 | 用途 |
|---|---|---|
| ⚡ | 效能 | 速度、最佳化 |
| 🔍 | 分析 | 搜尋、調查 |
| 🔧 | 設定 | 設置、工具 |
| 🛡️ | 安全性 | 保護、安全性 |
| 📦 | 部署 | 套件、打包 |
| 🎨 | 設計 | UI、前端 |
| 🏗️ | 架構 | 系統結構 |
| 🗄️ | 資料庫 | 資料持久化 |
| ⚙️ | 後端 | 伺服器處理 |
| 🧪 | 測試 | 品質保證 |
cfg → configuration(設定)impl → implementation(實作)arch → architecture(架構)perf → performance(效能)ops → operations(運營)env → environment(環境)req → requirements(需求)deps → dependencies(相依性)val → validation(驗證)auth → authentication(認證)docs → documentation(文件)std → standards(標準)qual → quality(品質)sec → security(安全性)err → error(錯誤)rec → recovery(復原)sev → severity(嚴重度)opt → optimization(最佳化)一般模式 (85 字元)
認證系統的使用者驗證函式第 45 行發現了安全性弱點。
Token 高效 (34 字元)
auth.js:45 → 🛡️ sec vuln in user val()
一般模式 (120 字元)
建置程序已正常完成。目前正在執行測試,之後將進行部署。
Token 高效 (32 字元)
build ✅ » test 🔄 » deploy ⏳
一般模式 (95 字元)
效能分析結果,演算法為 O(n²) 計算複雜度導致處理速度緩慢。
Token 高效 (40 字元)
⚡ perf: slow ∵ O(n²) → optimize to O(n)
[14:23] breakpoint → vars: {user: null, token: expired}
[14:24] step → auth.validate() ❌
[14:25] check → token.exp < Date.now() ∴ expired
[14:26] fix → refresh() → ✅
[14:27] continue → main flow 🔄
/src/auth/: 🛡️ issues × 3
/src/api/: ⚡ bottleneck in handler()
/src/db/: ✅ clean
/src/utils/: ⚠️ deprecated methods
/tests/: 🧪 coverage 78%
Frontend: 🎨 ✅ 100%
Backend: ⚙️ 🔄 75%
Database: 🗄️ ✅ migrated
Tests: 🧪 ⚠️ 68% (target: 80%)
Deploy: 📦 ⏳ scheduled
Security: 🛡️ 🚨 1 critical
// 壓縮等級
--uc; // Ultra Compressed: 最大壓縮
--mc; // Moderate Compressed: 中等壓縮
--lc; // Light Compressed: 輕度壓縮
// 領域特化
--dev; // 開發向壓縮
--ops; // 營運向壓縮
--sec; // 安全性向壓縮
# 啟用
「Token 效率模式開啟」
「簡潔回應」
「使用 --uc 分析」
# 停用
「回到一般模式」
「詳細說明」
「Token 效率模式關閉」
| 項目 | 影響 |
|---|---|
| 產生程式碼品質 | 無變化 ✅ |
| 實作正確性 | 無變化 ✅ |
| 功能性 | 無變化 ✅ |
| AI 說明方式 | 被壓縮 🔄 |
| 上下文使用 | 減少 30-50% ⚡ |
💡 專業提示:長時間作業時,最初使用一般模式深化理解,之後切換到 Token 效率模式,可最佳化效率與上下文保持的平衡。
/token-efficientReduz o uso de contexto nas respostas da IA em 30-50% através do modo de eficiência por compressão.
/token-efficientReduces AI response context usage by 30-50% through compression efficiency mode.