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
- sophonfinance-wq/finance-automation-portfoliotheir own version, first seen Nov 1, 2026
- anlmalabs/skillstheir own version, first seen Oct 25, 2026
- 5dive-ai/skillstheir own version, first seen Oct 5, 2026
- xmeir-dev/skillstheir own version, first seen Oct 4, 2026
- vivary-dev/vivarytheir own version, first seen Sep 27, 2026
- michielhdoteth/awesome-ai-agent-toolstheir own version, first seen Aug 24, 2026
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.
GoogleSkillcode-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
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- jwangkun/loops★ 123same name
- michielhdoteth/awesome-ai-agent-tools★ 62same name
- sophonfinance-wq/finance-automation-portfolio★ 16same name
- 0-CYBERDYNE-SYSTEMS-0/FFT_nano★ 4same name
- vivary-dev/vivary-cli★ 4same name
- 5dive-ai/skills★ 2same name
- miketromba/skills★ 2same name
- thepictishbeast/claude-tools★ 1same name
- vivary-dev/vivary★ 1same name
- anlmalabs/skills★ 0same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository35 other files it gives its agents.
- AGENTS.mdAGENTS.md
- 12-factor-appSkill
- caveman-commitSkill
- caveman-reviewSkill
- cavemanSkill
- conventional-commitsSkill
- creating-pull-requestsSkill
- deep-researchSkill
- dispatching-parallel-agentsSkill
- domain-modelingSkill
- finishing-a-development-branchSkill
- forge-cleanupSkill
- forge-docsSkill
- forge-eu-accessibilitySkill
- forge-flowSkill
- forge-initSkill
- forge-seoSkill
- forge-setupSkill
- forgeSkill
- forge-tailwindcss-conventionsSkill
- frontend-designSkill
- git-issue-trackerSkill
- grillingSkill
- kiss-principleSkill
- planning-and-task-breakdownSkill
- prototypeSkill
- pr-resolveSkill
- pr-reviewSkill
- resolving-merge-conflictsSkill
- ste100Skill
- subagent-driven-developmentSkill
- use-git-identitySkill
- using-git-worktreesSkill
- verification-before-completionSkill
- wayfinderSkill
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
- Very specific: line 25
Run kimi -p "<rendered>", capture output.
- Very specific: line 26
Check for DONE: or BLOCKED:.
- Distinctive: line 64
Every iteration cavemanizes the running prompt.
- Very specific: line 70
Does not interpret findings — that is caveman-review's job.
- Very specific: line 71
Does not manage worktrees — that is using-git-worktrees's job.
- Very specific: line 72
Does not post to GitHub — that is pr-review's or pr-resolve's job.
“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.
Files
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 owntemplates/). Loops reads, compresses, fills placeholders.[max_iter]— max iterations (default 10). Each is onekimi -pcall.[workdir]— directory tocdinto before starting. Default: current directory. Loop setspwdso kimi chats land under that workdir in history.
Steps
- START —
cdto[workdir]. Render<prompt.md>throughscripts/cavemanize.sh(compresses prose; preserves code, identifiers, errors). - LOOP — for
iin1..max_iter:- Run
kimi -p "<rendered>", capture output. - Check for
DONE:orBLOCKED:. - 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).
- Run
- CAP — exit 1 with "max_iter reached without DONE".
Done when: the loop exits 0 with DONE: and an artifact path.
Scripts — scripts/
| Script | Role |
scripts/run_loop.sh | The framework. Args: prompt.md [max_iter] [workdir]. |
scripts/cavemanize.sh | Compresses 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.shCross-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
pwdto[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 orpr-resolve's job.
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
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.

