tidy-scratch

tidy-scratch is a skill for Claude Code from shck-dev/ccx-context-system. It costs 48 tokens per session (1,149 once invoked), scanned C, original, MIT.

A cleanup workflow for a scratch notebook containing old or completed work notes. It scans folders and open pull requests, then proposes what to keep, archive, or remove.

In plain words
What is it for?
Use it to review scratch folders, identify finished threads, and prepare a cleanup plan. It starts as a dry run and waits for confirmation before destructive cleanup.
Why use it?
It helps reduce stale notes while considering recent activity and whether related work is still open.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the ccx plugin — 3 skills, 3 hooks shipped together

Good fit Use it to review scratch folders, identify finished threads, and prepare a cleanup plan. It starts as a dry run and waits for confirmation before destructive cleanup.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add shck-dev/ccx-context-system
Claude Code
/plugin install ccx

Made for: Claude Code.

Or install ccx, the plugin that ships this one along with the rest of its 3 skills, 3 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 tidy-scratch

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/shck-dev/ccx-context-system/tidy-scratch"><img src="https://agentmods.dev/badge/skills/shck-dev/ccx-context-system/tidy-scratch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,149 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00048 $0.01149
Opus 5.5 $0.00019 $0.00460
Sonnet 5.5 $0.00010 $0.00230
Haiku 4.5 $0.00005 $0.00115

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

Security

Grade C, and why

tidy-scratch scanned grade C with 1 finding 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 3mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **delete:** `rm -rf <scratch_root>/<slug>` — permanent if the notebook isn't version-controlled.
plugins/ccx/skills/tidy-scratch/SKILL.md · 74 lines

How it starts

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

Tidy scratch — date-aware GC for the scratch notebook

A read → propose → execute sweep. This is the only ccx skill that proposes destructive actions; save-state stays a pure read-only dashboard. The sweep is dry-run by default — it prints a plan and touches nothing until you confirm. If the scratch dir is not version-controlled (the usual setup), a delete is permanent. When in doubt: archive (move), don't delete.

Live data (injected at load)

Project + config: !bun "${CLAUDE_PLUGIN_ROOT}/scripts/where.ts"

Now: !date "+%Y-%m-%d %H:%M %Z"

Folder scan — date-aware, stalest first (newest-file age per folder; STATE=NO = no handoff doc): !bun "${CLAUDE_PLUGIN_ROOT}/scripts/scan.ts"

Open PRs (a matching open PR keeps a thread alive): !gh pr list --limit 30 2>/dev/null || echo "(gh unavailable / not a GitHub repo)"

Then do this

  1. Classify every folder from the scan. With ticket_system: none there is no external "closed" oracle — only age + PR signals exist, so stay patient and conservative. age = the scan's age_days; thresholds are defaults you may adjust per item when presenting the plan:
    • KEEP (active) — age < 3 (protects an active spike), OR an open PR that matches the thread's topic/branch.
    • ARCHIVE (likely done) — has a STATE doc AND age > 30 AND no open PR. (Longer threshold than a ticket-oracle setup would use: age alone must be more patient.)
    • ADOPT (unfiled work) — STATE = NO AND files > 3 — too much accumulated work to be throwaway; propose creating a STATE doc for it (offer /ccx:start-thread), never delete in this pass.
    • DELETE (throwaway) — STATE = NO AND age > 14 AND files ≤ 3 (no handoff value + cold + tiny).
    • DELETE (empty) — files = 0.
    • FLAG → default KEEP (unsure) — anything that fits no rule above, and every kind: hub reference note. Never auto-propose deleting a folder that has a STATE doc.
  2. Print the PLAN — execute NOTHING yet. One table, stalest first:

Read the full file on GitHub · 74 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. 3mo ago First seen · 74 lines · 48 tokens per session scan C 77eb072c5008

Subscribe to this mod's changes

tidy-scratch is a skill published in the GitHub repository shck-dev/ccx-context-system (1 stars, last pushed 4mo ago), licensed MIT. It adds 48 tokens to every session and 1,149 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

tidy-scratch compared with skills from other repositories

tidy-scratch next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tidy-scratchshck-dev/ccx-context-systemSkill14mo agoMITC48Claude Code
claude-code-bash-patternssecondsky/claude-skillsSkill257yesterdayMITB52Claude Code
branch-recapMalo-T/claude-toolbeltSkill25d agoMITA338Claude Code
audit-contextMalo-T/claude-toolbeltSkill25d agoMITA249Claude Code
promoteArcticFox2029/chamnanSkill926d agoMITA29Claude Code
slack-changelogMalo-T/claude-toolbeltSkill25d agoMITA332Claude Code
ignore-setupMalo-T/claude-toolbeltSkill25d agoMITA157Claude Code