agentleFS
weselbenweselben/RooForge/skills/loops/SKILL.md

loops

Skill4 starsChanged 3 months agoApache-2.0View on GitHub

Drive `kimi -p` review/resolve loops via a shell framework. Dynamic prompts: callers supply their own `.md` template; loops renders it, compresses it, drives `run_loop` until `DONE:` or `BLOCKED:`. Triggers: \"kimi -p loop\", \"review loop\", \"resolve loop\".

12 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use code-review.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run kimi -p "<rendered>", capture output.

    line 25
  2. Very specific:

    Check for DONE: or BLOCKED:.

    line 26
  3. Distinctive:

    Every iteration cavemanizes the running prompt.

    line 64
  4. Very specific:

    Does not interpret findings — that is caveman-review's job.

    line 70
  5. Very specific:

    Does not manage worktrees — that is using-git-worktrees's job.

    line 71
  6. Very specific:

    Does not post to GitHub — that is pr-review's or pr-resolve's job.

    line 72

“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

loops — shell framework for kimi -p loops

Leading word: render. The calling skill supplies the prompt template; loops renders it, compresses it, drives the cycle. The framework owns the plumbing; the caller owns the prompt.

Usage

scripts/run_loop.sh <prompt.md> [max_iter=10] [workdir]
  • <prompt.md> — prompt template. The calling skill owns this file (under its own templates/). Loops reads, compresses, fills placeholders.
  • [max_iter] — max iterations (default 10). Each is one kimi -p call.
  • [workdir] — directory to cd into before starting. Default: current directory. Loop sets pwd so kimi chats land under that workdir in history.

Steps

  1. START — cd to [workdir]. Render <prompt.md> through scripts/cavemanize.sh (compresses prose; preserves code, identifiers, errors).
  2. LOOP — for i in 1..max_iter:
    • Run kimi -p "<rendered>", capture output.
    • Check for DONE: or BLOCKED:.
    • On DONE: — write artifact path, exit 0.
    • On BLOCKED: — write blocker reason, exit 2.
    • Otherwise — append reply to prompt, re-render (cavemanize new content too).
  3. CAP — exit 1 with "max_iter reached without DONE".

Done when: the loop exits 0 with DONE: and an artifact path.

Scripts — scripts/

ScriptRole
scripts/run_loop.shThe framework. Args: prompt.md [max_iter] [workdir].
scripts/cavemanize.shCompresses prose to caveman form. Reads stdin, writes stdout.

Caller contract

Any skill that needs a kimi -p loop supplies its own prompt template under its own templates/ dir. The template is the kimi -p prompt body — MANDATORY FIRST skill loads, no-plan-mode instruction, DONE:/BLOCKED: contract line.

No ambiguity. Every prompt must include broader context (why this task exists, where it fits, what's done, what's downstream) AND task context (exact paths, exact commands, exact output format). STE100 prose: one meaning per word, short sentences, active voice. The subagent must never need to ask a clarifying question — that signal means the prompt was incomplete.

Example wiring (from pr-review):

# inside pr-review skill
scripts/review-loop.sh <pr-ref> <worktree> [max_iter]
   │
   └─► renders templates/review-loop.md
       └─► compresses via ../loops/scripts/cavemanize.sh
           └─► drives ../loops/scripts/run_loop.sh

Cross-skill paths are relative to each skill's own SKILL.md — ../loops/scripts/run_loop.sh from pr-review reaches the loops framework.

Hard rules

  • The loop sets pwd to [workdir] before starting. Chats land in the user's history under that workdir.
  • Every iteration cavemanizes the running prompt.
  • DONE: is the only success exit. BLOCKED: is a real signal.
  • The calling skill owns the prompt. Loops never modifies the template body.

Boundaries

  • Does not interpret findings — that is caveman-review's job.
  • Does not manage worktrees — that is using-git-worktrees's job.
  • Does not post to GitHub — that is pr-review's or pr-resolve's job.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.