一键导入
context-compactor
9-section context compression with analysis scratchpad. Adapted from Claude Code's /compact system (2026-03-31).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
9-section context compression with analysis scratchpad. Adapted from Claude Code's /compact system (2026-03-31).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | context-compactor |
| description | 9-section context compression with analysis scratchpad. Adapted from Claude Code's /compact system (2026-03-31). |
| argument-hint | run | status |
| allowed-tools | ["Read","Bash","Write"] |
| auto-invoke | false |
| model | default |
| context_trigger | context window, running low, compress, compact, too long, token limit, summarize context, /compact |
Protects the session from Token Bloat and "Lost in the Middle" syndrome.
Source: Claude Code
/compactprompt architecture (2026-03-31). Key Innovation: Uses an<analysis>scratchpad block (chain-of-thought) that gets stripped before the summary reaches context. The analysis improves summary quality but consumes no tokens in the final context window.
"compact", "token limit", "clean memory", "summarize session", "context full"
Wrap your analysis in <analysis> tags. This is a drafting scratchpad that will be stripped from the final output. In your analysis:
After analysis, produce a summary in <summary> tags with exactly these sections:
1. Primary Request and Intent
— Capture ALL explicit user requests and intents in detail
2. Key Technical Concepts
— List all important technical concepts, technologies, and frameworks discussed
3. Files and Code Sections
— Enumerate specific files examined, modified, or created
— Include full code snippets where applicable
— Include WHY each file read or edit is important
4. Errors and Fixes
— List ALL errors encountered + how fixed + user feedback on each
5. Problem Solving
— Document problems solved and ongoing troubleshooting
6. All User Messages (Non-Tool-Result)
— Verbatim list of ALL user messages
— CRITICAL for detecting intent drift across the session
7. Pending Tasks
— Outline any pending tasks explicitly asked to work on
8. Current Work
— Describe in detail precisely what was being worked on IMMEDIATELY before this summary
— Include file names and code snippets
9. Optional Next Step
— Only if directly in line with user's most recent explicit request
— Include DIRECT QUOTES from the most recent conversation
— Do NOT start on tangential or old completed requests
<analysis> block — it was for reasoning quality only<summary> content with section headersactiveContext.md under a new ## Compacted Session headingsessionArchive.md"Continue the conversation from where it left off without asking the user any further questions. Resume directly — do not acknowledge the summary, do not recap what was happening, do not preface with 'I'll continue' or similar. Pick up the last task as if the break never happened."
.context/memory_bank/activeContext.md.context/memory_bank/sessionArchive.mdUnified business model evaluator, client filter, pricing engine, and distribution architect. Absorbs 31 business + 8 marketing + 13 content + 2 acquisition protocols.
Unified codebase manipulation, AI deployment, data analysis, and academic delivery engine. Absorbs 6 coding protocols + data-analysis + academic-delivery + spec-driven-dev.
Unified mathematical arbitrator for all resource allocation decisions — money, time, energy, relationships. Absorbs 46 decision protocols + 24 strategy protocols into one dense engine.
Unified survival infrastructure: health, finance, legal safety, circuit breakers, and structural protection against all ruin classes. The last line of defense.
Unified boundary enforcement, interpersonal diagnostic, and relational audit engine. Absorbs 40 psychology + 2 social protocols and all relationship case studies.
Unified zero-emotion variance shield for capital markets (FX, crypto, CFDs) and poker. Absorbs trading-risk-gate + zenith-execution + trade-journal-analyzer into one engine.