Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

ralph

БесплатноБез исполняемых скриптовНе проверен

Agent-agnostic autonomous loop creator. Use when asked to 'use ralph', 'ralph this', 'reverse ralph', 'decompose a feature', or '/ralph decompose'. Forward…

diegosouzapwот diegosouzapw★ 68 звёзд на GitHub

Об этом скилле

Ralph - Agent-Agnostic Autonomous Loop Creator

Ralph creates autonomous coding loops that implement features by breaking them into small user stories and completing them one at a time. Each iteration spawns a fresh headless agent with clean context. Memory persists via git, progress.txt, and prd.json. Ralph is not tied to any single AI agent — the user chooses which agent and model powers each loop.

Workflow

Step 1: Understand the Feature

If the user tagged a markdown file via @, read it as the feature spec. Otherwise, ask the user to describe the feature.

Ask clarifying questions if needed:

  • What problem does this solve?
  • What are the key user actions?
  • What's out of scope?
  • How do we know it's done?

Step 2: Configure the Loop

Ask the user four questions to configure the loop:

2a. Which AI agent?

Present this list and ask the user to choose:

  1. claude — Claude Code
  2. droid — Factory Droid
  3. codex — OpenAI Codex
  4. opencode — OpenCode
  5. gemini — Gemini CLI
  6. copilot — GitHub Copilot
  7. cc-compatible — Claude Code-compatible binary (user provides binary name, e.g., zai, minimax, kimi)
  8. custom — Fully custom command (user provides entire command template with $PROMPT_FILE as placeholder)

Headless command templates per agent (used when generating the loop script):

# claude — Claude Code
claude -p "$(cat "$PROMPT_FILE")" --dangerously-skip-permissions --model $MODEL

# droid — Factory Droid
droid exec --skip-permissions-unsafe -f "$PROMPT_FILE" --output-format text -m $MODEL

# codex — OpenAI Codex
codex exec --yolo -m $MODEL "$(cat "$PROMPT_FILE")"

# opencode — OpenCode
opencode run --yolo -m $MODEL "$(cat "$PROMPT_FILE")"

# gemini — Gemini CLI
gemini -p "$(cat "$PROMPT_FILE")" --yolo -m $MODEL

# copilot — GitHub Copilot
copilot -p "$(cat "$PROMPT_FILE")" --yolo --model $MODEL

# cc-compatible — Same as Claude Code with user-provided binary name
$BINARY -p "$(cat "$PROMPT_FILE")" --dangerously-skip-permissions --model $MODEL

# custom — User provides entire command template
# User's template must include $PROMPT_FILE where the prompt file path should go

If the user selects cc-compatible, ask for the binary name (e.g., zai). If the user selects custom, ask for the full command template and instruct them to use $PROMPT_FILE where the prompt file path belongs.

2b. Which model?

Ask the user for the model identifier (free text input). Examples:

  • Claude Code: opus, claude-opus-4-6, sonnet, claude-sonnet-4-5-20250929
  • Factory Droid: claude-opus-4-6, o3
  • OpenAI Codex: o3, o4-mini
  • OpenCode: anthropic/claude-opus-4-6, openai/o3 (format: provider/model)
  • Gemini CLI: gemini-2.5-pro, gemini-2.0-flash
  • GitHub Copilot: claude-sonnet-4-5, gpt-4o

If the user says "default" or leaves it blank, omit the model flag entirely (use the agent's built-in default).

2c. Loop name?

Suggest a name based on the feature in kebab-case (e.g., add-task-priorities). The user can accept or provide a different name. This becomes the filename: .ralph/<loop-name>.sh

2d. Auto-push and create PR?

Ask the user: "Should Ralph automatically push the branch and create a PR when the loop finishes?"

  • Yes — When the loop ends (all stories complete or max iterations reached), the script will push the branch to origin and create a pull request via gh pr create. The base branch (e.g., main or master) is auto-detected at generation time by checking which branch exists on the remote.
  • No — The script only runs locally. All commits stay local. The user pushes and creates PRs themselves.

If the user says yes, detect the base branch now (at generation time) by checking:

  1. Does refs/remotes/origin/main exist? → use main
  2. Does refs/remotes/origin/master exist? → use master
  3. Neither → default to main

Bake the resolved base branch directly into the generated script as DEFAULT_BRANCH="main" (or "master").

Step 3: Create prd.json

Generate a prd.json file in the project root:

{
  "project": "[Project Name]",
  "branchName": "ralph/[feature-name-kebab-case]",
  "description": "[Feature description]",
  "userStories": [
    {
      "id": "US-001",
      "title": "[Story title]",
      "description": "As a [user], I want [feature] so that [benefit]",
      "acceptanceCriteria": [
        "Criterion 1",
        "Criterion 2",
        "Typecheck passes"
      ],
      "priority": 1,
      "passes": false,
      "notes": ""
    }
  ]
}

Step 4: Generate and Run the Loop

  1. Create .ralph/ directory in the project root if it doesn't exist
  2. Check .gitignore — add .ralph/, .ralph-archive/, and .ralph-last-branch if missing (create .gitignore if it doesn't exist)
  3. Read scripts/ralph.sh (the reference template in this skill) to understand the loop structure
  4. Generate .ralph/<loop-name>.sh using the reference template's structure, with
Полный SKILL.md на GitHub

Установить ralph в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

metadata.json

FAQ

Что делает скилл ralph?

Agent-agnostic autonomous loop creator. Use when asked to 'use ralph', 'ralph this', 'reverse ralph', 'decompose a feature', or '/ralph decompose'. Forward mode implements features end-to-end; decompose mode breaks existing features into atomic user stories for reimplementation.

Как установить скилл ralph?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл ralph запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить ralph с