keel-compact

keel-compact is a skill for Claude Code from muratsilahtaroglu/claude-code-starter-kit. It costs 68 tokens per session (1,075 once invoked), scanned A, original, MIT.

A preparation step for compacting a coding session, where the conversation is shortened to save context space. It updates the project's handover and memory files first, then runs the built-in compaction command.

In plain words
What is it for?
Use it before compacting a long session to refresh handover notes, tasks, plans, lessons, and other project records.
Why use it?
Compaction can lose details that were only discussed in chat. Updating the files first gives the next session a current written record.

Skill for Claude Code

Written for Claude Code: PreCompact hook event.

Good fit Use it before compacting a long session to refresh handover notes, tasks, plans, lessons, and other project records.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/muratsilahtaroglu/claude-code-starter-kit/keel-compact
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add muratsilahtaroglu/claude-code-starter-kit --skill keel-compact
Clone the repo
git clone --depth 1 https://github.com/muratsilahtaroglu/claude-code-starter-kit

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for keel-compact

README.md
[![agentmods](https://agentmods.dev/badge/skills/muratsilahtaroglu/claude-code-starter-kit/keel-compact/github.svg)](https://agentmods.dev/skills/muratsilahtaroglu/claude-code-starter-kit/keel-compact)
Your own site
<a href="https://agentmods.dev/skills/muratsilahtaroglu/claude-code-starter-kit/keel-compact"><img src="https://agentmods.dev/badge/skills/muratsilahtaroglu/claude-code-starter-kit/keel-compact/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for keel-compact

Your own site · 80×15
<a href="https://agentmods.dev/skills/muratsilahtaroglu/claude-code-starter-kit/keel-compact"><img src="https://agentmods.dev/badge/skills/muratsilahtaroglu/claude-code-starter-kit/keel-compact.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,075 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00068 $0.01075
Opus 5.5 $0.00027 $0.00430
Sonnet 5.5 $0.00014 $0.00215
Haiku 4.5 $0.00007 $0.00108

Measured 1mo ago against content hash c5103f6282a6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

keel-compact scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/keel-compact/SKILL.md · 53 lines

What it actually says

/keel-compact — refresh the disk, THEN compact

Compaction summarizes the conversation lossily; the pincer (PreCompact snapshot + SessionStart re-ground) restores only what is ON DISK. This skill exists so a forgotten ritual can't turn a manual compact into an information-loss event — the failure mode: /compact run with a stale HANDOVER, and the snapshot faithfully backs up the stale file. Run it whenever you are about to compact (or the context feels near-full). The individual skills stay directly invokable as always — this is the umbrella, not a replacement.

  1. Run the full /keel-handover procedure (rules.md §1.4) — it already cascades: /keel-distill when caps are hit, the session block (a)–(d), PLAN.md status flips + the regenerated diagram, TASKS.md cleanup, and the §9.31 sweep of unwritten agreements into LESSONS.md. Do not duplicate its steps here — invoke it.
  2. Freshness gate — RUN python3 .claude/keel-compact-check.py (ONE call; its rc is the verdict). It measures the mechanical half of the list below and prints its own scope: size per always-loaded file (lines · KB · over-long lines — caps read from .claude/keel-caps), HANDOVER block count + top-block date + "written this session" + STALE-DISK debt, ## Now per lane, ## Review evidence files, ghost citations, and the push boundary. rc 0 pass · 1 RED (fix, re-run) · 2 the instrument failed (fall back to the list by hand). It refuses to fake the one non-mechanical item and PRINTS it instead — the §9.31 sweep is yours. Why a script: on a live 5-agent project this checklist cost 17 / 25 / 59 tool turns per ritual at the fullest context of the session (~37M cache reads for one run). The list it replaces, for reference:
    • HANDOVER.md top block carries THIS session's YYYY-MM-DD HH:MM and describes THIS session (same-day ≠ same-session: another session's block from today is still stale — add your own).
    • TASKS.md ## Now matches reality; finished items deleted (one-liners in block (a)).
    • No agreement / gotcha / failed approach from this conversation is still unwritten (§9.31).
    • Caps respected (defaults — .claude/keel-caps overrides, rules §10.40): HANDOVER ≤ 3 blocks / ~150 · LESSONS ≤ ~250 · TASKS ≤ ~100 (else /keel-distill) — in LINES and KB, with no line over its per-line cap (a line cap alone once let HANDOVER reach 244 KB on 146 lines).
    • PLAN.md statuses + Current focus current (if the project uses PLAN.md).
  3. Offer an approved commit + the batched push (rules.md §1.3, §6.15) — this is the natural push boundary: commits accrued through the session go out here in ONE approval (the ask on push fires once, not per-commit — that's the point). git is the second safety net beside .claude/snapshots/: even a bad summary then loses nothing.
  4. Hand off: tell the user — "Disk is fresh; now run /compact." A skill CANNOT invoke the built-in /compact itself; stop here and let the user trigger it.

Enforcement: this ritual is not just advice — the compact-gate PreCompact hook (matcher manual) BLOCKS a stale manual /compact with exit 2 and points here, so forgetting it can't silently cost a session (on older CLIs the block degrades to a warning). Emergency bypasses: /compact keel-force · touch .claude/compact-force (one-shot).

Scope honesty: the gate covers MANUAL compacts only. Auto-compact is never blocked (a blocked auto-compact could wedge a full session) — the defense there remains the hot-path discipline (§9.31: write it the moment it appears) + the pincer. For full determinism you can disable auto-compact in /config and compact only via this ritual (trade-off: forget too long and the session hits the hard context limit mid-turn).

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +9 lines c5103f6282a6
  2. 2mo ago First seen · 44 lines · 68 tokens per session scan A 30973f331d8b

Subscribe to this mod's changes

keel-compact is a skill published in the GitHub repository muratsilahtaroglu/claude-code-starter-kit (9 stars, last pushed 1mo ago), licensed MIT. It adds 68 tokens to every session and 1,075 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

mem0-vercel-ai-sdk

Mem0 provider for Vercel AI SDK (@mem0/vercel-ai-provider). TRIGGER when: user mentions "vercel ai sdk", "@mem0/vercel-ai-provider", "createMem0", "retrieveMemories", "addMemories", "getMemories", "searchMemories", "mem0 vercel", "AI SDK provider", "AI SDK memory", or is using generateText/streamText with mem0. Also…

mem0ai/mem0 · 146 tokens

pause

Pause Mem0 memory capture on this machine. Use when the user wants to stop memories being recorded, for example for private work or experiments.

mem0ai/mem0 · 30 tokens

mine

Mine a project or conversation into your MemPalace — extract and store memories for later retrieval.

MemPalace/mempalace · 21 tokens

mem0-oss-to-platform

Plan, then execute, a migration of a project from the mem0 open-source / self-hosted SDK (local Memory class) to the mem0 Platform / hosted SDK (MemoryClient). TRIGGER when: the developer wants to move, switch, or migrate mem0 off OSS/self-hosted to the hosted API, e.g. "migrate my mem0 setup to the platform", "switch…

mem0ai/mem0 · 217 tokens

agent-carnet

Use this skill when the user asks to save, recall, find, or organize notes. Triggers on: 'remember this', 'save this', 'note this', 'what did we discuss about...', 'check the notebook', 'find in carnet'. Also use proactively when discovering findings worth preserving across sessions.

yamadashy/repomix · 67 tokens

mempalace-recall

Recall protocol for MemPalace — search the palace before answering about past work, people, projects, or prior decisions. Apply when the user asks what was decided, what happened before, who someone is, what was discussed last time, or anything that may already be filed in their memory palace; or when mempalace-recall…

MemPalace/mempalace · 94 tokens