Skip to content
Back to skills

Cleanup Ralph

ASecurity

ralph-loop plus a cleaner that, every few turns, distills the workspace, writes a short NEXT.md, and squashes the epoch into one commit (old history kept in a tag). Run with /baton:cleanup-ralph "<task>".

  • 3 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added October 26, 2026
ai-agents

Security analysis

A100/100

Scanned October 26, 2026

npx -y skills add cornch-k/baton --skill cleanup-ralph --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cleanup Ralph?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cleanup Ralph
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cornch-k-cleanup-ralph/badge)](https://www.skillsdirectory.com/skills/cornch-k-cleanup-ralph)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cleanup-ralph
description: ralph-loop plus a cleaner that, every few turns, distills the workspace, writes a short NEXT.md, and squashes the epoch into one commit (old history kept in a tag). Run with /baton:cleanup-ralph "<task>".
argument-hint: "\"<task>\" [--cleanup-turns K] [--next-lines L] [--work-paths \"paths\"] [--repairs R] [--turns N] [--minutes M] [--check \"cmd\"] [--no-early-stop] [--in-place] [--resume [run-id]]"
disable-model-invocation: true
---

# cleanup-ralph

Arguments: $ARGUMENTS

Load the run protocol first (Skill tool → `baton:protocol`; if that fails, Read `${CLAUDE_PLUGIN_ROOT}/skills/protocol/SKILL.md`) and follow it, including its **Cleaning** section. Then Read `${CLAUDE_SKILL_DIR}/../ralph-loop/SKILL.md` and run exactly that flow (roles, turn prompt, stop rules), with these changes:

- The flow name in headers and commit messages is `cleanup-ralph`.
- Add one line to the end of the worker's turn prompt: `If NEXT.md exists at the repository root, read it first: a cleaner wrote it after distilling the workspace.`
- Every `--cleanup-turns` work turns, run the protocol's Cleaning steps.
- Also stop after 3 consecutive `empty` work turns.

## Why

Long fresh-session loops pile up strays: scratch files, dead experiments, half-abandoned approaches. Each fresh turn then spends its budget rediscovering them. A periodic cleaner keeps the tree small and leaves a ten-line pointer to what's next, while the full history stays reachable through the epoch tags.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.