cleanup

cleanup is a skill for Claude Code from es6kr/skills. It costs 271 tokens per session (1,009 once invoked), scanned A, original, MIT.

A session-end checklist for improving an AI coding agent's future work. It can review failed attempts and hook errors, save knowledge to a retrieval system, record completed plans, and recommend the next action.

In plain words
What is it for?
Use it at the end of coding-agent sessions. It helps commit work, review mistakes, update memory, synchronize completed checklist items, and run the configured cleanup tasks.
Why use it?
It prevents useful lessons and unfinished-task information from being lost when a session ends. It also helps remove duplicate failure rules and keep stored knowledge current.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: names the AskUserQuestion tool.

Part of the labs plugin — 26 skills shipped together , and of es6kr

Good fit Use it at the end of coding-agent sessions. It helps commit work, review mistakes, update memory, synchronize completed checklist items, and run the configured cleanup tasks.

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

Made for: Claude Code.

Or install labs, the plugin that ships this one along with the rest of its 26 skills.

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 cleanup

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/es6kr/skills/cleanup"><img src="https://agentmods.dev/badge/skills/es6kr/skills/cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 271 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,009 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.00271 $0.01009
Opus 5.5 $0.00108 $0.00404
Sonnet 5.5 $0.00054 $0.00202
Haiku 4.5 $0.00027 $0.00101

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

Security

Grade A, and why

cleanup 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.

The scan reads SKILL.md. This mod also ships 9 executable files (resources/block-cleanup-missing-rename.js, resources/block-cleanup-missing-rename.sh, resources/block-cleanup-missing-walkthrough.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/cleanup/SKILL.md · 66 lines

How it starts

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

Cleanup

Sequentially run cleanup tasks before session end.

Topics

Topic Description Guide
config Enable/disable individual tasks config.md
hook-review Review hook errors and suggest improvements hook-review.md
rag-store Persist to RAG before session end + sync completed fix_plan items (medium matrix fallback) rag-store.md
run 4-step sequential execution (commit → self-improve → knowledge persist → backlog delegation) + automated helper script execution (fa-analyze.py, hybrid_sweep_rag.py, sync_dual_wiki.py) run.md
run-self-improve Step 2 body — mistake analysis, hook/skill review, pattern detection run-self-improve.md
run-knowledge-persist Step 3 body — walkthrough, infra check, RAG store modes (3-C.1~3-C.4), memory dual-sync run-knowledge-persist.md
run-checklist-sync Step 4-A / 4-B body — checklist record via backlog skill, comprehensive result report matrix run-checklist-sync.md
run-wip-handoff Step 4-C / 4.5 body — wip delegation via backlog skill, status-based self-task prune run-wip-handoff.md

Moved topics: retrospect and fa-prune are owned by the fa skill — invoke Skill("fa") / Skill("fa", "fa-prune"). The stubs retrospect.md / fa-prune.md only redirect.

Quick Reference

Run everything

/cleanup              # run topic (default)
/cleanup run          # explicit run

Suppress asks (attended session, no interruptions)

/cleanup --auto        # attended session, don't ask — use documented defaults, still commit/edit/call skills normally
/cleanup --ralph       # typed in an interactive session (no RALPH_LOOP=1): treated as --auto (see run.md's mode comparison table)

--ralph's fully-restricted meaning (record-only, no direct modification, report to .ralph/improvements.md) applies only to a true autonomous loop — .ralph/ directory present and RALPH_LOOP=1 set. See run.md "Auto Mode vs. Ralph Mode" for the full comparison.

Read the full file on GitHub · 66 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. 1mo ago Changed · +1 lines · +3 tokens per session 7d8c6282d5c9
  2. 2mo ago Changed · +4 lines · +49 tokens per session 65be2a6d8cb7
  3. 2mo ago Changed · +2 lines · +20 tokens per session aa91bd4169c2
  4. 2mo ago Changed · +7 lines 1fc0b744cc2f
  5. 3mo ago Changed · +1 lines · -5 tokens per session 7427d30dd9cc
  6. 3mo ago First seen · 51 lines · 204 tokens per session scan A dda94ea0ef85

Subscribe to this mod's changes

cleanup is a skill published in the GitHub repository es6kr/skills (2 stars, last pushed 20d ago), licensed MIT. It adds 271 tokens to every session and 1,009 once invoked, about $0.0011 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

cleanup compared with skills from other repositories

cleanup next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cleanupes6kr/skillsSkill220d agoMITA271Claude Code
knowledge-ingestopenclaw/openclawSkill396ktodayMITA80Claude Code, Codex
mem0-oss-to-platformmem0ai/mem0Skill70kyesterdayApache-2.0A217Claude Code, Codex
forgetasgeirtj/system_prompts_leaksSkill74kyesterdayCC0-1.0A0Claude Code, Codex
Cortexdanielmiessler/LifeOSSkill21k17d agoMITA184Claude Code
ha-data-storesshiwenwen/hope-agentSkill1.9ktodayMITA115Claude Code, Codex
memoryopensquilla/opensquillaSkill7.2k9d agoApache-2.0A44Claude Code, Codex