cancel-ralph — Claude Code skill: what it does, how to install
Aborts an active Ralph loop and cleans up its state files. Useful when an agent gets stuck or you need to halt the loop manually.
npx skills add cursor/plugins --skill cancel-ralph -a claude-codeWhat cancel-ralph does
The skill inspects .cursor/ralph/scratchpad.md to see if a loop is running. No scratchpad file? The agent replies that no active loop exists and stops immediately.
If the file is present, the skill extracts the step count from the iteration: line. Next, it executes rm -rf .cursor/ralph in the project root. This wipes the state directory and any completion flags in one pass. It finishes by reporting which iteration was interrupted.
Because the skill targets only .cursor/ralph, it will not detect loops configured to store state in any other directory.
What it helps with
- abort a stuck or runaway Ralph loop
- wipe the
.cursor/ralphstate directory - check which iteration was running before termination
Example prompts for the agent
- Cancel the active Ralph loop
- Stop ralph and clear the scratchpad
- Abort running ralph loop
How to install cancel-ralph
1Skills CLI (Vercel)
npx skills add cursor/plugins --skill cancel-ralph -a claude-code2Manually: put the files in place
~/.claude/skills/cancel-ralph/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/cancel-ralph/
1Skills CLI (Vercel)
npx skills add cursor/plugins --skill cancel-ralph -a codex2Manually: put the files in place
.agents/skills/cancel-ralph/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add cursor/plugins --skill cancel-ralph -a cursor2Manually: put the files in place
.cursor/skills/cancel-ralph/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install cursor/plugins cancel-ralph2Manually: put the files in place
.github/skills/cancel-ralph/SKILL.md1Skills CLI (Vercel)
npx skills add cursor/plugins --skill cancel-ralph -a gemini-cli2Platform CLI
gemini skills install https://github.com/cursor/plugins --path ralph-loop/skills/cancel-ralphManually: put the files in place
.devin/skills/cancel-ralph/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add cursor/plugins --skill cancel-ralph -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about cancel-ralph
How do I install cancel-ralph in Claude Code?
Run npx skills add cursor/plugins --skill cancel-ralph -a claude-code in your terminal.
What does cancel-ralph do?
It looks for .cursor/ralph/scratchpad.md, checks the current iteration count, and removes the .cursor/ralph directory via rm -rf.
What happens if there is no running Ralph loop?
The skill checks for .cursor/ralph/scratchpad.md and reports that no active loop was found without modifying any project files.