
ralph-loop-template
Generate an iterable checklist PROMPT file for Ralph Loop from a plan file or the current conversation, and output the ready-to-run /ralph-loop command.
- Installs
- 70
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/2ykwang/agent-skills --skill ralph-loop-template- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads ralph-loop-template automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Ralph Loop Template
Input
$ARGUMENTS
Instructions
Step 1: Gather Plan
If an argument is provided: Read the file to understand the plan content.
If no argument: Search for a plan in the following order:
- Search for plan files in the project root:
PLAN.md,plan.md,PLAN-*.md,plan-*.md,TODO.md,prd.md,PRD.md- 1 found → Use it (inform the user which file was detected)
- Multiple found → Present the list and ask for selection
- 0 found → Proceed to next step
- Use the plan discussed in the current conversation context.
- If no plan exists in the conversation context, ask the user to describe the plan.
Step 2: Identify Project Environment
Collect project-specific information to embed in the PROMPT file.
Search for agent/project configuration files in the following priority order:
CLAUDE.md(Claude Code).cursorrules(Cursor).windsurfrules(Windsurf)AGENTS.md,COPILOT.md,GEMINI.md
If a config file is found, extract:
- Verification commands: Combine build, test, lint into a single chain (e.g.,
npm run lint && npm run build && npm test) - Key code style rules (items to insert into the PROMPT's absolute rules
{AGENT_RULES}, max 3)
If no config file is found: Infer from project structure:
package.json→ npm/yarn commandsMakefile/Justfile→ make/just commandsCargo.toml→ cargo commandspyproject.toml/setup.py→ python toolchain- If undetectable, ask the user for build/test commands
Step 3: Analyze Plan
Extract the following from the plan:
- Goal: What is being built
- Non-goals: What will NOT be done in this task (to prevent Feature Invention)
- Phase list: Ordered implementation steps
- Key content per phase: Files to change, implementation details
- Reference docs/files: Pattern references, design document paths
- Completion criteria: Criteria for determining the entire task is complete
Completion criteria must be mechanically verifiable (e.g., command execution returns exit code 0). Do not use subjective criteria like "works well" or "looks clean".
Step 4: Phase Splitting
Split the plan into phases suitable for Ralph Loop iterations.
Splitting principles:
- One iteration = exactly one phase. Two phases in one iteration means a verification failure can't be traced to the phase that caused it, and the next iteration resumes from an unclear state.
- When a phase is completed, immediately end the iteration. The next phase is handled in the next iteration.
- Each phase must be the minimum unit that can independently pass verification.
- Split phases that are too large, merge phases that are too small.
Size guideline (reference, not absolute):
- If description needs 3+ sentences → candidate for splitting
- If it's a single-line change to one file → candidate for merging with adjacent phase
- The appropriate size is one the agent can implement + verify within a single context
max-iterations calculation: number of phases + 2
- +1: Buffer for automatic retry on verification failure
- +1: Buffer for promise output iteration after final phase completion
Step 5: Generate PROMPT File
Use references/prompt-template.md as the base template and references/iteration-procedure.md as the iteration procedure block to generate the PROMPT file.
Create a PROMPT-{kebab-case-name}.md file in the project root.
Placeholder mapping:
| Placeholder | Source | Fallback |
|---|---|---|
{goal title} | Step 3 | Ask user |
{project name} | Project directory name or CLAUDE.md | Ask user |
{goal} | Step 3 | Ask user |
{AGENT_RULES} | Step 2 (agent config rules) | Omit entire line if no config file |
{non-goals} | Step 3 + non-goal writing rules for inference | Min 2 items |
{reference doc rows} | Step 2-3 | Omit entire reference docs section if 0 docs |
{iteration procedure} | Entire references/iteration-procedure.md | — |
{checklist} | Step 4 phase splitting result | — |
{verification command} | Step 2 (project detection) | Ask user |
{COMPLETION_PROMISE} | COMPLETION_PROMISE generation rules | — |
Note: Example text that uses curly braces (such as the recording format for out-of-scope findings) should be left as-is without substitution.
Step 6: Output Result
Provide the generated PROMPT file path and output the /ralph-loop command in the following format:
### Generated File
`{PROMPT file path}`
> Review the generated PROMPT file before execution. Check the verification commands and phase structure in particular.
### Ralph Loop Execution Command
/ralph-loop "Read {PROMPT file path} and implement the next unchecked phase. Always read the file first to find the first phase with [ ] items." --max-iterations {number of phases + 2} --completion-promise "{COMPLETION_PROMISE}"
Output the command block above so it can be copied and used directly.
Generation Rules
Checklist Writing Rules
- Phase = iteration unit: A single
### Phase Nblock is processed in one iteration - Sub-items = detailed tasks within a phase: Place 2-5
- [ ]sub-items under each Phase - Sub-items should specify files to change and implementation details
- Verification is not a checklist item — it runs automatically in STEP 4 of the iteration procedure. Use the project's build/test commands detected in Step 2
Non-Goal Writing Rules
In addition to items explicitly excluded by the plan, infer and add:
- Refactoring outside the plan's scope
- Unrequested test/documentation/configuration changes
- Existing API or interface changes (if not specified in the plan)
COMPLETION_PROMISE Generation Rules
- Uppercase English, space-separated
- Briefly summarize the goal (e.g., "HELP OVERLAY COMPLETE", "AUTH REFACTOR DONE")
FAQ
What does the ralph-loop-template skill do?
Generate an iterable checklist PROMPT file for Ralph Loop from a plan file or the current conversation, and output the ready-to-run /ralph-loop command.
How do I install ralph-loop-template?
Run npx skills add https://github.com/2ykwang/agent-skills --skill ralph-loop-template in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/ralph-loop-template/ (personal) or .claude/skills/ralph-loop-template/ (project).
Which AI agents can use ralph-loop-template?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is ralph-loop-template safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains ralph-loop-template?
It is published by 2ykwang in 2ykwang/agent-skills. It has 70 recorded installs.
More from 2ykwang/agent-skills
html-visual
2ykwang/agent-skills
Generate an interactive single-file HTML visualization — mockup, wireframe, ERD, flowchart, chart, slides, architecture diagram, dashboard, timeline, mindmap, kanban, or table. Use when the user wants something rendered rather than described: a UI mockup or wireframe, a database schema as an ERD, business logic as a flowchart, data as a chart, or content as slides. Also use when they point at a file (schema, spec, data) and ask to see it visualized.
write-pr
2ykwang/agent-skills
Draft a pull request title and body from the current branch's diff and commit history, following the project's PR template and title conventions. Use when the user is about to open a PR and wants ready-to-paste content, or asks to write, draft, or fill in a PR description. Read-only — never opens or pushes the PR.
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available