Sponsor Suno AI Music arrow_forward
Slash Command

Clean (clean--command)

Remove old sprint directories with safety checks and archiving options

Type
Slash Command
GitHub stars
2.8k
License
MIT
Repo last updated
Sep 27, 2026

What Clean (clean--command) is

Clean (clean--command) is a slash command published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. The repository describes itself as: “Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.”

A slash command is a reusable prompt saved as a markdown file and run by typing its name after a slash. In Claude Code, custom commands have been merged into skills: a file in .claude/commands/ and a skill folder in .claude/skills/ both create the same kind of command, and existing command files keep working.

Clean gives you a repeatable way to run the same instructions without retyping them, optionally with arguments.

How to install Clean (clean--command)

Claude Code

  1. Download clean.md from the repository.
  2. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md.
  3. Run it by typing / followed by its name, with arguments such as [--all | --keep-latest | --keep N].

Claude Cowork

  1. Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it.
  2. In Customize → Skills, click +, then upload the ZIP.
  3. Run it from any task with / and the skill name.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from plugins/community/sprint/commands/clean.md, shared under the repository's MIT license. Read the full file on GitHub.

You are cleaning up old sprint directories.

IMPORTANT WARNING

Sprint directories contain valuable artifacts:

  • Specification files (api-contract.md, backend-specs.md, etc.)
  • Implementation reports from agents
  • Status summaries
  • Test reports

The user is responsible for:

  • Creating checkpoints (git commits) before cleanup
  • Backing up important sprint data
  • Deciding which sprints to keep

Workflow

Step 1: List Existing Sprints

ls -la .claude/sprint/

Show the user:

  • Sprint directories found
  • Last modified dates
  • Size of each directory

Step 2: Confirm Action

Ask the user which sprints to clean:

Options:

  1. Clean all - Remove all sprint directories
  2. Keep latest - Remove all except the most recent sprint
  3. Keep N latest - Remove all except the N most recent sprints
  4. Select specific - Let user specify which to remove
  5. Cancel - Do nothing

Step 3: Safety Check

Before deletion, verify:

# Check for uncommitted changes
git status --porcelain .claude/sprint/

If there are uncommitted changes, WARN the user:

WARNING: You have uncommitted changes in sprint directories.

Uncommitted files:
[list files]

Recommendation: Commit your changes before cleaning.

git add .claude/
git commit -m "Checkpoint before cleanup"

Continue anyway? (y/N)

Step 4: Execute Cleanup

Based on user choice:

Clean all:

rm -rf .claude/sprint/*/

Keep latest:

LATEST=$(ls -d .claude/sprint/*/ | sort -V | tail -1)
find .claude/sprint/ -mindepth 1 -maxdepth 1 -type d ! -path "$LATEST" -exec rm -rf {} +

Keep N latest:

ls -d .claude/sprint/*/ | sort -V | head -n -[N] | xargs rm -rf

Select specific:

rm -rf .claude/sprint/[selected]/

Step 5: Report

After cleanup:

Cleanup complete.

Removed:
- .claude/sprint/1/
- .claude/sprint/2/
- ...

Remaining:
- .claude/sprint/[N]/

Tip: Create a checkpoint now:
git add -A && git commit -m "Cleanup old iterations"

Quick Mode

For quick cleanup without prompts:

/sprint:clean --all - Remove all sprints /sprint:clean --keep-latest - Keep only the latest /sprint:clean --keep 3 - Keep the 3 most recent

Archive Option

Instead of deleting, offer to archive:

# Archive sprints before deletion
tar -czf .claude/sprint-archive-$(date +%Y%m%d).tar.gz .claude/sprint/

Then proceed with deletion.

User Responsibility Notice

Always remind the user:

REMINDER: You are responsible for checkpointing your work.

Before cleaning, consider:
1. git add .claude/ && git commit -m "Checkpoint"
2. Push to remote if you want off-machine backup
3. Keep sprint specs if you might need to reference them

Sprint artifacts are valuable documentation of:
- Architectural decisions
- API contracts
- Implementation reports
- Test results

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Clean (clean--command)?

Clean (clean--command) is a slash command for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Remove old sprint directories with safety checks and archiving options

How do I install Clean (clean--command) in Claude Code?

Download clean.md from the repository. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md. Run it by typing / followed by its name, with arguments such as [--all | --keep-latest | --keep N].

Can I use Clean (clean--command) in Claude Cowork?

Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it. In Customize → Skills, click +, then upload the ZIP. Run it from any task with / and the skill name.

Is Clean (clean--command) safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.