How this skill is triggered — by the user, by Claude, or both
Slash command
/ralph-wiggum:ralphThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
---
Set up the Ralph Wiggum technique for iterative AI development loops.
Ralph is a development methodology based on continuous AI agent loops. The core concept: run Claude in a while true loop with the same prompt until task completion. Each iteration, Claude sees its previous work in files and git history, allowing autonomous improvement.
Learn more: https://ghuntley.com/ralph/
project/
├── specs/ # Feature specifications (active)
│ └── archived/ # Completed/paused specs (ignored)
├── AGENTS.md # Build/test commands
├── PROMPT_plan.md # Planning phase prompt
├── PROMPT_build.md # Build phase prompt
└── loop.sh # The bash loop script
Run these checks to detect if this is an existing project:
# Check for package manager files (any of these = existing project)
ls package.json pyproject.toml Cargo.toml go.mod pom.xml build.gradle build.sbt composer.json Gemfile mix.exs 2>/dev/null
Detection rules:
| Found | Project Type | Reason |
|---|---|---|
package.json | Existing (Node.js) | npm/yarn/pnpm project |
pyproject.toml or requirements.txt | Existing (Python) | Python project |
Cargo.toml | Existing (Rust) | Rust project |
go.mod | Existing (Go) | Go module |
pom.xml or build.gradle | Existing (Java) | Maven/Gradle project |
build.sbt | Existing (Scala) | SBT project |
composer.json | Existing (PHP) | PHP project |
Gemfile | Existing (Ruby) | Ruby project |
mix.exs | Existing (Elixir) | Elixir project |
src/ or app/ directory with code | Existing | Has source code |
specs/ folder already exists | Existing | Previous Ralph setup |
| None of the above | New Project | Empty or minimal directory |
Tell the user what you detected:
Then proceed with the appropriate mode.
Read the package manager file to detect:
Briefly explore file structure to understand patterns. Tell the user what you found.
Ask ONE question at a time using AskUserQuestion:
For each topic, create specs/[topic].md using this template:
# [Topic Name]
## Overview
[Brief description of what this feature does]
## Requirements
- [Requirement 1]
- [Requirement 2]
## Acceptance Criteria
- [ ] [Testable criterion 1]
- [ ] [Testable criterion 2]
## Files Likely Affected
- [path/to/file1.ts]
- [path/to/file2.py]
## Out of Scope
- [What this spec does NOT cover]
Ask user to confirm each spec before creating the next.
Spec Scoping Test: "One Sentence Without 'And'"
Before creating a spec, validate its scope:
If you need "and" to connect unrelated capabilities, it's multiple specs.
Copy the template files from this skill's files/ directory:
mkdir -p specs specs/archived
Create loop.sh with content from files/loop.sh.
Create AGENTS.md using detected build commands.
Create PROMPT_plan.md from files/PROMPT_plan.md, replacing [project-specific goal].
Create PROMPT_build.md from files/PROMPT_build.md.
Make loop.sh executable: chmod +x loop.sh
Ask ONE question at a time:
If cloning: Ask for the URL, then use WebFetch to analyze:
For each topic, create specs/[topic].md:
# [Topic Name]
## Overview
[Brief description]
## Requirements
- [Requirement 1]
- [Requirement 2]
## Acceptance Criteria
- [ ] [Testable criterion]
- [ ] [Testable criterion]
## Out of Scope
- [What this doesn't cover]
If cloning a website, also create:
specs/design-system.md with colors, typography, spacingspecs/[section].md for each section to replicateAsk user to confirm each spec.
Spec Scoping Test: "One Sentence Without 'And'"
Before creating a spec, validate its scope:
If you need "and" to connect unrelated capabilities, it's multiple specs.
mkdir -p specs specs/archived src
Create files same as Mode A, but with the user's chosen tech stack commands.
List created files:
ls -la specs/
ls -la *.md loop.sh
Tell the user:
Ralph setup complete!
Created:
- specs/[list specs]
- AGENTS.md
- PROMPT_plan.md
- PROMPT_build.md
- loop.sh
Next steps:
1. Exit Claude Code (type: exit)
2. Run planning phase: ./loop.sh plan 3
3. Review the generated IMPLEMENTATION_PLAN.md
4. Run build phase: ./loop.sh 30
The loop will iterate until completion. Each iteration:
- Reads specs/* for requirements
- Checks IMPLEMENTATION_PLAN.md for progress
- Implements the next item
- Commits changes
- Repeats
Tip: Use specs/archived/ for completed features to keep active specs focused.
The following files are templates to copy into the user's project:
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub shipdeckai/claude-skills --plugin ralph-wiggum