Loop directory

228 loops match your filters.

Index every foreign key

Loop/goallooprepo

Query the catalog for unindexed foreign keys, create a migration per missing index, and verify each with a full test run until all FKs are covered or 6 turns complete.

prompt
→ Claude
/goal every foreign key in the schema has a covering index — query the catalog (pg_catalog or information_schema) to list FKs with no matching index, add one migration per missing index, and re-run the catalog check until it returns zero rows. After each index, apply the migration on a scratch database and run the full test suite to verify nothing regresses; stop after 6 turns. Only add indexes — never change constraints or table definitions — and propose the final migration set as a PR for review.
databasehigh riskclaude-code

Catch schema drift nightly

Loop/schedulelooprepo

Every night at 3am, dump the production schema and diff it against migrations, filing issues for any drift found.

prompt
→ Claude
/schedule every night at 3am, dump the live database schema (`pg_dump --schema-only`) and diff it against the schema produced by applying all committed migrations to a fresh scratch database. Verify the scratch build reports `migrate status` clean before comparing. Any drift — columns, indexes, or constraints present in prod but missing from migrations, or vice versa — gets an issue filed with the exact diff attached and a proposed corrective migration for human review. Read-only against production; never modify the live schema. Stop after 1 pass per run.
databaselow riskclaude-code

Fix slow queries, ship index PR

Loop/looplooprepo

Pull the slowest PostgreSQL statement, optimize its query plan with an index or rewrite, verify the improvement, and repeat until all captured queries run under 100ms or hit eight iterations.

prompt
→ Claude
/loop pull the 10 slowest statements from pg_stat_statements, take the single worst one, and EXPLAIN ANALYZE it. Fix only that query this iteration — add the missing index, rewrite the predicate, or batch the N+1 — then re-run EXPLAIN ANALYZE to verify the plan improved and run the test suite to prove behavior is unchanged. Only touch indexes and query shape, never application behavior. Continue until every statement in the captured set runs under its 100ms budget — stop after 8 turns, then propose the accumulated index changes as a single PR for review and report any remaining offenders.
performancemedium riskclaude-code

Execute SkillFoundry agent pipeline

Loop/ralph

Run all PRD-driven agents across database, backend, and frontend layers until the full development lifecycle completes.

prompt
→ Claude
# SkillFoundry Framework — Agent Instructions for OpenAI Codex Version 5.22.1 | Hexa-Platform: Claude Code · Cursor · Copilot · Codex · Gemini · Grok Build | 107 Skills | 20 MCP Tool Agents --- ## What This Is SkillFoundry (Agents & Skills) is a production-ready AI development framework with 60 specialized agents covering the full software development lifecycle. This file provides always-on context for OpenAI Codex CLI. ## Philosophy - Cold-blooded logic over flattery — Honest, structured, production-ready evaluations only - ONLY REAL LOGIC — No placeholders, TODOs, mocks, or stubs. Every feature works end-to-end - Three-Layer Completeness — Every feature verified across DATABASE → BACKEND → FRONTEND - PRD-First Development — Non-trivial features start with a Product Requirements Document - Implement Test Iterate — Every feature tested before considered done ## How to Use Skills Each SkillFoundry agent is available as a Codex Skill in .agents/skills/ . Invoke explicitly or let Codex auto-select based on your prompt. Explicit invocation: $go # Execute all PRDs from genesis/ $coder

Ship audit-grade verification gates

Loop/ralph

Pick the single highest-priority task from fix plan.md, implement it with green tests and small diffs, then stop—rinse and repeat.

prompt
→ Claude
# CLAUDE.md — Project Constitution Claude Code reads this file automatically at the start of every run. In a Ralph loop each iteration is a FRESH context, so this file is the only memory that survives. Treat every rule here as non-negotiable. ## What we are building An audit-grade verification gate : an inline API an AI agent calls before it commits a high-stakes output. It returns a verdict AND a signed, tamper- evident audit receipt that a compliance officer can hand to a regulator. The receipt — not the detection — is the product. Full spec: specs/verification-gate.md . ## The Ten Golden Rules (violating any is a failed iteration) 1. One task per loop. Read fix plan.md , pick the single highest-priority unchecked [ ] item, do ONLY that. Do not batch. 2. Tests are law. Never mark a task done unless the full test suite is green. Run it; do not assume. 3. Never weaken a test to pass it. Deleting, skipping, or loosening an assertion to get green is a critical failure. If a test is genuinely wrong, record why in the progress log and stop. 4. Small diffs. If your change touches more than ~3 files or ~150 lines, you have taken too much Cap the run at 25 iterations; leave remaining work for the next session.
planninghigh riskclaude-code

Polish page against design brief

Loop/ralph

Read the design brief, apply one focused improvement to the current implementation, re-check against all requirements until the brief is fully met.

prompt
→ Claude
/ralph-loop "Read the brief at /redesign/briefs/clients-brief.md. Compare the current implementation to the brief's requirements (every section of the brief, including Recipe Context and Implementation Notes). Apply one focused improvement. Re-check against the brief. If all brief requirements are met, output <promise PAGE-POLISH-COMPLETE</promise ." --max-iterations 8 --completion-promise "PAGE-POLISH-COMPLETE
designmedium riskclaude-code

Ship a PR through CI and reviews

Loop/loop

Draft a PR, run CI, collect reviews, merge, and release—repeat every 30 minutes until land criteria are met.

prompt
→ Claude
/loop 30m /flow-next:land # ship loop: draft PR → CI green → reviews converged → merged → released Cap the run at 15 passes.
cihigh riskclaude-codecodex

Ship specs through code review

Loop/loop

Run spec-driven workflow loop every 10 minutes: plan work, collect reviews, execute tasks, open pull requests.

prompt
→ Claude
/loop 10m /flow-next:pilot # build loop: ready spec → plan → reviews → work → draft PR Cap the run at 15 passes.
cimedium riskclaude-codecodex

Re-run PR review on schedule

Loop/schedule

Re-invoke a specific PR review skill every 20 minutes until the review completes or you stop it.

prompt
→ Claude
/loop 20m /review-pr 1234 , to re-run that skill each iteration. {/ min-version: 2.1.196 /}As of v2.1.196, a scheduled fire only runs skills that Claude is [allowed to invoke on its own](/en/skills#control-who-invokes-a-skill). The following reach Claude as plain text instead of executing

Verify foundations refactor baseline

Loop/goal

Record baseline documentation and contract specifications when pure validation refactoring completes with zero public API impact.

prompt
→ Claude
/goal records docs/reports/ baselines/2026-06-02-foundations-after.md + specs/047-foundations-programme-closeout/contracts/after-baseline.md ; no public product .fsi /surface/package/runtime impact; Principle IV (Elmish/MVU) is not applicable (pure validation refactor, IO confined to the existing read-file wrapper); required real evidence = prose-size accounting, the rewording-passes / drift-fails red→green, the enumerated contract-token set, and the restated-goal record Cap the run at 20 turns.
refactoringlow riskclaude-code
Sponsored · ConnectMyEmail

Loops that read your inbox.

Email is the missing tool in your harness. ConnectMyEmail gives Claude Code and Codex a clean MCP into Gmail, Outlook, iCloud and IMAP — triage, drafts, follow-ups, on a loop.

connectmyemail.com →

Implement spec until tests pass

Loop/goal

Build the feature from docs/spec.md and iterate until your test suite passes completely.

prompt
→ Claude
/goal Implement the feature described in docs/spec.md and keep going until tests pass
testingmedium riskclaude-code

Ship GOALS.md phases 1-13

Loop/goal

Implement each GOALS.md phase with tests and validation, committing and pushing after stable milestones until unblocked.

prompt
→ Claude
/goal Complete GOALS.md phases 1-13 in order. For each phase, implement the deliverables, add/update tests, run the common validation plus that phase's Automated QA, commit after the phase passes, and push after stable milestones. Preserve unrelated user changes. Stop only if blocked by missing credentials, external service access, or an explicit product decision that cannot be safely inferred Cap the run at 20 turns.
planninghigh riskclaude-code

Capture task name until save

Loop/goal

Run the agent to prompt for a task name and stop once the save button is clicked or name is set.

prompt
→ Claude
/Goal until (name is set) / (Save button is clicked) - no need to undo adding empty objects = easy discard Cap the run at 20 turns.
automationlow riskclaude-code

Map global religious lineages end-to-end

Loop/goal

Research and document all major world religions from 5000 BC to 2026, generating a complete lineage map with bibliography and coverage matrix until finished.

prompt
→ Claude
/goal Complete the Global Religious Lineages, Sects, Faiths, and Offshoots Mapping Project in the workspace under project root /home/ndsadmin/dev/research/ folder. Treat @GOAL.md as the authoritative task contract. Create ./global-religious-lineages-5000bc-2026.md plus the required research-log, bibliography, coverage matrix, and uncertainty/disputed-claims files. Work chronologically from approximately 5000 BC/BCE through 2026 AD/CE, and do not stop after an outline, sample, summary, or representative survey Cap the run at 20 turns.
contentlow riskclaude-code

Make tests pass, gate frozen

Loop/goal

Run verify.sh repeatedly until it exits 0, all acceptance gates hold, and test quality gates are met, or report after 20 turns.

prompt
→ Claude
/goal ./scripts/verify.sh exits 0, .ai/spec-tdd/state.json phase is done, frozen tests and acceptance gates are unchanged, no tests are skipped/weakened, and no TODO/stub/hardcoded test-only implementation remains; or stop after 20 turns with a clear blocked report
testingmedium riskclaude-code

Delegate loop termination to Claude

Loop/goal

Run an agentic loop until a dedicated Claude evaluator judges your condition met, delegating stop logic from shell parsing to model inference.

prompt
→ Claude
/goal CONDITION directive evaluated by a dedicated Claude Haiku judge each turn. The orchestrator stops parsing model output entirely: it spawns one long-lived claude -p "/goal CONDITION" session, the /goal evaluator reads the running transcript and answers "is the condition satisfied yet?" turn by turn, and the Stop hook blocks termination until the evaluator says yes. ralph.sh has been reduced to a one-line deprecation shim that exec s goal.sh . Decision moved from a shell-level grep into an explicit model call with a schema-validated yes/no — the textbook ZFC move Cap the run at 20 turns.
automationlow riskclaude-code

Find winner assets per class

Loop/loop

Dig deeper into asset classes until you identify true winners, re-analyzing every 2 hours.

prompt
→ Claude
/loop 2h keep going and dig deeper until you find us true winners per asset class Cap the run at 15 passes.
planninglow riskclaude-code

Keep research progressing, never idle

Loop/loop

Continuously advance research by reading state, reflecting on progress, pivoting if stalled, and committing findings until the work is truly complete.

prompt
→ Claude
/loop 20m Continue autoresearch. Read research-state.yaml and findings.md. Re-read the autoresearch SKILL.md occasionally to stay aligned. Step back and reflect holistically — is the research making real progress? Are you deepening understanding or just running experiments? If stalling, pivot or search literature for new ideas. Keep making research progress — never idle, never stop. Update findings.md, research-log.md, and research-state.yaml when there's new progress. Git commit periodically and clean up the repo if needed. Show the human your research progress with key plots and findings by preparing a report in to human/ and opening the HTML/PDF. Only when you believe the research is truly complete, invoke the ml-paper-writing skill to write the paper Guardrails: Stop when the goal is verifiably met, or stop after 15 iterations, whichever comes first. Verify each pass by running the relevant tests or checks — self-reported success does not count.
automationmedium riskclaude-code

claudex — Adversarial Claude+Codex Plan Review Loop

Loop/ralph

A Claude Code plugin that pressure-tests a plan before any code is written: Claude writes PLAN.md, Codex adversarially reviews it from three different reviewer angles in rotation, and a Stop hook drives the draft-critique-revise cycle autonomously in one terminal window until the plan survives review or a round cap is reached.

prompt
→ Claude
/claudex:plan <feature> — Claude drafts PLAN.md from a one-line feature description. A Claude Code Stop hook blocks the turn and runs Codex (via `codex exec`) against the plan using a rotating reviewer persona: round 1 senior engineer, round 2 security/data-integrity, round 3+ ops/SRE. Claude reads Codex's findings and either revises PLAN.md or calls mark-done. The hook re-fires each turn, incrementing the round and rotating the persona, until Codex reports no material findings or the max-rounds cap (default 3, configurable via --rounds) is hit. Cap the run at 25 iterations; leave remaining work for the next session.
planningmedium riskclaude-code

Autonomous overnight ML research loop with stall detection (ARIS)

Loop/ralph

Framework-agnostic (Claude Code, Codex, OpenClaw, or any LLM agent), markdown-only skill bundle (79+ skills) for running ML research unattended overnight: literature search, idea generation, experiment execution, and cross-model paper review, with a silent-death watchdog and a stall/pivot mechanism so a stuck loop changes approach instead of looping forever on minor variants.

prompt
→ Claude
Install the ARIS markdown-only skills, then run the overnight research loop: the agent reviews relevant literature, proposes and critiques experiment ideas, runs GPU experiments, updates a persistent Research Wiki, and has a second model cross-review the draft paper each round. A watchdog checks the state file's modification time and flags the run STALE/MISSING/COMPLETED if it goes silent. An iteration log counts new findings per round; at 2 consecutive stale rounds it forces a structural pivot (reframe and try a new direction), and at 4 it escalates to a human instead of continuing to retry near-identical variants. Cap the run at 25 iterations; leave remaining work for the next session.
evaluationmedium riskclaude-code
Sponsored · ConnectMyEmail

Loops that read your inbox.

Email is the missing tool in your harness. ConnectMyEmail gives Claude Code and Codex a clean MCP into Gmail, Outlook, iCloud and IMAP — triage, drafts, follow-ups, on a loop.

connectmyemail.com →

Run an autonomous dev team across GitHub repos (looper)

Loop/ralph

Runs Claude Code/Codex as an autonomous multi-role dev team — planner → reviewer ↔ fixer → worker — across all of a user's GitHub repos, entirely driven by issue labels. Each loop runs in its own git worktree so multiple repos/issues proceed in parallel without collisions.

prompt
→ Claude
Register a repo with looper, then label an issue `looper:plan` and assign it to yourself. The planner reads the issue, explores the repo, drafts a spec, critiques and revises it, and opens a spec PR labeled `looper:spec-reviewing`. A reviewer re-reads the PR on every commit and posts inline review threads; a fixer pulls those threads, addresses them in its own worktree, and pushes, ping-ponging with the reviewer until every thread is resolved. Once labeled `looper:spec-ready`, a worker implements the spec, runs checks, and iterates on its own output until checks pass and the PR is ready for human review and merge. Every phase transition is gated on a GitHub label via `looperd`, so a human can pause or take over at any boundary.
automationmedium riskclaude-code

Triage, review, and merge PRs

Loop/loop

Run CI checks and merge pull requests after triage and review until the queue clears.

prompt
→ Claude
/loop /leader-tick ) that triages, reviews, runs CI checks, and merges PRs. See docs/team-orchestration.md for the full lifecycle and docs/leader-runbook.md for operator notes Cap the run at 15 passes.

Search the literature, verify every source

Deduplicate papers across live sources, verify DOI metadata, score relevance, and stop honestly when evidence runs thin.

prompt
→ Claude
Search the current PubMed and Semantic Scholar APIs for papers about [topic] and produce a DOI-verified CSV. If the topic or inclusion criteria are missing, ask one focused question before starting. Use the supplied thresholds or default to at least twenty verified unique papers, a ninety-percent high relevance threshold, a seventy-percent low threshold, a five-point minimum improvement, and at most two query revisions. Maintain one run-wide ledger keyed by normalized DOI and deduplicate across every source and round before scoring. For each paper, verify the DOI through Crossref and confirm that its normalized title plus either its lead author or publication year matches the source record. Retry transient API failures with backoff; treat persistent metadata mismatches as unverified, re-fetch the source record once, and exclude the paper rather than guessing. Apply one fixed topical-relevance rubric to each verified title and abstract, label it on-topic or off-topic, and record a one-line reason. Never change the rubric during the run. Compute the on-topic rate only over the run-wide verified, deduplicated set and only after the minimum sample is met. Succeed when the set reaches the high threshold. Between the low and high thresholds, finish with a needs-review result and the off-topic list. Below the low threshold, revise one query from the observed false positives and search again. Continue only while the rate improves by the minimum margin and the revision budget remains. Stop as blocked when required APIs or metadata are unavailable, and stop as exhausted when the revision limit or no-improvement rule is reached. Never invent, infer, or autocomplete paper metadata. Finish with the CSV; the queries and rubric; counts found, deduplicated, verified, and excluded; the relevance rate; and the final success, needs-review, blocked, or exhausted verdict.
evaluationmedium riskclaude-codecodex

Refactor without touching architecture

Improve a targeted area via dependency mapping, atomic refactors, and regression checks — no changes to architecture or public contracts.

prompt
→ Claude
Refactor [target] toward [measurable goal] in [repository]. If the target or goal is missing, ask and stop. Record current behavior and affected dependencies; select representative tests for boundaries and failure modes, then make one atomic change without altering public contracts unless authorized. Run the same tests, type and lint checks, and affected-consumer checks, keeping only regression-free improvements. Repeat for at most five rounds. Stop on success, blocked architecture, approval required, exhaustion, or no progress. Preserve unrelated work and finish with the diff, impact map, evidence, rejected attempts, and remaining debt.
testingmedium riskclaude-codecodex

Ground a feature before you build it

Anchor one small feature in the current code, APIs, data contracts, and tests before implementing and verifying the user path.

prompt
→ Claude
Implement one bounded feature slice in [repository]. Read project instructions, the current implementation, relevant services, types, UI, tests, and architecture notes before editing. Report the evidence, risks, affected files, persistence impact, and validation plan; stop for approval if inspection materially changes scope or reveals destructive, production, or silent-persistence behavior. Make the smallest change, preserve unknown data and unrelated work, run relevant checks, and manually verify user-facing states. Stop after this slice and return evidence, limitations, and the next recommended slice.
testinghigh riskclaude-codecodex

Get the React health scan to 100/100

Inventory every production React app, fix findings without suppressions, and prove a real 100/100 with full project checks.

prompt
→ Claude
Bring every production React app in [repository] to a freshly verified React Doctor score of 100/100. Inventory app roots, record a full `npx react-doctor@latest --verbose` baseline, fix one root cause at a time, and rerun the full scan plus relevant typecheck, lint, tests, and builds. Never hide findings with exclusions, ignores, suppressions, deleted behavior, or relaxed rules. Stop at 100/100 for every app, blocked, approval-required, or no measurable progress; preserve unrelated work and report exact proof.
maintenancehigh riskclaude-codecodex

Repair React issues in small batches

Baseline the scan, fix a small batch of real errors or warnings, and verify each change improves it without regressions.

prompt
→ Claude
Run `pnpm exec react-doctor . --verbose --yes --offline --fail-on none` to record the baseline, then rerun with `--fail-on error`. Fix at most five genuine findings, run the same scan and relevant project checks, and keep only verified improvements. Clear errors before high-confidence warnings. Stop when clean, blocked, approval is required, a finding is false-positive, or another pass makes no measurable progress. Finish with baseline and final results, retained fixes, reverted attempts, checks, and remaining findings.
refactoringmedium riskclaude-codecodex

Triage Dependabot PRs safely

Check the diff, release notes, exact-head CI, and tests before you repair, merge, or escalate a dependency update.

prompt
→ Claude
Review every Dependabot pull request currently open in [repository]. Take a fixed snapshot of that set and process each pull request once. Read its diff, release notes, advisories, dependency role, current base revision, and exact-head CI results. Run the repository’s relevant tests in an isolated worktree and classify the update by version change, breaking behavior, security exposure, and regression risk. For failing checks, identify the root cause and prepare the smallest verified repair. Process merges serially: before each merge, refetch the base and pull-request head and require passing exact-head checks. Merge only low-risk patch or minor updates when explicit merge authority has already been granted. Request approval for major, breaking, security-sensitive, uncertain, or externally visible actions. Never push changes, merge, comment, or send messages without the corresponding authority. Stop successfully when the original snapshot is fully processed; stop without changes when none are open; stop as blocked when verification is unavailable. Finish with reviewed, repaired, merged, deferred, and blocked pull requests plus supporting evidence.
testinghigh riskclaude-codecodex

Separate fact from assumption

Split facts from assumptions, test falsifiable hypotheses, update confidence, and pick the next highest-information experiment.

prompt
→ Claude
Investigate [question, decision, or unresolved problem] using [available evidence]. Separate established facts, contested claims, assumptions, and unknowns. Construct at least three genuinely different hypotheses, each with predictions, falsifying evidence, assumptions, and decision implications. Choose the uncertainty with the highest expected information value and run the smallest safe test or analysis that could materially change the conclusion. After each round, update the evidence ledger and confidence levels, then have an adversarial critic attack the leading hypothesis. Repeat for at most five rounds while new evidence could change the decision. Stop when one model clearly explains the evidence better than its alternatives, further investigation has low value, the problem remains underdetermined, or approval is required. Never fabricate evidence or hide uncertainty. Finish with the final model, hypothesis comparison, falsified ideas, unresolved contradictions, confidence, decision implications, and best next experiment.
evaluationmedium riskclaude-codecodex

Fact-check before you publish

Inventory checkable claims, verify them against primary sources, repair high-risk mismatches, and log what stays unresolved.

prompt
→ Claude
Before publishing [draft], inventory every factual, statistical, quoted, or attributed claim a reader could verify. Find the best current primary source for each and label it supported, outdated, misattributed, unsupported, or unverifiable. Fix the riskiest mismatch, then recheck that claim and anything depending on it. Repeat until no high-risk unsupported claim remains or five rounds are exhausted. Never invent a source, cite evidence that does not support the claim, or alter a quotation. Ask before changing a named person’s quote or a legal, medical, or financial statement. Stop without changes if there are no checkable claims; stop as blocked when adequate evidence is unavailable. Finish with the claim-to-source table, corrections made, unresolved claims, and decisions requiring an editor.
contentlow riskclaude-codecodex
Sponsored · ConnectMyEmail

Loops that read your inbox.

Email is the missing tool in your harness. ConnectMyEmail gives Claude Code and Codex a clean MCP into Gmail, Outlook, iCloud and IMAP — triage, drafts, follow-ups, on a loop.

connectmyemail.com →