← 返回
未分类 中文

Strategic Compact

Manual context compaction at logical workflow boundaries rather than arbitrary auto-compaction. Use after completing exploration phases, before switching maj...
在逻辑工作流边界手动压缩上下文,而非随意的自动压缩。在完成探索阶段后、切换主要任务前使用。
djc00p djc00p 来源
未分类 clawhub v1.0.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 418
下载
💾 7
安装
1
版本
#latest

概述

Strategic Compact Skill

Manual /compact at logical workflow boundaries, not arbitrary auto-compaction points.

When to Activate

  • Running long sessions approaching context limits (200K+ tokens)
  • Multi-phase tasks (research → plan → implement → test)
  • Switching between unrelated tasks within the same session
  • After completing a major milestone before starting new work

Quick Start

  1. Identify logical phase boundaries in your work
  2. Save important findings to files before compacting
  3. Use /compact with a context message (e.g., "/compact Now implementing auth")
  4. Continue work referencing saved files, not conversation history

Key Concepts

  • Auto-compaction problem — Triggers at arbitrary points, often mid-task
  • Strategic compaction — Compact after exploration/planning, before execution
  • Persistence — Project instructions, git state, and files on disk survive; conversation history and intermediate reasoning don't
  • Checkpoint discipline — Save learnings to files; use git commits to mark progress
  • Token awareness — 150K → consider; 180K → plan; 200K+ → should have already compacted

Common Usage

Most frequent patterns:

  • Research → build (compact after documentation phase)
  • Exploration → execution (compact after CLAUDE.md is written)
  • Debug → next feature (compact after fix is committed)
  • Failed approach → new strategy (compact to clear dead-end reasoning)

References

  • references/compaction-guide.md — Decision table, what survives, patterns, token budgeting, optimization strategies
  • references/tool-integration.md — Script documentation, configuration, integration methods
  • Compaction command/compact [optional message]
  • Status check — Check session context size before major operations
  • Memory files — Save to disk (survives compaction)
  • Git commits — Mark progress (persists across compaction)

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-05-03 10:13 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 871 📥 349,697
dev-programming

Rails CI Fixer

djc00p
使用分层升级循环修复Rails PR的CI失败。当Rails拉取请求出现CI失败时使用此技能——包括RSpec测试失败、RuboCop违规等。
★ 0 📥 960
ai-agent

Find Skills

root
帮助用户发现和安装智能体技能,当用户询问如「如何做X」、「找X的技能」、「有能做...的吗」等问题时
★ 1,524 📥 581,232