ralph

Uzaaft's avatarfrom Uzaaft

Autonomous task loop that picks ready tasks, implements them in new threads, commits, and repeats. Use when asked to "ralph", "use a ralph loop", or "ralph this".

⭐2stars🔀0forks📁View on GitHub🕐Updated Jan 9, 2026

When & Why to Use This Skill

The Ralph Loop is a sophisticated autonomous task execution skill designed to streamline software development workflows. It enables Claude to operate as a self-driven agent that independently manages a repository's task backlog. By automatically selecting 'ready' tasks, implementing code changes in isolated threads, and committing progress, it minimizes manual intervention and maximizes development velocity. This skill is ideal for developers looking to automate repetitive coding cycles, technical debt reduction, and continuous feature implementation.

Use Cases

  • Autonomous Backlog Processing: Automatically pick up and implement a series of prepared tasks from a project's task list, handling the entire lifecycle from implementation to commit.
  • Continuous Technical Debt Reduction: Deploy the loop to systematically identify and fix linting warnings, refactor legacy modules, and address TODOs discovered during the development process.
  • Automated Test Coverage Improvement: Use the agent to proactively discover missing test cases or failing tests and implement the necessary fixes and new test suites in a continuous cycle.
  • Scalable Repository Maintenance: Efficiently manage large-scale codebase updates by allowing the agent to handle independent, modular tasks across different threads, ensuring context continuity and clean commits.
nameralph
descriptionAutonomous task loop that picks ready tasks, implements them in new threads, commits, and repeats. Use when asked to "ralph", "use a ralph loop", or "ralph this".

Ralph Loop

Autonomous task execution loop for this repository.

Workflow

  1. Check for ready tasks

    task_list action: "list", repoURL: "<repo-url>", ready: true
    
  2. If no ready tasks: Stop and report "Ralph complete - no ready tasks remaining."

  3. If ready tasks exist:

    • Pick the task most relevant to what was just completed (prefer related functionality, same module/area, or dependent work over unrelated tasks)
    • If no prior context or unclear relevance, pick the first ready task
    • Use the handoff tool with goal: "Implement and verify task [task-id]: [task-title]. [task-description]. When complete, consider if any learnings from this task should be added to AGENTS.md to improve future performance (e.g., common patterns, gotchas, useful commands). Then commit the changes with the commit-messages skill and invoke the ralph skill to continue the loop."

Task Discovery

While working, liberally create new tasks when you discover:

  • Failing tests or test gaps
  • Code that needs refactoring
  • Missing error handling
  • Documentation gaps
  • TODOs or FIXMEs in the code
  • Build/lint warnings
  • Performance issues
  • Any other issues worth addressing

Use task_list action: "create" to add these immediately. Set appropriate dependsOn relationships. Don't wait—capture issues as you find them.

Important

  • Always pass ready: true when listing tasks to only get tasks with satisfied dependencies
  • The handoff goal must include instructions to commit and re-invoke ralph
  • Each iteration runs in a fresh thread to maintain clean context
  • Prefer tasks in the same area/module as the just-completed work for better context continuity