Install
openclaw skills install taku-compactCreate a recoverable active-work brief for context-heavy coding, design, debugging, review, research, or handoff sessions. Multi-mode context-control habit with resume, handoff, debug, review, design, and research policies.
openclaw skills install taku-compactUse /taku-compact to compress active work into a recoverable brief. It is a
bonus utility skill, not a seventh Taku phase.
Rule labels: [IRON LAW] means a non-negotiable correctness constraint. [GUIDANCE] means a strong default that may adapt when context justifies it.
Compact preserves current task state. Reflect preserves long-term learnings.
Never write .taku/learnings from this skill. You may list
reflect_candidates, but /taku-reflect is the only path that can promote them
after user approval. A reflect_candidates entry is not a recorded learning and
must never be worded as one.
This skill does not control the host transcript, context window, message slicing, archive behavior, or clear behavior. It creates a handoff brief from available evidence. Do not claim that tool calls, tool results, or transcript events were compacted.
If a future host exposes transcript ranges, record them as retrieval hints only after verifying they are available. Otherwise use file, diff, command, log, prior-brief, and current-session anchors.
Accept an explicit mode when the user provides one:
| Mode | Use When | Preserve First |
|---|---|---|
resume | The same agent or user will continue later | next step, open todos, blockers, recent decisions |
handoff | Another agent or session needs to continue | background, scope, decisions, files, verification, next step |
debug | Investigation or failed checks are in progress | symptoms, reproduction, evidence, failed hypotheses, next probe |
review | A dirty diff or delivery review is next | diff intent, risk areas, test coverage, scope drift, blockers |
design | Think/Plan/product discussion needs preserving | constraints, tradeoffs, confirmed decisions, open questions |
research | Source reading or technical exploration needs preserving | sources, findings, confidence, unresolved questions, followups |
If no mode is provided, infer it from the request and current state. Record
mode_selection_reason in the brief. Prefer handoff when multiple modes fit
and the user asked for general compacting.
[IRON LAW] Run an evidence-first state scan before writing the brief. Do not summarize from memory first.
Read or inspect these when present:
DESIGN.mdPLAN.mdREADME.mdAGENTS.mdCLAUDE.md.taku/context/current.md.taku/context/compact-*.md.taku/learnings/*.jsonl as approved context onlyOnly include stable-layer details that affect the active task. If a durable
source is missing or irrelevant, record that in source_coverage; do not treat
it as a blocker.
Inspect git and file-system evidence when a repo is available:
git status --shortgit diff --statgit diff --name-onlygit diff hunks for changed filesgit log -n 3 --onelineChanged files must come from git or the file system, not guesswork. A clean diff means no durable code changes were observed; it does not mean no progress occurred.
Treat visible conversation and tool outputs as first-class state:
Mark conversation-derived claims as user and command/tool-output claims as
tool. Do not present them as file-backed project truth unless they were
written to a durable artifact.
Every important claim must carry one of these source categories:
file: project file, Taku context file, approved learning, or file-system inspectiongit: status, diff, or commit historytool: command output or tool result visible in the sessionuser: explicit user statement, correction, or approvalinferred: agent synthesis from other evidenceunknown: unavailable or unverified evidenceDo not say tests passed unless actual command output or explicit user-provided evidence shows that.
Include state_confidence for goal, changed files, verification, and next step
using high, medium, low, or unknown.
Use references/compact-brief.md as the local brief scaffold. Fill every applicable
field. Remove irrelevant mode-specific sections, but keep unknowns,
retrieval_hints, and completeness_check.
Default persistence:
.taku/context/ if needed..taku/context/current.md..taku/context/compact-YYYYMMDD-HHMMSS.md.If files cannot or should not be written in the current host, output the brief in
chat and mark persistence: chat_only.
Include:
Include:
Include:
Never describe a fix as verified without evidence.
Include:
PLAN.md or user intent when availableInclude:
Include:
Before finishing, verify the brief includes:
unknownnone_observednone_observednot_establishednone_observedIf a required item is missing, fix the brief before presenting it.
PLAN.md status..taku/learnings.