Token导航 LogoToken导航TokenDH.com
开发执行命令github未标认证来源可访问许可证需确认审计提醒

setup-ralph-loop设置拉尔夫循环

Agent Skill

setup-ralph-loop 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

214

周安装

9

GitHub Stars

1

下载量

75
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:setup-ralph-loop(设置拉尔夫循环)
来源仓库:https://github.com/chrislacey89/skills
仓库路径:skills/setup-ralph-loop
安装命令:
npx skills add https://github.com/chrislacey89/skills --skill setup-ralph-loop
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/chrislacey89/skills --skill setup-ralph-loop

简介

提供 Ralph 循环任务调度与批处理作业配置支持。

  • 适用于 Codex、Claude、Cursor、Gemini CLI 中需要定时或事件驱动处理的场景。
  • 通过 npx skills add 命令从 chrislacey89/skills 仓库安装。
  • 可能创建后台进程或守护线程,应监控系统负载和资源泄漏。
  • 建议设置超时机制和重试策略,提高任务鲁棒性。

SKILL.md

Setup Ralph Loop

Create the local scripts and repo conventions needed to run Ralph safely.

Invocation Position

This is an infrastructure skill, not a normal feature-delivery stage.

Use /setup-ralph-loop when a project wants to run /execute in a repeatable HITL-to-AFK loop.

Auto-invocation: /execute automatically invokes this skill when it detects multi-slice GitHub-issue work (PRD, big-batch appetite, or multiple user stories) and no ralph-once.sh or ralph.sh exists in the repo root. This means the skill may be entered without the user explicitly calling it — the detection and invocation happen as a prerequisite step inside /execute.

Do not use it as part of the default feature pipeline. It prepares the repo so later /execute execution can run under Ralph with bounded iterations, explicit feedback loops, and durable GitHub-backed state.

What This Sets Up

  • ralph-once.sh for one-iteration HITL Ralph
  • ralph.sh for bounded AFK Ralph runs
  • Optional package.json scripts for convenient invocation
  • Repo-local loop prompts that tell Ralph to prefer the highest-risk unblocked slice, run feedback loops, and stop when work is done

Rules Before Setup

  • Ralph is an execution mode for /execute, not a separate workflow.
  • Start with HITL Ralph first. Only go AFK after the prompt, feedback loops, and quality bar are behaving well.
  • Ralph's durable progress state in this workflow lives in GitHub issues, issue comments, and commits — not in progress.txt or other local task-state files.
  • Each iteration should implement exactly one reviewable slice.
  • Every AFK loop must be bounded. Do not generate an infinite loop.

Steps

1. Confirm task source and state model

Ask where Ralph should read work from.

Prefer this order:

  1. GitHub issues with dependency relationships
  2. Another durable backlog system the repo actually uses
  3. A temporary fallback file only if the user explicitly wants it

If the repo uses GitHub issues, keep Ralph GitHub-native:

  • open PRD issues define the end state
  • slice issues define the current work queue
  • issue comments carry exact errors or partial-progress context
  • commits are the execution log

Do not introduce progress.txt as durable state unless the user explicitly chooses to deviate from the repo's GitHub-first model.

2. Detect feedback loops

Inspect the target repo before generating scripts.

Check for available commands in package.json or equivalent tooling:

  • typecheck
  • test
  • lint
  • build

Also note whether the repo already has:

  • /setup-pre-commit
  • container or sandbox tooling
  • GitHub CLI configured

The generated Ralph prompt should only name feedback loops that actually exist.

3. Detect execution environment

Ask whether Ralph should run:

  • in the current repo shell
  • in a sandboxed shell or container
  • through an existing task runner such as pnpm

Default recommendation:

  • HITL first in the current repo
  • AFK in a sandboxed or isolated environment when possible

4. Generate ralph-once.sh

Create a one-iteration script for supervised use first.

The script should:

  • run exactly one Ralph iteration
  • point Ralph at the task source
  • tell Ralph to pick the highest-risk unblocked slice, not just the first issue
  • tell Ralph to use /execute
  • tell Ralph to run the repo's real feedback loops
  • tell Ralph to stop after one reviewable slice

Suggested shape:

#!/bin/bash
set -e

claude --message "Look at the open GitHub issues. Pick the highest-risk unblocked issue that still needs implementation, respecting blocking relationships. Use /execute to implement exactly one reviewable slice. Run the repo's feedback loops. If all issue work is complete, say DONE and stop."

Adapt the prompt to the actual task source and available commands.

5. Generate ralph.sh

Create a bounded AFK loop.

The script must:

  • require an iteration count argument
  • fail fast if no argument is given
  • run one iteration per loop
  • avoid while true
  • keep the same task-picking logic as ralph-once.sh

Suggested shape:

#!/bin/bash
set -e

if [ -z "$1" ]; then
  echo "Usage: $0 <iterations>"
  exit 1
fi

for ((iteration=1; iteration<=$1; iteration++)); do
  claude --message "Look at the open GitHub issues. Pick the highest-risk unblocked issue that still needs implementation, respecting blocking relationships. Use /execute to implement exactly one reviewable slice. Run the repo's feedback loops. If all issue work is complete, say DONE and stop."

  echo "Ralph iteration $iteration complete."
done

If the user wants, also add convenience scripts to package.json, for example:

{
  "scripts": {
    "ralph:once": "./ralph-once.sh",
    "ralph": "./ralph.sh 5"
  }
}

Use a small default iteration count if adding a package script.

6. Encode the quality bar explicitly

Make sure the generated loop prompt states the repo's quality expectations clearly.

The prompt should say Ralph must:

  • implement one reviewable slice at a time
  • run feedback loops each iteration
  • avoid silent scope changes
  • prefer risky slices early when unblocked
  • leave exact error output in issue comments when blocked
  • stop and escalate after repeated failure instead of retrying forever
  • stop and escalate after repeated non-progress (plateau), not just repeated failure — non-progress means two consecutive iterations on the same slice where no unmet acceptance criterion, failing check, or unresolved unknown transitioned to resolved; one recovering iteration resets the counter. See /execute "AFK progress and plateau detection" and references/SYSTEM-OVERVIEW.md (bundled alongside this skill) for the full rule.

If the repo is clearly long-lived production code, say so explicitly in the prompt.

7. Verify the generated setup

Check:

  • ralph-once.sh exists and is executable
  • ralph.sh exists and is executable
  • package.json scripts were added correctly, if requested
  • the generated prompt references the real task source
  • the generated prompt references only real feedback loops
  • no progress.txt was introduced unless the user explicitly asked for it

On completion: Create the Ralph marker so enforcement hooks know setup was done.

mkdir -p "$CLAUDE_PROJECT_DIR/.claude" && touch "$CLAUDE_PROJECT_DIR/.claude/.ralph-checked"

8. Recommend first usage

Instruct the user to:

  1. run ./ralph-once.sh first
  2. review the result
  3. refine the prompt if task selection or quality is off
  4. only then run bounded AFK Ralph such as ./ralph.sh 5

Verification

Before considering setup complete, check:

  • Ralph has a HITL entrypoint
  • Ralph has a bounded AFK entrypoint
  • The AFK loop does not run infinitely
  • Task selection is risk-first, not just list-order-first
  • The prompt uses /execute
  • The prompt names real feedback loops from the repo
  • Durable state remains GitHub-native unless the user explicitly chose otherwise

Handoff

  • Expected input: a repo that wants repeatable Ralph execution around /execute
  • Produces: working Ralph loop scripts and repo-local conventions for HITL-first, bounded AFK execution
  • Supports downstream: /execute, /pre-merge, and GitHub-issue-based execution by making AFK work safer and more repeatable
  • What comes next: return to normal feature work, first by trying ralph-once.sh, then by using bounded AFK Ralph when the setup proves reliable

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.88%
按下载量换算28

Claude

32.86%
按下载量换算25

Cursor

17.23%
按下载量换算13

Gemini CLI

8.74%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/chrislacey89/skills --skill setup-ralph-loop 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills