kempt-clean

kempt-clean is a skill for Codex from xz1220/Kempt. It costs 90 tokens per session (653 once invoked), scanned A, original, MIT.

A reversible cleanup procedure for removing stale agent sessions, unused skills, duplicate memories, and abandoned caches identified by Kempt.

In plain words
What is it for?
Use it after a Kempt scan to review a cleanup plan, remove approved safe items, or select particular items to clean.
Why use it?
It frees space and reduces clutter without permanently deleting items, because changes are moved to a recycle bin and can be undone.

Skill for Codex

Written for Codex: reads ~/.codex or $CODEX_HOME. Also seen: reads .claude/ paths; mentions Claude Code; mentions Codex.

Good fit Use it after a Kempt scan to review a cleanup plan, remove approved safe items, or select particular items to clean.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xz1220/kempt/kempt-clean
View source ↗ xz1220/Kempt
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 xz1220/Kempt --skill kempt-clean
Clone the repo
git clone --depth 1 https://github.com/xz1220/Kempt

Made for: Codex.

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 kempt-clean

README.md
[![agentmods](https://agentmods.dev/badge/skills/xz1220/kempt/kempt-clean/github.svg)](https://agentmods.dev/skills/xz1220/kempt/kempt-clean)
Your own site
<a href="https://agentmods.dev/skills/xz1220/kempt/kempt-clean"><img src="https://agentmods.dev/badge/skills/xz1220/kempt/kempt-clean/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 kempt-clean

Your own site · 80×15
<a href="https://agentmods.dev/skills/xz1220/kempt/kempt-clean"><img src="https://agentmods.dev/badge/skills/xz1220/kempt/kempt-clean.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 653 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.00090 $0.00653
Opus 5 $0.00045 $0.00327
Sonnet 5 $0.00018 $0.00131
Haiku 4.5 $0.00009 $0.00065

Measured 11d ago against content hash 1e0d5b471a1d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

kempt-clean 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 11d 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.

skills/kempt-clean/SKILL.md · 62 lines

How it starts

The opening of the file, as written. The whole thing — 62 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Kempt Clean — reversible cleanup with undo

You are applying Kempt's clean plan with the user's explicit confirmation. Every change is reversible: items move to Kempt's recycle bin and the whole batch can be undone with one command. You never hard-delete anything.

Steps

  1. Locate the CLI (same as kempt-checkup): command -v kempt, else node <kempt-repo>/bin/kempt.mjs.

  2. Ensure a fresh report. If the user just ran a checkup, reuse it. Otherwise run kempt scan --json first — the clean plan is derived from the latest report.

  3. Dry-run and show the plan. Run:

    kempt clean
    

    (no --yes → dry run, nothing is touched). Summarize for the user what would be cleaned: each item's what, detail, size, and that all of it goes to the recycle bin. By default this covers safe-group items only; mention that --all would also include manual-review items such as the memory merge.

  4. Ask the user to confirm. Show the item list and ask explicitly. Respect their choice; they can also cherry-pick with --items <id,id> (ids are shown by kempt plan).

  5. Apply only after a clear yes:

    kempt clean --yes --json
    

    Report back: items cleaned, bytes reclaimed, health score before → after.

  6. Always end with the undo path:

    kempt restore --last
    

    undoes the entire batch; kempt history shows what is in the recycle bin and until when it can be restored.

Rules

  • Never run kempt clean --yes without the user's explicit confirmation in this conversation. A standing instruction like "clean everything from now on" from a prior session does not count.
  • Never run kempt empty-recycle unless the user explicitly asks to permanently empty the recycle bin — it is the only irreversible command. Warn before running it.
  • Do not edit, move or delete any file under ~/.claude / ~/.codex yourself; the only write path is the Kempt CLI, which guarantees reversibility.
  • If a restore or clean fails, surface the CLI's error verbatim and stop; do not improvise with rm/mv.

Read the full file on GitHub · 62 lines

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. 11d ago First seen · 62 lines · 90 tokens per session scan A 1e0d5b471a1d

Subscribe to this mod's changes

kempt-clean is a skill published in the GitHub repository xz1220/Kempt (2 stars, last pushed 3mo ago), licensed MIT. It adds 90 tokens to every session and 653 once invoked, about $0.0005 per session on Opus 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

durable-session-state

Persist plans, scope decisions, evidence, and reviewer/critic verdicts to durable files during long or multi-phase tasks so work survives context compaction, session resumes, and handoffs. Use for swarm-mode tasks, before context grows large, when recording approval gates, and when resuming after compaction or a…

ZaxbyHub/opencode-swarm · 70 tokens

init

Turn on Rekal memory in the current repository by running rekal init. Use when the user asks to initialize or set up Rekal here, or when a rekal command reported the repository is not initialized. Once per repository. Do not offer this merely because a repo lacks a .rekal/ store — most repos do not want one.

rekal-dev/rekal-cli · 75 tokens

install

Install the Rekal binary on this machine. Use when rekal is not on PATH — a command reported command not found — or when the user asks to install Rekal. Once per machine, not per repository; to set up a repo that already has the binary, use the init skill instead.

rekal-dev/rekal-cli · 66 tokens

continuous-learning

Use when a mistake, correction, or surprise taught the workspace something that must stick — a retro or postmortem, the same agent error corrected twice, a resolved bug's root cause, scattered notes-to-self — and route that lesson to the durable surface that fires next time. NOT a forward choice with alternatives…

ericrisco/rsc-harness · 73 tokens

rekal

Use in a repo with Rekal initialized (.rekal/ exists). Rekal is memory of prior AI sessions — who changed what, why, and when. Before spending a token, decide WHERE the answer lives: TREE / KNOWLEDGE / LEDGER / MAP. Route to one substrate, act, and stay silent when memory is not the tool. Rekal's commands return…

rekal-dev/rekal-cli · 91 tokens

claude-compaction-restore

Use when a Claude Code session has just compacted, is about to compact, reached context limit, resumed after /compact, or needs to rebuild its working mental model from Claude JSONL transcripts and touched files.

mvschwarz/openrig · 49 tokens