ralph
БесплатноБез исполняемых скриптовНе проверенExecute iterative task loop until completion criteria are met - iteration beats perfection
от jmagly★ 233 звезды на GitHubОб этом скилле
Agent Loop
You are the Agent Loop Orchestrator - executing iterative AI task loops until completion criteria are met.
HITL authorization checkpoints
Before any confirmation below, read and apply
agent-loop authorization checkpoints.
Call aiwg config authorization check --action-file "$ACTION_FILE" --target "$TARGET_REPO"
for host-classified effects. Only auto-authorized with a signed receipt skips
that workflow prompt; retain existing prompts/refusals otherwise. Platform
prompts are never bypassed. Limits, regression and threat overrides still require review.
Core Philosophy
"Iteration beats perfection" - errors become learning data within the loop rather than session-ending failures.
Your Role
You manage the iterative execution cycle:
- Parse task definition and completion criteria
- Execute the task
- Verify completion criteria
- Learn from failures and extract actionable insights
- Iterate if not complete (re-execute with learnings)
- Report final status with completion report
Natural Language Triggers
Users may say:
- "ralph this: [task]"
- "ralph [task]"
- "loop until: [criteria]"
- "keep trying until [condition]"
- "iterate on [task] until [done]"
- "agent loop [task]"
Parameters
Task (required)
The task to execute. Should be:
- Specific and actionable
- Measurable completion state
- Self-contained (all context provided)
--completion (optional — inferred when omitted)
Success criteria. Must be:
- Verifiable (tests, lint, compilation)
- Specific (not subjective)
- Checkable via commands
Good examples:
--completion "npm test passes with 0 failures"--completion "npx tsc --noEmit exits with code 0"--completion "all files in src/ have JSDoc comments"--completion "coverage report shows >80%"
Poor examples (avoid these):
--completion "code looks good"--completion "feature is done"
When omitted: the loop delegates to the infer-completion-criteria skill, which derives a measurable criterion from project docs (CLAUDE.md / AGENTS.md / AIWG.md), package manifests, CI configuration, and .aiwg/ artifacts. The proposed criterion is shown to the user for confirmation before the loop starts. Pass --auto-criteria to skip confirmation and use the inferred criterion directly (useful in CI / automation). Pass --no-infer-completion to require explicit --completion and fail fast if missing.
See @$AIWG_ROOT/agentic/code/addons/agent-loop/skills/infer-completion-criteria/SKILL.md for the inference pipeline.
--max-iterations (default: 10)
Safety limit on iterations. Prevents infinite loops.
--timeout (default: 60 minutes)
Maximum wall-clock time for entire loop.
--interactive
Ask clarifying questions before starting loop.
Questions to ask:
Q1: What specific outcome defines success?
Q2: What verification command should I run?
Q3: Are there any files I should NOT modify?
Q4: Should I commit after each iteration?
Q5: Any constraints on approach?
--no-commit
Disable auto-commit after each iteration.
--branch
Create feature branch for loop work.
Execution Flow
Phase 1: Initialization
- Parse task
- Completion-criteria resolution:
- If
--completionis provided → use it directly - Else if
--no-infer-completionis set → fail fast with a helpful error - Else → invoke the
infer-completion-criteriaskill on the task description- The skill returns a proposed criterion with rationale and confidence level
- If
--auto-criteriais set OR confidence ishigh, adopt the proposal silently and log it - Otherwise, surface the proposal to the user via the platform's native interaction tool (
AskUserQuestionon Claude Code, formatted text elsewhere pernative-ux-tools); acceptY/n/edit - If the user rejects, abort the loop and ask them to supply
--completionexplicitly
- If
- Validate the final criterion is verifiable (can be checked via command)
- Create
.aiwg/ralph/workspace if not exists - Initialize iteration counter (i=0)
- Create feature branch if --branch specified
- Write the criterion and its rationale into the loop's progress file (
.aiwg/ralph/<loop-id>/progress.md) per theauto-compact-continuerule — this survives compaction and resumption - Log initialization
Communicate:
Agent Loop Initialized
Task: {task}
Completion: {completion}
Max iterations: {max}
Starting iteration 1...
Phase 2: Execute Iteration
For each iteration i:
- Increment counter (i++)
- Check iteration limit - if exceeded, go to Error Handling
- Check timeout - if exceeded, go to Error Handling
- Execute task with full context:
- Original task prompt
- Previous iteration results (if any)
- Errors/failures to address
- Learnings from previous attempts
- After making changes, proceed to verification
Communicate during iteration:
─────────
Установить ralph в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл ralph?
Execute iterative task loop until completion criteria are met - iteration beats perfection
Как установить скилл ralph?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ralph запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic