Skip to main content
ClaudeWave
Slash Command28.8k repo starsupdated today

cleanup

The cleanup command sequentially runs six code quality analysis skills on a specified scope (defaulting to current changes) to review React patterns, state management, and design practices. Use this to comprehensively audit code for unnecessary effects, memoization, callbacks, state variables, React Query issues, and design violations, with optional automatic fixes.

Install in Claude Code
Copy
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/simstudioai/sim/HEAD/.claude/commands/cleanup.md -o ~/.claude/commands/cleanup.md
Then start a new Claude Code session; the slash command loads automatically.

cleanup.md

# Cleanup

Arguments:
- scope: what to review (default: your current changes). Examples: "diff to main", "PR #123", "src/components/", "whole codebase"
- fix: whether to apply fixes (default: true). Set to false to only propose changes.

User arguments: $ARGUMENTS

## Steps

Run each of these skills in order on the specified scope, passing through the scope and fix arguments. After each skill completes, move to the next. Do not skip any.

1. `/you-might-not-need-an-effect $ARGUMENTS`
2. `/you-might-not-need-a-memo $ARGUMENTS`
3. `/you-might-not-need-a-callback $ARGUMENTS`
4. `/you-might-not-need-state $ARGUMENTS`
5. `/react-query-best-practices $ARGUMENTS`
6. `/emcn-design-review $ARGUMENTS`

After all skills have run, output a summary of what was found and fixed (or proposed) across all six passes.