一键导入
compression-rules
Reference when user asks why output was truncated or how to bypass compression. Also use before every bash command compression decision.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Reference when user asks why output was truncated or how to bypass compression. Also use before every bash command compression decision.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Reconstructs session working state from the last saved checkpoint and remember.md. Use immediately after compaction when context is lost. Auto-triggers when: files being edited are unknown, project instructions are unclear, or user says "what happened" / "what were we doing".
Use when Emu fires a Drift Alert. Explains what drift means and how to break out. Auto-triggers on: "drift alert", "going in circles", "stuck", "keeps reading same file", "test won't pass".
Auto-loads when context usage feels high or compaction is approaching. Teaches token-efficient behavior. Triggers on: "context is low", "running out of space", slow responses, or after 30+ turns in a session.
Reduces output token usage by injecting terse-mode instructions. Removes filler phrases, trailing summaries, and converts prose to bullets. Configurable: off / lite / full / ultra. Auto-triggers at session start or when context is running low.
| name | compression-rules |
| description | Reference when user asks why output was truncated or how to bypass compression. Also use before every bash command compression decision. |
| allowed-tools | ["Read","Bash"] |
<compression_rules> IF "npm test" OR "yarn test" OR "pnpm test" OR "vitest" OR "jest": Append: 2>&1 | tail -n 40
IF "python -m pytest" OR "pytest" OR "python -m unittest": Append: 2>&1 | grep -E "(PASSED|FAILED|ERROR|passed|failed)" | tail -n 30
IF "go test": Append: 2>&1 | grep -E "(^ok|^FAIL|PASS|FAIL|panic)" | tail -n 30
IF "mvn test" OR "gradle test": Append: 2>&1 | grep -E "(BUILD |Tests run:|Test .*FAILED)" | tail -n 20
IF "dotnet build" OR "dotnet test": Append: 2>&1 | grep -E "(Build succeeded|FAILED|Passed|Failed|Test Run)" | tail -n 20
IF "npm install" OR "yarn" OR "pnpm install": Append: 2>&1 | grep -E "(ERR|error|added|removed)" | tail -n 20
IF "cargo build" OR "cargo test": Append: 2>&1 | grep -E "(error|warning|test result)" | tail -n 30
IF "make" OR "make build": Append: 2>&1 | grep -E "(Error|error|warning|make:)" || echo "Build succeeded"
IF "docker build": Append: 2>&1 | grep -E "(^Step |^Successfully |^#[0-9]+ |ERROR)" | tail -n 30
IF "terraform plan": Append: 2>&1 | grep -E "(Plan:|No changes|Error)" | tail -n 10
IF "eslint" OR "npx eslint": Append: 2>&1 | grep -E "(✖|error|warning|problems)" | head -n 20
IF "tsc" OR "npx tsc": Append: 2>&1 | grep -E "(error TS|Found [0-9])" | head -n 20
IF "git log" AND no "-n" flag AND no "--oneline": Add: --oneline -20
IF "find ." AND no "head" pipe: Append: | head -n 30
IF "cat [file]" AND file >100 lines: Replace: head -n 80 [file] && echo "---[N lines total]---" </compression_rules>
FULL: prefix → remove prefix, apply zero compression, run as-is. Tell user: "Running uncompressed. Full output will enter context."<escalate_to_sonnet> IF command >200 chars AND not in any rule: "ESCALATE_TO_SONNET: complex command, compression unclear" </escalate_to_sonnet>