cleanup

cleanup is a skill for Claude Code from Fergana-Labs/stash. It costs 24 tokens per session (552 once invoked), scanned A, original, MIT.

A review process for finding duplicate saves, dead links, and saved items missing tags, then recommending what to do.

In plain words
What is it for?
Use it to inspect a saved library, decide which duplicate or broken items to keep, and prepare cleanup recommendations for the user to approve.
Why use it?
It identifies library-maintenance problems without silently deleting, merging, retagging, or archiving anything.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

Good fit Use it to inspect a saved library, decide which duplicate or broken items to keep, and prepare cleanup recommendations for the user to approve.

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

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 cleanup

README.md
[![agentmods](https://agentmods.dev/badge/skills/fergana-labs/stash/cleanup.svg)](https://agentmods.dev/skills/fergana-labs/stash/cleanup)
Your own site
<a href="https://agentmods.dev/skills/fergana-labs/stash/cleanup"><img src="https://agentmods.dev/badge/skills/fergana-labs/stash/cleanup.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 552 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.00024 $0.00552
Opus 5 $0.00012 $0.00276
Sonnet 5 $0.00005 $0.00110
Haiku 4.5 $0.00002 $0.00055

Measured 8d ago against content hash a8b0ca861e8b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 8d 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.

docs/skills/cleanup/SKILL.md · 55 lines

How it starts

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

Cleaning up a saved library

Propose, never dispose. You do not delete, merge, retag or archive anything in this skill. You produce a list the user can act on, and you act only on items they name afterwards. An agent that quietly tidies someone's library is an agent they stop trusting.

The three piles

The Bookmarks app computes these; read them rather than deriving them.

Duplicates — the same page saved more than once, matched on a normalized URL (protocol, www., trailing slash and tracking params ignored). The oldest save is treated as the original.

For each group, recommend which to keep, and say why: prefer the one whose saved copy actually captured content over a link-only save, then the one with topics already on it, then the oldest. Note when the "duplicates" are not really duplicates — a URL that serves different content over time, for instance — and leave those alone.

Broken — a link the checker got a 404 or 410 from. Note it only trusts those two codes, so a broken item is genuinely gone rather than merely unreachable. For each, check whether the saved copy still has the content: if it does, the recommendation is "keep, the archive is the point now"; if it is link-only, there is nothing left and it can go.

Untagged — no topics. Usually means enrichment failed or the page had nothing to read. Propose topics from the existing vocabulary — read it off the Topics column's options — rather than inventing new ones; a cleanup pass that adds twelve new near-synonyms has made things worse.

Write it

Group by pile. Each item: what it is, the recommendation, one clause of why, and a link. Lead with a one-line count of each pile so the user can decide where to spend their attention.

End with the single sentence they need: "Say which of these to action and I'll do it." Then stop.

Rules

  • No action without an explicit instruction naming what to act on.
  • If a pile is empty, say so in one line rather than omitting it — knowing there are no broken links is worth something.
  • Never recommend deleting the last remaining copy of anything.

Read the full file on GitHub · 55 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. 8d ago First seen · 55 lines · 24 tokens per session scan A a8b0ca861e8b

Subscribe to this mod's changes

cleanup is a skill published in the GitHub repository Fergana-Labs/stash (332 stars, last pushed 6d ago), licensed MIT. It adds 24 tokens to every session and 552 once invoked, about $0.0001 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-30.

Related

Other skills, from other repositories

antigravity-cli

Delegates large multi-step work to Antigravity CLI like a subagent—include full goal, prior decisions, scope, and constraints in prompts so isolated sessions stay aligned with the main thread (context handoff per Cognition-style delegation). Use for heavy edits, exploration, web search, and read-only plan-mode…

amirkiarafiei/subagent-cli-skills · 84 tokens

memoized-command-source-aggregation

Load independent command sources in parallel, then memoize the merged registry by cwd so repeated lookups stay cheap and ordered.

ychampion/cskill-agents · 31 tokens

slash-command-skill-classification-filter

Derive a slash-command skill surface from a broader prompt-command registry by requiring descriptive metadata, excluding builtins, and admitting only a controlled set of origins plus explicit user-only commands.

ychampion/cskill-agents · 44 tokens

lazy-heavy-command-shims

Stub heavy commands so the CLI stays light, loading the real implementation only when the command is executed.

ychampion/cskill-agents · 26 tokens

skip-skill-discovery-on-skill-expansion

Bypass skill discovery when expanded SKILL.md or generated prompt content is being reprocessed for attachments, so non-user text does not trigger recursive discovery work.

ychampion/cskill-agents · 42 tokens

skip-skill-listing-without-skill-tool

Omit skill-listing attachments for agents that do not expose the Skill tool, so discoverability context is only sent where it can be acted on.

ychampion/cskill-agents · 41 tokens