一键导入
compact-session
Use when asked to manually compact a session's memory, trigger session summarization, or reduce a long session's context footprint.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when asked to manually compact a session's memory, trigger session summarization, or reduce a long session's context footprint.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Rewrite an issue's Implementation Steps, Acceptance Criteria, and Files to Modify in place from its own accumulated research findings, without appending or bulldozing human prose
Use when asked to audit documentation accuracy, coverage, or find documentation gaps.
Use when asked about project health, velocity, bug trends, or whether we're making progress.
Use when asked for an adversarial go/no-go review or whether an issue is worth implementing.
Use when asked to manually compact a session's memory, trigger session summarization, or reduce a long session's context footprint.
Use when asked to detect conflicting requirements or incompatible decisions across open issues.
| name | compact-session |
| description | Use when asked to manually compact a session's memory, trigger session summarization, or reduce a long session's context footprint. |
| disable-model-invocation | true |
| allowed-tools | ["Bash(ll-compact-session:*)","Read"] |
| metadata | {"short-description":"Use when asked to manually compact a session's memory or trigger session summ"} |
Manually triggers session-memory compaction for one session — the same LCM
compaction path (session_store.compact_session) that fires automatically in
the background once a session crosses the soft token threshold (FEAT-2598).
Produces leaf/condensed summary_nodes rows and prints the resulting
CompactResult (summary text, covered message count, token estimate).
This is the LCM/semantic-summarization axis — distinct from ll-session compact, which sweeps the separate retention axis (kind='retention'
raw_events summarization, ENH-1906/ENH-2581). Do not confuse the two.
Proactively offer or invoke this skill when the user:
$ARGUMENTS
--db PATH (optional) — session database path (default: .ll/history.db)--json (optional) — machine-readable outputRun the ll-compact-session CLI command:
ll-compact-session SESSION_ID
For programmatic access (e.g. from another skill or loop evaluator):
ll-compact-session SESSION_ID --json
The JSON payload includes new_leaves (leaf nodes created this run),
summary_text (the condensed summary, null if the session has fewer than
two leaf blocks), compacted_messages (covered message_events ids), and
context_token_estimate.
Compaction is idempotent — repeated calls do not create duplicate nodes.
Note that history.compaction.enabled (default false in
.ll/ll-config.json) gates whether an LLM summary is produced at all; when
disabled, ll-compact-session still runs but the leaf/condensed summaries
fall back to deterministic truncation (no LLM cost) per the existing LCM
three-level escalation in session_store._summarize_block.
| User says | Action |
|---|---|
| "Compact this session before we keep going" | ll-compact-session <current-session-id> |
| "Has session abc123 been summarized?" | ll-compact-session abc123 --json, report summary_text |
| "This loop's session is getting huge, trigger compaction now" | ll-compact-session <session-id> |