mirror of
https://github.com/anthropics/claude-code.git
synced 2025-11-28 16:50:27 +08:00
Migrates the ralph-wiggum plugin from internal marketplace to public marketplace. Implements Geoffrey Huntley's "Ralph Wiggum" technique using Claude Code's Stop hook mechanism for continuous iterative development loops. Key features: - Interactive self-referential AI loops in current session - Stop hook intercepts exit and feeds same prompt back - Iteration tracking and completion promise detection - Max iterations safety limits Changes: - Remove all tmux dependencies and background execution mode - Simplify to interactive-only mode using Stop hooks - Add comprehensive error handling with clear messages - Fix documentation to accurately describe Stop hook mechanism - Add input validation for all command-line arguments - Register plugin in public marketplace Security fixes: - Remove eval usage (command injection vulnerability) - Add numeric validation before arithmetic operations - Remove silent error suppression 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
26 lines
633 B
Markdown
26 lines
633 B
Markdown
---
|
|
description: "Cancel active Ralph Wiggum loop"
|
|
allowed-tools: ["Bash"]
|
|
hide-from-slash-command-tool: "true"
|
|
---
|
|
|
|
# Cancel Ralph
|
|
|
|
```!
|
|
if [[ -f .claude/ralph-loop.local.md ]]; then
|
|
ITERATION=$(grep '^iteration:' .claude/ralph-loop.local.md | sed 's/iteration: *//')
|
|
echo "FOUND_LOOP=true"
|
|
echo "ITERATION=$ITERATION"
|
|
else
|
|
echo "FOUND_LOOP=false"
|
|
fi
|
|
```
|
|
|
|
Check the output above:
|
|
|
|
1. **If FOUND_LOOP=false**:
|
|
- Say "No active Ralph loop found."
|
|
|
|
2. **If FOUND_LOOP=true**:
|
|
- Use Bash: `rm .claude/ralph-loop.local.md`
|
|
- Report: "Cancelled Ralph loop (was at iteration N)" where N is the ITERATION value from above.
|