cc-skill-strategic-compact
它能做什么
这个工具可以帮助你梳理一个长期且复杂任务的进展。它会保存已完成的工作、仍需完成的事项以及关键规则或决定等重要信息,这样你就能接着之前的进度继续,而不会丢失上下文。
适用场景
- ✓项目的一个重要里程碑完成时。
- ✓和 AI 的对话变得过长、重复时。
- ✓在开始一个新的重要阶段之前。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/cc-skill-strategic-compact/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“保存一下我当前任务的进度,我之后想接着做。”
每周 5 个新技能,1 分钟读完。
工作原理
这个工具会从对话中找出关键点,比如主要目标、已确定的规则、已完成的内容和还缺少的部分。然后它会把这些信息整理成清晰的摘要,供以后使用。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Strategic Context Checkpoints
Condense context after a verified phase, with enough durable information to resume the same task. A tool-call count is only a reminder; it cannot measure context quality or decide when compaction is safe.
When to Use
Use when exploration has finished, a tested milestone has landed, or a long conversation contains repeated or obsolete reasoning. Do not compact in the middle of an unresolved tool call, an unrecorded approval decision, or a failure whose exact evidence has not been captured.
Inputs and prerequisites
- The user's current objective, accepted constraints and definition of done.
- The current branch and source revision, local changes, relevant artifact paths and actual check results.
- Running processes, pending tool calls, approvals or external blockers.
- A host-supported context-compaction mechanism. This skill does not assume
/compactexists in every client or manipulate internal context files.
Procedure
- Choose a phase boundary: discovery to implementation, implementation to verification, or one completed batch to the next. Preserve an unresolved failure's reproduction first.
- Reconcile task state with the filesystem and Git. Distinguish completed, uncommitted, planned and failed work.
- Produce the checkpoint below. Include exact commands, result summaries and paths needed to resume; omit copied logs and discarded hypotheses that no longer matter.
- Check that the next action is executable and that a new context would not repeat a merge, send a message twice, lose a constraint or overwrite unrelated work.
- Save only in an already authorized project artifact, or return the checkpoint in the conversation. Do not rewrite global memory or host configuration automatically.
- Use the client's supported compaction command if requested and available. On resumption, read the checkpoint and verify mutable state before continuing.
Checkpoint template
Objective and done condition:
User constraints and authorization boundaries:
Source revision, branch and local changes:
Completed outcomes with verification:
Outstanding work and known failures:
Running process/tool identifiers:
Artifacts and exact paths needed next:
Next action, expected result and fallback:
Worked example
For a search feature whose source PR merged while canonical synchronization is pending, preserve the source merge SHA, canonical PR number and expected generated files. Record tests as passed only for the revision actually tested. The next action is to verify the canonical PR and updated main; it is not to merge the source PR again. If a browser check still needs an unlocked desktop, keep that condition visible while continuing independent code review.
Expected outcome: the next context resumes outstanding verification, preserves unrelated local edits and does not claim publication from a source merge.
Optional stateless reminder
bash skills/cc-skill-strategic-compact/suggest-compact.sh 50
The helper accepts an observed tool-call count and optional threshold (default 50), and prints a reminder at the threshold and every 25 calls after it. COMPACT_TOOL_COUNT and COMPACT_THRESHOLD can be supplied by an explicit caller adapter. It stores no counter, estimates no token usage and never performs compaction. With no count it exits quietly.
Earlier versions incremented a shared user-state counter across unrelated sessions. That counter is no longer read or written; existing custom wrappers must pass a session count explicitly. Existing state files are left untouched. This skill does not install or edit a hook.
Limitations
- A checkpoint preserves recorded evidence, not all conversation detail. Keep primary artifacts when exact bytes matter.
- Counts are caller-provided, bounded non-negative decimal integers; reminders are not a context-capacity measurement.
- Branches, processes and remote checks can change after a checkpoint. Revalidate them instead of treating a summary as current truth.
- Client context management differs. Do not simulate compaction by deleting chat databases, logs, caches or project files.
常见问题
对话的细节会怎样处理?
这个工具主要关注恢复任务所需的关键细节,比如重要决定和结果。次要的或已经解决的细节可能会被省略,以保持摘要简洁。
能确定所有内容都会被保存下来吗?
这个工具会保存记录下来的信息和证据。但保存之后,如果外部发生变化或工作环境有改动,可能需要重新核实。
这个操作会删除什么东西吗?
不会。这个工具不会删除项目文件、日志或配置,它只是生成一份整理好的重要信息摘要。
详情
作者的原始描述
Prepare a verified checkpoint before condensing an agent conversation at a phase boundary. Use during long tasks when context is repetitive; preserves constraints, evidence, decisions and the next action.
热度
- GitHub 星标
- 48k
- 排名
- #4118
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。