system-cleanup

system-cleanup is a skill for Claude Code from alivecontext/alive. It costs 50 tokens per session (5,289 once invoked), scanned A, original, MIT.

A maintenance tool for a structured workspace made of areas called walnuts, each containing tasks, notes, and data bundles. It scans the workspace for stale tasks, abandoned folders, old version remnants, and unsaved sessions, then presents issues one at a time.

In plain words
What is it for?
Auditing workspace health, reviewing active tasks, rebuilding the current-state summary for a walnut, and cleaning up stale or orphaned system data.
Why use it?
Workspace clutter and outdated generated data can accumulate and make the system harder to trust. The tool identifies these problems and lets the user choose the recommended fixes.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions subagents; mentions AGENTS.md.

Part of the alive plugin — 17 skills, 5 hooks shipped together

Good fit Auditing workspace health, reviewing active tasks, rebuilding the current-state summary for a walnut, and cleaning up stale or orphaned system data.

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

Made for: Claude Code.

Or install alive, the plugin that ships this one along with the rest of its 17 skills, 5 hooks.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/alivecontext/alive/system-cleanup"><img src="https://agentmods.dev/badge/skills/alivecontext/alive/system-cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,289 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00050 $0.05289
Opus 5.5 $0.00020 $0.02116
Sonnet 5.5 $0.00010 $0.01058
Haiku 4.5 $0.00005 $0.00529

Measured 22d ago against content hash 54eaf1837156, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

system-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 22d 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.

plugins/alive/skills/system-cleanup/SKILL.md · 501 lines

How it starts

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

Tidy

System maintenance. Root health first, then one walnut at a time. Surfaces issues with recommended fixes — the human picks.

Not a dashboard (that's world). Not a search (that's find). Not session history (that's alive:session-history). Pure maintenance.


v3 Architecture Reference

Walnut structure is flat under _kernel/:

walnut-name/
  _kernel/
    key.md
    log.md
    insights.md
    tasks.json
    now.json
    completed.json
  bundle-a/
    context.manifest.yaml
    raw/
  bundle-b/
    context.manifest.yaml

There is NO _kernel/_generated/ subdirectory. There is NO bundles/ container directory. Bundles sit as direct children of the walnut root alongside _kernel/.

Task operations go through tasks.py, never by reading/writing task files directly:

  • tasks.py list --walnut {path} — all active tasks as JSON
  • tasks.py list --walnut {path} --status active — filter by status
  • tasks.py summary --walnut {path} — structured summary with counts

Projection rebuilds go through project.py:

  • project.py --walnut {path} — rebuilds _kernel/now.json

Three-Phase Flow

Phase 1: Root Audit (system-level, 7 checks — parallel subagents)
    |
Phase 2: Walnut Summary (single subagent scans frontmatter, human picks)
    |
Phase 3: Deep Audit (one walnut, 12 checks — parallel subagents)

Subagent Strategy (non-negotiable)

Tidy is read-heavy. Every phase uses subagents to keep the main context clean.

Discovery subagents MUST use subagent_type: "Explore" — Explore agents have direct file read access without needing Bash. Use Explore for all Phase 1, Phase 2, and Phase 3 discovery checks.

Fix-execution subagents MUST use subagent_type: "general-purpose" — only general-purpose agents have Write/Edit access. Dispatch one general-purpose agent per approved fix.

  • Phase 1: Dispatch all 7 root checks as parallel subagents. Wait for all. Present results together — one line per passing check, expand on failures only.
  • Phase 2: Single subagent reads all walnut frontmatter, returns the health table.
  • Phase 3: Dispatch all 12 checks as parallel subagents (one check per subagent). Wait for all. Present results together — passing checks collapsed, failures expanded one at a time.

Read the full file on GitHub · 501 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. 22d ago Changed · -27 lines · -2 tokens per session 54eaf1837156
  2. 3mo ago First seen · 528 lines · 52 tokens per session scan A 738be21d87b4

Subscribe to this mod's changes

system-cleanup is a skill published in the GitHub repository alivecontext/alive (132 stars, last pushed 14d ago), licensed MIT. It adds 50 tokens to every session and 5,289 once invoked, about $0.0002 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-30.

Related

system-cleanup compared with skills from other repositories

system-cleanup next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
system-cleanupalivecontext/aliveSkill13214d agoMITA50Claude Code
fresh-startegorfedorov/claude-context-optimizerSkill139yesterdayMITA60Claude Code
token-checkegorfedorov/claude-context-optimizerSkill139yesterdayMITA66Claude Code
resuming-from-handoffse4thvin/context-handoffSkill16mo agoMITA59Claude Code
crittomasz-tomczyk/critSkill1.4ktodayMITA55Claude Code, Codex
crit-storytomasz-tomczyk/critSkill1.4ktodayMITA47Claude Code, Codex
slackclishaharia-lab/slackcliSkill297yesterdayMITA48Claude Code