Strategic Compact
affaan-m/ECC
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
Background memory compaction with auto-trigger, chat summary paragraph, configurable threshold, model selector, settings tab, and result storage for OpenClaw Control UI.
$ npx skills add LeoYeAI/openclaw-master-skills --skill compaction-ui -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills compaction-ui --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/compaction-ui-enhancements .claude/skills/compaction-ui && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "compaction-ui" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/compaction-ui-enhancements into .claude/skills/compaction-ui/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "compaction-ui", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/compaction-ui-enhancementsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add LeoYeAI/openclaw-master-skills --skill compaction-ui -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills compaction-ui --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/compaction-ui-enhancements .agents/skills/compaction-ui && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "compaction-ui" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/compaction-ui-enhancements into .agents/skills/compaction-ui/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "compaction-ui", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LeoYeAI/openclaw-master-skills --skill compaction-ui -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills compaction-ui --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/compaction-ui-enhancements .cursor/skills/compaction-ui && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "compaction-ui" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/compaction-ui-enhancements into .cursor/skills/compaction-ui/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "compaction-ui", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/LeoYeAI/openclaw-master-skills.git --path skills/compaction-ui-enhancements--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add LeoYeAI/openclaw-master-skills --skill compaction-ui -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills compaction-ui --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/compaction-ui-enhancements .gemini/skills/compaction-ui && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "compaction-ui" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/compaction-ui-enhancements into .gemini/skills/compaction-ui/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "compaction-ui", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install LeoYeAI/openclaw-master-skills compaction-uiInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add LeoYeAI/openclaw-master-skills --skill compaction-ui -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/compaction-ui-enhancements .github/skills/compaction-ui && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "compaction-ui" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/compaction-ui-enhancements into .github/skills/compaction-ui/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "compaction-ui", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LeoYeAI/openclaw-master-skills --skill compaction-ui -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills compaction-ui --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/compaction-ui-enhancements .opencode/skills/compaction-ui && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "compaction-ui" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/compaction-ui-enhancements into .opencode/skills/compaction-ui/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "compaction-ui", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
compaction-uiBackground memory compaction with auto-trigger, chat summary paragraph, configurable threshold, model selector, settings tab, and result storage for OpenClaw Control UI.
Compaction UI is an agent skill from LeoYeAI/openclaw-master-skills. Background memory compaction with auto-trigger, chat summary paragraph, configurable threshold, model selector, settings tab, and result storage for OpenClaw Control UI.
Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `references/auto-compaction.ts`, `references/chat-filters.diff.md` and `references/compact-summary-injection.ts`).
The repository describes itself as: 🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai. The licence is MIT.
8 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit e5199b5. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships script files (TypeScript), which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Compaction UI loads about 2.7k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 46 tokens; SKILL.md has 1,073 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from LeoYeAI/openclaw-master-skills at commit e5199b5, republished under its MIT licence (© LeoYeAI). 1,073 words, ~2,726 tokens.
.claude/skills/compaction-ui/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.Memory compaction system for the OpenClaw Control UI — background execution with toast notifications, auto-trigger at configurable token thresholds, conversation summary paragraphs in compacted output, dedicated settings tab with model selector, and result history.
| Component | Status |
|---|---|
| Context Gauge Button | ✅ Working |
| Background Compaction (toast) | ✅ Working |
| Auto-Compaction Trigger | ✅ Working |
| Conversation Summary Paragraph | ✅ Working |
| Settings Tab (plugin-registered) | ✅ Working |
| Model Selector | ✅ Working |
| Last Result Storage + Viewer | ✅ Working |
| Settings Persistence & Reload | ✅ Working |
| Auth Hierarchy (OAuth > API > Fallback) | ✅ Working |
| Chat History Filters | ✅ Working |
| Full Background Isolation (no chat interference) | ✅ Working |
app-render.helpers.ts)A circular SVG progress ring in the chat toolbar that doubles as the manual compact trigger.
renderChatControls()sessionsResult.sessions[].totalTokens and contextTokens from session rowsOn click (or auto-trigger), compaction runs in the background using the standard bottom-right toast system — no blocking modal. The UI remains fully interactive.
backgroundJobToasts system consistent with all other background processes (cron, knowledge extraction, etc.)After every chat response (final event), the UI checks token usage against the configured threshold. If exceeded:
Every compaction output now begins with a ## Conversation Summary section before the structured ## Goal section. This is a 3-6 sentence natural language paragraph that:
Implementation: Custom instructions are injected into the upstream compaction LLM call via compact.ts. The instruction is prepended to any user-provided custom instructions (from /compact [instructions]), so both coexist.
Example output:
## Conversation Summary
The conversation began with the user requesting improvements to the compaction
system, specifically moving from a blocking modal to background toasts. Discussion
then shifted to adding a settings tab with auto-compaction controls. After
implementing and testing those features, the user noticed settings weren't
persisting across tab navigations, which led to a fix for the module-level
state cache. Finally, the user requested adding a narrative summary paragraph
to the compaction output for better context.
## Goal
...A dedicated Compaction tab under the Agent navigation group, registered via the Plugin UI architecture.
Registration: plugins-ui.ts → BUILTIN_UI_VIEWS with id: "compaction", group: "agent", position: 7, icon: "archive"
Cards:
State Management:
resetCompactionSettingsState() exported for tests and tab switchesCompaction uses resolveApiKeyForProvider via getApiKeyForModel — the same auth chain as chat:
OAuth → API Key → Fallback
No separate configuration needed. If OAuth (Claude Max) is configured as the primary auth profile, compaction uses it automatically. Custom model selection uses this same auth chain independently.
When enabled, the most recent compaction result is persisted to {agentDir}/compaction-config.json:
{
"settings": {
"autoEnabled": true,
"autoThresholdPercent": 60,
"storeLastResult": true,
"compactionModel": "anthropic/claude-sonnet-4-6"
},
"lastResult": {
"timestamp": 1709283600000,
"trigger": "manual",
"tokensBefore": 50614,
"tokensAfter": 4766,
"tokensSaved": 45848,
"percentReduction": 91,
"sessionKey": "agent:main:main",
"summary": "## Conversation Summary\nThe conversation focused on...\n\n## Goal\n..."
}
}When storage is disabled, metadata (timestamps, token counts) is still saved but the summary text is omitted.
__openclaw.kind === "compaction" messages| Method | Description |
|---|---|
sessions.compact | Execute compaction (records result after completion) |
compaction.getSettings | Read settings from config file |
compaction.saveSettings | Update settings (threshold auto-clamped 10-95%) |
compaction.getLastResult | Get stored last compaction result |
compaction.clearLastResult | Clear stored result |
| File | Purpose |
|---|---|
src/gateway/server-methods/compaction.ts | Settings RPCs, config I/O, result recording |
src/gateway/server-methods/sessions.ts | sessions.compact RPC (records result after compaction) |
src/gateway/server-methods/plugins-ui.ts | Plugin view registration |
src/gateway/server-methods.ts | Handler wiring |
src/gateway/server-methods-list.ts | Method registration |
src/gateway/method-scopes.ts | Scope registration |
src/agents/pi-embedded-runner/compact.ts | Chat summary instruction injection |
ui/src/ui/app-render.helpers.ts | Context gauge + background toast trigger |
ui/src/ui/app-gateway.ts | Auto-compaction check after final event |
ui/src/ui/views/compaction-settings.ts | Settings tab view |
ui/src/ui/app-render.ts | View wiring + import |
ui/src/ui/views/chat.ts | Chat history filters |
{agentDir}/compaction-config.json — per-agent, created on first settings save.
The compaction tab is registered as a builtin plugin view in plugins-ui.ts:
{
id: "compaction",
label: "Compaction",
subtitle: "Memory Management",
icon: "archive",
group: "agent",
position: 7,
pluginId: "compaction-ui",
}_state.loaded flag was preventing reloads. Now reloads every 2 seconds when re-entering the tab."provider/model" format (e.g. "anthropic/claude-sonnet-4-6"). Invalid formats are silently ignored and fall back to session default.readSessionMessages, the skip set must ONLY propagate through entries with a message field. Non-message protocol entries (type:"custom") bridge between logical turns — if their IDs enter the skip set, the entire remaining conversation gets hidden. The fix: only check parsed?.message entries against the skip set, and only add their IDs to it.app-render.helpers.ts must NEVER render a full-screen overlay modal. Compaction is a background process; all status is communicated via the bottom-right toast system. Remove any position:fixed; inset:0 overlay conditioned on compactState.phase. The button may show a spinner icon while running, but must not block the UI.## Conversation Summary narrative paragraph before structured sectionsreferences/ with current sourcesessions.compact records before/after token counts and optional summarycompaction.getSettings, compaction.saveSettings, compaction.getLastResult, compaction.clearLastResultsessions.compact RPC with LLM summarization, chat history NO_REPLY/HEARTBEAT_OK filtering, compaction divider lines© LeoYeAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 7 other files (references) in skills/compaction-ui-enhancements of LeoYeAI/openclaw-master-skills.
Open the folder on GitHubat commit e5199b5
Compaction UI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Compaction UI this skillLeoYeAI/openclaw-master-skills | 2.2k | — | ~2.7k | Automated safety check: Pass | MIT | |
| Strategic Compactaffaan-m/ECC | 275k | 1 repos | ~2.1k | Automated safety check: Pass | MIT | |
| Python Background Jobswshobson/agents | 40k | — | ~1.8k | Automated safety check: Pass | MIT | |
| Backgroundjeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~2.2k | Automated safety check: Pass | MIT | |
| Compactcatlog22/Claude-Code-Workflow | 2.1k | — | ~3.2k | Automated safety check: Pass | MIT | |
| Strategic Compactaffaan-m/ECC | 275k | 2 repos | ~434 | Automated safety check: Pass | MIT |
affaan-m/ECC
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
wshobson/agents
Python background job patterns including task queues, workers, and event-driven architecture.
jeremylongshore/tons-of-skills-marketplace
A skill your agent uses when the user wants to see, inspect, cancel, or prune background agents fired during prior chain runs.
catlog22/Claude-Code-Workflow
Compact current session memory into structured text for session recovery.
affaan-m/ECC
任意の自動コンパクションではなく、タスクフェーズを通じてコンテキストを保持するための論理的な間隔での手動コンパクションを提案します。
affaan-m/ECC
임의의 자동 컴팩션 대신 논리적 간격에서 수동 컨텍스트 압축을 제안하여 작업 단계를 통해 컨텍스트를 보존합니다.
LeoYeAI/openclaw-master-skills
Manages pipelines on a DevOps quality and efficiency platform through its OpenAPI: list workspaces and templates, create, update, run and cancel pipelines, and read run records.
LeoYeAI/openclaw-master-skills
Patches OpenClaw's Feishu extension so an edited document triggers an isolated agent session that reads the doc and replies inline, turning it into a live chat space.
LeoYeAI/openclaw-master-skills
Multi-context memory management system for OpenClaw agents with group-isolated storage, global shared memory, workspace organization, and group-specific skills isolation.
LeoYeAI/openclaw-master-skills
Runs a brand's AI-search visibility work end to end: diagnosing how AI platforms represent it, repositioning it, producing AI-optimized content and monitoring ongoing mentions.
LeoYeAI/openclaw-master-skills
Installs and authenticates the gws CLI, then automates Gmail, Drive, Sheets, Calendar, Docs, Chat and Tasks with ready-made recipes, persona bundles and security audits.
LeoYeAI/openclaw-master-skills
Runs four advisor roles, a fitness coach, nutritionist, data analyst and TCM practitioner, to build a health profile and track workouts, diet and wellness over time.
Background memory compaction with auto-trigger, chat summary paragraph, configurable threshold, model selector, settings tab, and result storage for OpenClaw Control UI. Compaction UI is an agent skill from LeoYeAI/openclaw-master-skills. Background memory compaction with auto-trigger, chat summary paragraph, configurable threshold, model selector, settings tab, and result storage for OpenClaw Control UI.
Run `npx skills add LeoYeAI/openclaw-master-skills --skill compaction-ui -a claude-code`. Or copy the skill folder (skills/compaction-ui-enhancements in LeoYeAI/openclaw-master-skills) into .claude/skills/compaction-ui in your project. Claude Code loads it when a task matches its description.
Run `npx skills add LeoYeAI/openclaw-master-skills --skill compaction-ui -a codex`. Or copy the skill folder (skills/compaction-ui-enhancements in LeoYeAI/openclaw-master-skills) into .agents/skills/compaction-ui in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LeoYeAI/openclaw-master-skills --skill compaction-ui -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/compaction-ui, .gemini/skills/compaction-ui, .github/skills/compaction-ui and .opencode/skills/compaction-ui in your project.
Going by SKILL.md and its folder, Compaction UI needs TypeScript for the scripts in its folder. Our summary lists: Node.js.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Compaction UI is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 9.9k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Compaction UI: Strategic Compact (affaan-m/ECC, 275k stars), Python Background Jobs (wshobson/agents, 40k stars), Background (jeremylongshore/tons-of-skills-marketplace, 2.8k stars) and Compact (catlog22/Claude-Code-Workflow, 2.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
LeoYeAI (a GitHub user) maintains it in LeoYeAI/openclaw-master-skills, which has 2,159 GitHub stars. The repository holds 972 skills in this directory. The repository was last updated on July 20, 2026.
Source: LeoYeAI/openclaw-master-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.