Back to Skills

ralph-github-start-loop

verified

Runs autonomous loop fetching stories from GitHub Issues. Implements and closes issues as done. Triggers on "loop through my PRDs", "work on my issues", "start the autonomous loop", "implement my PRDs", or requests to work through GitHub issues autonomously.

View on GitHub

Marketplace

richtabor

richtabor/agent-skills

Plugin

rt

productivity

Repository

richtabor/agent-skills
42stars

skills/ralph-github-start-loop/SKILL.md

Last Verified

February 1, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/richtabor/agent-skills/blob/main/skills/ralph-github-start-loop/SKILL.md -a claude-code --skill ralph-github-start-loop

Installation paths:

Claude
.claude/skills/ralph-github-start-loop/
Powered by add-skill CLI

Instructions

# Loop GitHub Issues

Run the autonomous loop to execute features from GitHub Issues.

## Usage

```
/loop-github-issues              # Interactive: shows available PRDs and asks which to run
/loop-github-issues --all        # Run all available PRDs (no prompt)
/loop-github-issues auth-flow    # Run PRDs matching search term
/loop-github-issues 25           # Run with 25 iterations per PRD
/loop-github-issues --all 25     # Run all PRDs with 25 iterations each
```

When running non-interactively (background mode), `--all` is auto-enabled.

## Prerequisites

- `gh` CLI authenticated
- PRD issues created via `/ralph-github-create-issues` (reads from `.claude/plans/` or `prds/`)

**Note:** Assume gh extensions are installed. Do NOT try to install them.

## Process

1. Check prerequisites (`gh auth status`)
2. Run the script directly - it handles PRD selection and filtering:

```bash
~/.claude/skills/loop-github-issues/loop-github-issues.sh [iterations] [prd-search-term] [--all]
```

Use `run_in_background: true` to prevent timeout.

**Monitoring progress:**
- Local status: `cat /tmp/ralph-status-{repo}-{prd-number}.txt`
- GitHub: Comments are posted to the PRD issue as stories complete

**Important**: Don't list PRDs separately before running - the script shows available PRDs (excluding those with open PRs) and handles selection.

### What It Does

1. Lists open PRD issues (identified by `prd` label) that don't already have open PRs
2. Prompts user to select which PRD(s) to work on (or auto-selects in background mode)
3. For each selected PRD:
   - Assigns issue to current user (shows as in progress)
   - Creates git worktree at `../{repo}-{feature}/`
   - For each iteration:
     - Passes all open sub-issues to the agent
     - Agent picks the logical next story based on dependencies
     - Implements the story
     - Commits: `feat: Story Title (closes #XXX)`
     - Closes sub-issue with link to commit
   - When all sub-issues closed, creates PR (parent PRD closes on

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3422 chars