ralph
БесплатноЗапускает вложенные скриптыНе проверенAutonomous feature development - setup and execution. Triggers on: ralph, set up ralph, run ralph, run the loop, implement tasks. Two phases: (1) Setup - chat…
от ampcode★ 76 звёзд на GitHubОб этом скилле
Ralph Feature Setup
Interactive feature planning that creates ralph-ready tasks with dependencies.
Before using the task-store commands below, resolve the helper once:
RALPH_SKILL_URL="$(amp skill info ralph | sed -n 's/^Path: //p')"
RALPH_SKILL_PATH_ENCODED="${RALPH_SKILL_URL#file://}"
RALPH_SKILL_PATH="$(printf '%b' "${RALPH_SKILL_PATH_ENCODED//%/\\x}")"
RALPH_TASKS="$RALPH_SKILL_PATH/scripts/ralph-tasks"
The Job
Two modes:
Mode 1: New Feature
- Chat through the feature - Ask clarifying questions
- Break into small tasks - Each completable in one iteration
- Create tasks with
"$RALPH_TASKS"- Parent + subtasks withdependsOn - Set up ralph files - Save parent ID, reset progress.txt
Mode 2: Existing Tasks
- Find existing parent task - Search or let user specify
- Verify structure - Check subtasks have proper
dependsOn - Set up ralph files - Save parent ID to parent-task-id.txt
- Show status - Which tasks are ready, completed, blocked
Ask the user which mode they need:
Are you:
1. Starting a new feature (I'll help you plan and create tasks)
2. Using existing tasks (I'll set up Ralph to run them)
Step 1: Understand the Feature
Start by asking the user about their feature. Don't assume - ASK:
What feature are you building?
Then ask clarifying questions:
- What's the user-facing goal?
- What parts of the codebase will this touch? (database, UI, API, etc.)
- Are there any existing patterns to follow?
- What should it look like when done?
Keep asking until you have enough detail to break it into tasks.
Step 2: Break Into Tasks
Each task must be completable in ONE Ralph iteration (~one context window).
Ralph spawns a fresh Amp instance per iteration with no memory of previous work. If a task is too big, the LLM runs out of context before finishing.
Right-sized tasks:
- Add a database column + migration
- Create a single UI component
- Implement one server action
- Add a filter to an existing list
- Write tests for one module
Too big (split these):
- "Build the entire dashboard" → Split into: schema, queries, components, filters
- "Add authentication" → Split into: schema, middleware, login UI, session handling
- "Refactor the API" → Split into one task per endpoint
Rule of thumb: If you can't describe the change in 2-3 sentences, it's too big.
Step 3: Order by Dependencies
Tasks execute based on dependsOn. Earlier tasks must complete before dependent ones start.
Typical order:
- Schema/database changes (migrations)
- Server actions / backend logic
- UI components that use the backend
- Integration / E2E tests
Use dependsOn to express this:
Task 1: Schema (no dependencies)
Task 2: Server action (dependsOn: [task-1])
Task 3: UI component (dependsOn: [task-2])
Task 4: Tests (dependsOn: [task-3])
Parallel tasks that don't depend on each other can share the same dependency.
Step 4: Create Tasks
First, create the parent task:
FEATURE_JSON=$("$RALPH_TASKS" init-feature --json \
--title "[Feature Name]" \
--description "[One-line description of the feature]")
PARENT_TASK_ID=$(printf '%s\n' "$FEATURE_JSON" | grep -o '"id":"[^"]*"' | head -n1 | cut -d'"' -f4)
Save the returned task ID - you'll need it for subtasks.
Then, create subtasks with --feature and --depends-on:
cat <<'EOF' | "$RALPH_TASKS" add-task \
--feature "$PARENT_TASK_ID" \
--title "[Task title - action-oriented]" \
--description-file - \
--depends-on "<previous-task-id>"
[Detailed description with:
- What to implement
- Files to create/modify
- Acceptance criteria
- How to verify (typecheck, tests, browser)]
EOF
Omit --depends-on for the first task. Repeat it for multiple dependencies.
Task description format:
Write descriptions that a future Ralph iteration can pick up without context:
Implement category name to ID mapping for expenses.
**What to do:**
- Create function mapExpenseCategoryNameToId(name, isChildExpense)
- Query item_category table with category_type filter
- Add alias mapping for common synonyms (rent → Rent or Mortgage)
**Files:**
- workflows/tools/upsert-expense.ts
**Acceptance criteria:**
- Function returns category ID for valid names
- Returns null for unknown categories
- npm run typecheck passes
**Notes:**
- Follow pattern from upsert-income.ts
- EXPENSE type for family, CHILD_EXPENSE for child
Step 5: Set Up Ralph Files
After creating all tasks, run the shared setup steps from "Final Setup (Required for Both Modes)" section.
This ensures:
- Parent task ID is saved to
scripts/ralph/parent-task-id.txt - Previous progress.txt is archived if it has content
- Fresh progress.txt is created with Codebase Patterns preserved
Step 6: Confirm Setup
Show the user what was created:
✅ Ralph is ready!
**Parent task:** [title] (ID: [id])
**Subtasks:**
1. [Task 1 title] - no depe
Установить ralph в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл ralph?
Autonomous feature development - setup and execution. Triggers on: ralph, set up ralph, run ralph, run the loop, implement tasks. Two phases: (1) Setup - chat through feature, create tasks with dependencies (2) Loop - pick ready tasks, implement, commit, repeat until done.
Как установить скилл ralph?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ralph запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
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