From research-skills
Autonomous loop iteration toward a desired state. You are inside a ralph loop — your spec is in the system prompt. Survey, contribute, update state discoverably, exit. Activated automatically inside ralph loops. Triggers: "ralph-loops", "ralph", "ralph loop", "iterate", "autonomous loop".
npx claudepluginhub cailmdaley/skills --plugin research-skillsThis skill uses the workspace's default tool permissions.
You are inside a loop. Your spec is in the system prompt above. Each iteration: survey freely, work substantially, update state discoverably, exit.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
You are inside a loop. Your spec is in the system prompt above. Each iteration: survey freely, work substantially, update state discoverably, exit.
kill $PPIDCRITICAL: Exit before compaction. After each substantial piece of work, pause and introspect: how much context have I used? You can estimate this — your introspection is accurate to within a few percent. If you feel past 50%, wrap up and exit. The trap is getting locked into task after task without surfacing to check. Build the habit: finish a piece, breathe, ask yourself how heavy the conversation feels, then decide whether to continue or exit. Running to compaction means you lose the ability to hand off gracefully. The loop continues — you don't have to finish everything.
State, not checklist. The spec describes what "done" looks like. Survey reality, decide what's highest value, work on that.
Discoverable updates. Commits, test results, documentation — not notes or progress files. The next iteration finds what changed by inspecting the system.
Pointers, not snapshots. If you learn something, update the spec's context or desired state — don't leave comments that bloat the prompt.
You have authority. Trust the spec, don't ask permission. Make substantial contributions. Don't avoid ambitious solutions just because they span multiple iterations.
File uncertain decisions so the user can answer after the loop. Use AskUserQuestion to batch up to 4 high-leverage questions before exiting — choices where user input redirects substantial work.
Some iterations require waiting on computation (builds, cluster jobs, CI). When jobs are running:
Stay and shepherd computation through. Don't exit and hope the next iteration picks it up.
If you made substantial contributions, kill $PPID. Do NOT close the spec — the loop continues.
If you cannot find any remaining work, update the spec's YAML frontmatter to status: closed with a summary of what was accomplished.
Pattern adapted from Ralph Wiggum.