How this skill is triggered — by the user, by Claude, or both
Slash command
/ralph:ralph-resetThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Hard resets the repository to the last committed state, discarding all uncommitted changes and untracked files.
Hard resets the repository to the last committed state, discarding all uncommitted changes and untracked files.
This skill is used when Ralph gets stuck or the codebase is in an inconsistent state. It provides a way to return to the last clean checkpoint.
This is a destructive operation! It will:
You cannot undo this operation! Make sure you want to lose all uncommitted work before proceeding.
# Step 1: Confirm destructive action with user
Use AskUserQuestion to confirm:
"⚠️ WARNING: This will discard ALL uncommitted changes and untracked files.
This cannot be undone. Are you sure you want to proceed? (yes/no)"
# Step 2: If user confirms (response == "yes")
# Execute git reset and clean
git reset --hard HEAD
git clean -fd
# Step 3: Update status.json
Read docs/ai/ralph/status.json
Update the 'status' field to 'reset'
Update the 'lastReset' timestamp to current ISO 8601 time
Write back to docs/ai/ralph/status.json
# Step 4: Report results to user
echo "✅ Repository reset complete"
echo "- All uncommitted changes discarded"
echo "- All untracked files removed"
echo "- Repository at: $(git rev-parse --short HEAD)"
echo "- Status updated to: reset"
# Step 5: If user does not confirm
echo "❌ Reset cancelled by user"
exit 0
Invoke this skill when:
git tag (from Step 8 of Ralph iterations) to create clean checkpoints/ralph:stop before reset to cleanly end the current iteration/ralph:start to begin fresh iterationsGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
npx claudepluginhub stavarengo/ralph-wiggum-loop --plugin ralph