strategic-compact
当用户需要在长会话的逻辑边界手动压缩上下文、保留关键决策和约束、丢弃中间探索过程时使用。
git clone --depth 1 https://github.com/majiayu000/spellbook /tmp/strategic-compact && cp -r /tmp/strategic-compact/skills/strategic-compact ~/.claude/skills/strategic-compactSKILL.md
# Strategic Compact ## 概述 在长会话中,上下文窗口有限。此 skill 指导何时压缩、保留什么、丢弃什么。 核心原则:**在逻辑边界压缩,不在任意时刻压缩。** ## 压缩决策表 | 当前阶段 | 下一阶段 | 是否压缩 | 理由 | |----------|----------|----------|------| | 研究/探索 | 规划 | 是 | 探索细节不需要带入规划 | | 规划 | 实现 | 是 | 保留计划,丢弃规划过程 | | 实现步骤 N | 实现步骤 N+1 | 否 | 实现中途压缩会丢失上下文 | | 实现完成 | 验证 | 可选 | 如果上下文接近上限 | | 验证 | 提交 | 否 | 验证结果需要带入提交 | | 任务 A 完成 | 任务 B 开始 | 是 | 不同任务间压缩 | ## 压缩后保留清单 必须保留: - 当前任务目标和约束 - 已做的架构决策及理由 - 已修改的文件列表 - 未完成的步骤 - 发现的问题和 TODO - VibeGuard 约束(始终保留) 可以丢弃: - 文件内容的完整引用(保留路径即可) - 搜索过程中的中间结果 - 已解决的错误的完整堆栈 - 探索性的代码阅读记录 ## 使用方式 当感觉上下文即将耗尽时: 1. 判断当前处于哪个阶段 2. 查压缩决策表,确认是否适合压缩 3. 如果适合,按保留清单整理摘要 4. 执行压缩 ## 反模式 - 在实现中途压缩 → 丢失关键上下文,导致重复工作 - 压缩时丢弃约束 → 后续步骤违反规则 - 不压缩直到溢出 → 被动截断比主动压缩更危险
Senior backend TypeScript architect specializing in Bun/Node.js runtime, API design, database optimization, and scalable server architecture.
Expert at exploring and understanding legacy and unfamiliar codebases. Maps dependencies, identifies patterns, and creates documentation for complex systems.
Kubernetes architect specializing in cluster design, manifests, Helm charts, GitOps workflows, security policies, and production operations.
Systematic open source contributor that analyzes projects, finds suitable issues, implements fixes, and creates high-quality PRs with high acceptance probability.
Application security expert specializing in SAST, vulnerability assessment, OWASP Top 10, compliance auditing, and security architecture review.
Fullstack code reviewer with 15+ years experience analyzing code for security vulnerabilities, performance bottlenecks, architectural decisions, and best practices.
Senior technical lead who analyzes complex projects and coordinates multi-step development tasks. Delegates to specialized agents and ensures quality delivery.
Use when the user explicitly asks to stage all current changes, create a commit, and push to the remote after safety checks.