Stop RU Autonomous Loop

VerifiedSafe

Immediately disables autonomous loop mode by updating state files and creating global stop signals for the RU system.

Sby Skills Guide Bot
DevelopmentBeginner
306/2/2026
Claude Code
#stop#autonomous-loop#kill-switch#state-management

Recommended for

Our review

This skill immediately disables the autonomous loop mode in a Claude project.

Strengths

  • Fast and reliable stopping of the autonomous loop
  • Uses multiple redundant mechanisms (state file, kill switch, global signal)
  • Cleans up start markers to avoid confusion
  • Works with or without existing configuration

Limitations

  • Requires the .claude directory to exist or be created
  • May not stop instantly if a hook is still executing
  • Depends on jq for updating the configuration file
When to use it

Use this skill when you want to interrupt a running autonomous loop in a Claude project.

When not to use it

Do not use it if you need to temporarily pause the loop without clearing state; a pause mechanism would be more appropriate.

Security analysis

Safe
Quality score80/100

The script only performs local file operations within the project's .claude directory and $HOME/.claude. It does not exfiltrate data, use network calls, execute destructive commands, or contain obfuscated payloads. It is a straightforward stop mechanism for an autonomous loop, posing no security risk.

No concerns found

Examples

Stop autonomous loop
/ru stop
Disable loop mode
stop autonomous loop

name: stop description: "Disable autonomous loop mode immediately. TRIGGERS - ru stop, stop autonomous, disable loop, end autonomous mode." allowed-tools: Bash argument-hint: "" model: haiku disable-model-invocation: true

RU: Stop

EXECUTE IMMEDIATELY: Use the Bash tool to run the following script.

/usr/bin/env bash << 'RALPH_UNIVERSAL_STOP'
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}"

echo "Stopping RU loop..."

# Set state to stopped
STATE_FILE="$PROJECT_DIR/.claude/ru-state.json"
if [[ -d "$PROJECT_DIR/.claude" ]]; then
    echo '{"state": "stopped"}' > "$STATE_FILE"
fi

# Create kill switch for redundancy
touch "$PROJECT_DIR/.claude/STOP_LOOP"

# Update config if exists
CONFIG_FILE="$PROJECT_DIR/.claude/ru-config.json"
if [[ -f "$CONFIG_FILE" ]]; then
    jq '.state = "stopped"' "$CONFIG_FILE" > "$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"
fi

# Clean up markers
rm -f "$PROJECT_DIR/.claude/ru-start-timestamp"

# Create global stop signal
echo '{"state": "stopped", "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}' > "$HOME/.claude/ru-global-stop.json"

echo ""
echo "RU: STOPPED"
echo "Project: $PROJECT_DIR"
RALPH_UNIVERSAL_STOP

After execution, confirm the loop has been stopped.

Troubleshooting

| Issue | Cause | Solution | | ----------------------- | --------------------- | ------------------------------------ | | Loop continues running | Hook still active | Wait for current iteration to finish | | State file not created | .claude dir missing | Create with mkdir -p .claude | | jq error | Config file malformed | Delete and recreate config file | | Permission denied | File not writable | Check directory permissions | | Global stop not working | Different project dir | Ensure CLAUDE_PROJECT_DIR is correct |

Related skills