loop

A command for running an autonomous research or implementation cycle with task tracking and Git-based work management. In research mode it creates implementation plans; in implementation mode it writes code, tests, and documentation.

In plain words
What is it for?
Use it to investigate and write specifications, implement those specifications, manage task iterations, and optionally commit, push, or propose the resulting changes.
Why use it?
It organizes repeated development work and defines what happens to each task afterward, such as committing changes or opening a pull request. A pull request is a proposed set of changes for review.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/randroids-dojo/skills/loop
Clone the repo
git clone --depth 1 https://github.com/Randroids-Dojo/skills
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,007 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00018 $0.01007
Opus 5 $0.00009 $0.00504
Sonnet 5 $0.00004 $0.00201
Haiku 4.5 $0.00002 $0.00101

Measured 2d ago against content hash 5dbc173e94ff, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/randroid/commands/loop.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/randroid:loop

A self-sustaining development loop with two modes: Researcher and Implementor.

Prerequisites

Full permissions required. The loop runs autonomously and needs unrestricted access.

Startup Flow

When this command is invoked, ask the user FOUR questions using AskUserQuestion, then one text prompt:

Question 1: Mode (AskUserQuestion)

  • Question: "Which mode would you like to run?"
  • Options:
    1. Research - Explore, investigate, and plan. Creates specs for implementation.
    2. Implement - Execute on specs. Write code, tests, and documentation.

Question 2: Git Workflow (AskUserQuestion)

  • Question: "What should happen after each task?"
  • Options:
    • Push - Commit and push to current branch (default)
    • Commit only - Commit locally, no push
    • Open PR - Open PR, wait for CI (no merge)
    • PR and merge - Open PR, wait for CI, then auto-merge

Question 3: Context Management (AskUserQuestion)

  • Question: "Should each iteration start with fresh context?"
  • Options:
    • Fresh context - Clear context between iterations (default, recommended)
    • Keep context - Maintain conversation history across iterations

Question 4: Directions (AskUserQuestion - optional)

  • Question: "Any specific directions for this run?"
  • Options (mode-aware, user can select "Other" for custom):
    • None - No specific directions, work autonomously
    • For Research mode:
      • Focus on specs - Review and improve existing implementation specs
      • Explore dependencies - Research external libraries and frameworks
    • For Implement mode:
      • Fix issues first - Prioritize fixing build errors and warnings
      • Skip tests - Focus on implementation, skip test writing for now

Question 5: Iterations (Text prompt - NOT AskUserQuestion)

After the AskUserQuestion completes, ask:

"How many iterations? Enter a number, 'inf' for infinite, or 'comp' for until complete:"

Parse the response:

  • Number (e.g., "2", "5", "10") → exact iteration count
  • "inf", "infinite", "-1" → infinite mode (-1)
  • "comp", "complete", "0" → until complete mode (0)

Read the full file on GitHub · 107 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 107 lines · 18 tokens per session scan A 5dbc173e94ff

Subscribe to this mod's changes

loop is a command published in the GitHub repository Randroids-Dojo/skills (46 stars, last pushed 20d ago), licensed MIT. It adds 18 tokens to every session and 1,007 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.