Multi-Pass Refiner

Loop

by danielmiessler · MIT license · ★ 19,269 on GitHub · v1.0.9

Loop cover

Iterative improvement loop — refine a target across multiple Algorithm cycles toward ideal state. USE WHEN loop, iterate, refine, multiple passes, keep improving, revisit, rework.

---
name: Loop
version: 1.0.9
description: "Iterative improvement loop — refine a target across multiple Algorithm cycles toward ideal state. USE WHEN loop, iterate, refine, multiple passes, keep improving, revisit, rework."
disable-model-invocation: true
---

# /loop — Iterative Improvement

## What It Does

`/loop` runs the Algorithm as a loop — multiple full Algorithm cycles on the same target, each iteration building on the last. By default a human reviews and redirects between iterations. Unlike `/optimize` (an autonomous mutation loop), `/loop` runs full Algorithm passes with that human review in the seam.

## The Problem

Some work doesn't finish in one pass. A skill, a prompt, a diagram, a piece of writing gets meaningfully better each time you run a full cycle on it — but only if each cycle remembers what the last one learned and what it already tried. Run the cycles by hand and you lose that thread: you re-explore dead ends, forget which approaches got rejected, and have no record of whether the score actually moved. `/loop` carries ISC criteria and a dead-ends ledger across iterations so each pass starts from where the last one ended.

## How It Works

Overview

/loop runs the Algorithm as a loop — multiple full Algorithm cycles on the same target, each iteration building on the last. By default a human reviews and redirects between iterations. Unlike /optimize (an autonomous mutation loop), /loop runs full Algorithm passes with that human review in the seam.

Example prompts

/loop — Iterative Improvement/loop --target/loop --resume # Resume a previous loop/loop --status # Show iteration history
Manual install (npx, ZIP)
Claude Codenpx skills add danielmiessler/LifeOS --skill Loop -g -a claude-code
Claude Code (degit)npx degit danielmiessler/LifeOS/LifeOS/install/skills/Loop#main ~/.claude/skills/loop-danielmiessler
Claude.ai / desktopZip the folder and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md4.2 KB
Read SKILL.md here
danielmiessler/main1 file shown
SKILL.md
Show the full text81 lines

/loop — Iterative Improvement

What It Does

/loop runs the Algorithm as a loop — multiple full Algorithm cycles on the same target, each iteration building on the last. By default a human reviews and redirects between iterations. Unlike /optimize (an autonomous mutation loop), /loop runs full Algorithm passes with that human review in the seam.

The Problem

Some work doesn't finish in one pass. A skill, a prompt, a diagram, a piece of writing gets meaningfully better each time you run a full cycle on it — but only if each cycle remembers what the last one learned and what it already tried. Run the cycles by hand and you lose that thread: you re-explore dead ends, forget which approaches got rejected, and have no record of whether the score actually moved. /loop carries ISC criteria and a dead-ends ledger across iterations so each pass starts from where the last one ended.

How It Works

Each iteration is a full Algorithm cycle (OBSERVE → LEARN). The LEARN phase of one cycle feeds the OBSERVE phase of the next, the ISA tracks iteration count and cumulative improvements, and a human approves or redirects between iterations unless autoresearch mode is enabled.

Invocation

/loop --target "path/to/target" --iterations 5
/loop --target "~/.claude/skills/Art/Workflows/TechnicalDiagrams.md" --goal "make diagrams more consistent"
/loop --resume       # Resume a previous loop
/loop --status       # Show iteration history

What Happens

Each iteration is a full Algorithm cycle (articulate → climb → verify → learn) with:

  • ISC criteria that evolve between iterations
  • Each cycle's learnings inform the next cycle's scaffold
  • ISA tracks iteration count and cumulative improvements
  • Human approves/redirects between iterations

Arguments

Argument Required Default Description
--target PATH yes What to improve (file, directory, skill)
--goal TEXT inferred What "better" means for this target
--iterations N 3 Maximum number of Algorithm cycles
--resume Resume a previous loop
--status Show iteration history
--autoresearch off Opt-in autonomous mode — see below

Algorithm Integration

The iteration field tracks cycle count. (mode: is retired — never write it.) Each cycle re-enters the Algorithm with accumulated context from prior iterations.

Autoresearch Mode (opt-in)

--autoresearch switches /loop from supervised multi-pass improvement to autonomous iteration, borrowing three patterns from pi-autoresearch (davebcn87, MIT):

  1. No human review between cycles — each iteration's LEARN feeds directly into the next OBSERVE. Cycle continues until --iterations reached, target met, or explicit interrupt.
  2. Dead-ends ledger — ISA maintains a ## Dead Ends section. Every failed iteration appends one line with the rejected approach and reason. Resumes read this to avoid retrying rejected paths.
  3. MAD confidence on iteration score — if the target has a measurable score, compute |delta|/MAD(iteration_scores) per cycle. Flag red (<1.0×) iterations as noise-floor and log marginal; do not update baseline. See LIFEOS/ALGORITHM/optimize-loop.md → Confidence Gating.

Invocation:

/loop --target "path" --goal "X" --iterations 20 --autoresearch

Default /loop behavior is unchanged — autoresearch is opt-in only. Intended for overnight runs on targets where human-in-the-loop review between cycles is too slow.

Examples

/loop --target "~/.claude/skills/Research" --goal "improve output quality" --iterations 5
/loop --target "prompts/summarize.md" --goal "more concise, less filler"

Gotchas

  • Loop runs multiple full Algorithm cycles. Each cycle is a complete OBSERVE→LEARN pass. This is expensive in time and tokens.
  • Set a clear exit condition. Without one, loops can run indefinitely.
  • Human review happens between cycles. Don't skip the review step — it's the feedback mechanism.
1---
2name: Loop
3version: 1.0.9
4description: "Iterative improvement loop — refine a target across multiple Algorithm cycles toward ideal state. USE WHEN loop, iterate, refine, multiple passes, keep improving, revisit, rework."
5disable-model-invocation: true
6---
7 
8# /loop — Iterative Improvement
9 
10## What It Does
11 
12`/loop` runs the Algorithm as a loop — multiple full Algorithm cycles on the same target, each iteration building on the last. By default a human reviews and redirects between iterations. Unlike `/optimize` (an autonomous mutation loop), `/loop` runs full Algorithm passes with that human review in the seam.
13 
14## The Problem
15 
16Some work doesn't finish in one pass. A skill, a prompt, a diagram, a piece of writing gets meaningfully better each time you run a full cycle on it — but only if each cycle remembers what the last one learned and what it already tried. Run the cycles by hand and you lose that thread: you re-explore dead ends, forget which approaches got rejected, and have no record of whether the score actually moved. `/loop` carries ISC criteria and a dead-ends ledger across iterations so each pass starts from where the last one ended.
17 
18## How It Works
19 
20Each iteration is a full Algorithm cycle (OBSERVE → LEARN). The LEARN phase of one cycle feeds the OBSERVE phase of the next, the ISA tracks iteration count and cumulative improvements, and a human approves or redirects between iterations unless autoresearch mode is enabled.
21 
22## Invocation
23 
24```
25/loop --target "path/to/target" --iterations 5
26/loop --target "~/.claude/skills/Art/Workflows/TechnicalDiagrams.md" --goal "make diagrams more consistent"
27/loop --resume # Resume a previous loop
28/loop --status # Show iteration history
29```
30 
31## What Happens
32 
33Each iteration is a full Algorithm cycle (articulate → climb → verify → learn) with:
34- ISC criteria that evolve between iterations
35- Each cycle's learnings inform the next cycle's scaffold
36- ISA tracks iteration count and cumulative improvements
37- Human approves/redirects between iterations
38 
39## Arguments
40 
41| Argument | Required | Default | Description |
42|----------|----------|---------|-------------|
43| `--target PATH` | yes | | What to improve (file, directory, skill) |
44| `--goal TEXT` | | inferred | What "better" means for this target |
45| `--iterations N` | | 3 | Maximum number of Algorithm cycles |
46| `--resume` | | | Resume a previous loop |
47| `--status` | | | Show iteration history |
48| `--autoresearch` | | off | Opt-in autonomous mode — see below |
49 
50## Algorithm Integration
51 
52The `iteration` field tracks cycle count. (`mode:` is retired — never write it.) Each cycle re-enters the Algorithm with accumulated context from prior iterations.
53 
54## Autoresearch Mode (opt-in)
55 
56`--autoresearch` switches /loop from supervised multi-pass improvement to autonomous iteration, borrowing three patterns from pi-autoresearch (davebcn87, MIT):
57 
581. **No human review between cycles** — each iteration's LEARN feeds directly into the next OBSERVE. Cycle continues until `--iterations` reached, target met, or explicit interrupt.
592. **Dead-ends ledger** — ISA maintains a `## Dead Ends` section. Every failed iteration appends one line with the rejected approach and reason. Resumes read this to avoid retrying rejected paths.
603. **MAD confidence on iteration score** — if the target has a measurable score, compute `|delta|/MAD(iteration_scores)` per cycle. Flag red (<1.0×) iterations as noise-floor and log `marginal`; do not update baseline. See `LIFEOS/ALGORITHM/optimize-loop.md` → Confidence Gating.
61 
62Invocation:
63```
64/loop --target "path" --goal "X" --iterations 20 --autoresearch
65```
66 
67Default /loop behavior is unchanged — autoresearch is opt-in only. Intended for overnight runs on targets where human-in-the-loop review between cycles is too slow.
68 
69## Examples
70 
71```
72/loop --target "~/.claude/skills/Research" --goal "improve output quality" --iterations 5
73/loop --target "prompts/summarize.md" --goal "more concise, less filler"
74```
75 
76## Gotchas
77 
78- **Loop runs multiple full Algorithm cycles.** Each cycle is a complete OBSERVE→LEARN pass. This is expensive in time and tokens.
79- **Set a clear exit condition.** Without one, loops can run indefinitely.
80- **Human review happens between cycles.** Don't skip the review step — it's the feedback mechanism.
81 
View all files on GitHub →

Details

Version
1.0.9
License
MIT
Stars on the repo
★ 19,269
Checked
Source
danielmiessler/LifeOS ↗
Creator
danielmiessler · 63 listings
View creator

Similar skills

See all →

More from danielmiessler

SkillScope Oscillation Analyzerdanielmiessler/LifeOS · by danielmiessler3-pass scope oscillation that holds a question constant while shifting zoom — narrow/tactical, wide/strategic, then synthesis — to surface design tensions, scope recommendations, and coherence assessments invisible at any single zoom level. USE WHEN aperture oscillation, oscillate scope, zoom in and out, tactical vs strategic, scope framing, design tension, system coherence check, local vs global design, wrong scope, scope negotiation. NOT FOR lens rotation across angles (use IterativeDepth).★ 19.3k GitHub starsSkillAphorism Library Managerdanielmiessler/LifeOS · by danielmiesslerCurated aphorism collection with CRUD — content-based matching, themed search, thinker research, DB maintenance. Quotes organized by author/theme/context/usage to prevent repetition. Four workflows: FindAphorism, AddAphorism, ResearchThinker, SearchAphorisms. Themes: Stoicism, Wisdom, Truth-seeking, Excellence, Resilience, Curiosity. USE WHEN aphorism, quote, find a quote, research thinker, add aphorism, quote for newsletter, what did X say about, quote bank. NOT FOR creative writing or social posts.★ 19.3k GitHub starsSkillSocial Platform Scraperdanielmiessler/LifeOS · by danielmiesslerScrapes social platforms, business data, and e-commerce via Apify actors — Instagram, LinkedIn, TikTok, YouTube, Facebook, Google Maps, Amazon, and web crawls — filtering in code. USE WHEN scrape Instagram, scrape LinkedIn, scrape TikTok, scrape YouTube, scrape Facebook, Google Maps leads, Amazon reviews, business intelligence, multi-platform social listening, competitive analysis, lead generation, social monitoring, Apify actors, web crawl, extract contacts. NOT FOR X/Twitter account operations like posting, threads, or bookmarks (those need a dedicated X API client), 4-tier progressive scraping with proxy escalation (use BrightData), or real-Chrome bot bypass and computer use (use Interceptor).★ 19.3k GitHub starsSkillVisual Content Generatordanielmiessler/LifeOS · by danielmiesslerStatic visual content across 20+ formats — diagrams, mermaid, infographics, D3 dashboards, comics, icons, wallpaper — via Nano Banana Pro (default), Nano Banana, and Flux. USE WHEN art, illustration, diagram, flowchart, infographic, header image, blog social thumbnail, visualize, generate image, mermaid, architecture diagram, comic, icon, blog art, framework diagram, D3 chart, remove background, wallpaper. NOT FOR locked house-style YouTube/channel/video thumbnails, video or animation (use Remotion), or web UI design and integrated frontend layout (use Webdesign).★ 19.3k GitHub starsSkillArXiv Paper Finderdanielmiessler/LifeOS · by danielmiesslerSearch and retrieve arXiv academic papers by topic, category, or paper ID — with AlphaXiv-enriched AI-generated overviews. Uses arXiv Atom API across cs.AI/cs.LG/cs.CL/cs.CR/cs.MA/cs.SE/cs.IR. Three workflows: Latest, Search, Paper. USE WHEN arxiv, papers, latest papers, research papers, recent ML papers, paper lookup, summarize paper, latest LLM papers, AI safety papers, cs.AI latest. NOT FOR general research (Research), URL parsing, or annual reports.★ 19.3k GitHub starsSkillFiller Removal Audio Editordanielmiessler/LifeOS · by danielmiesslerAI audio editing pipeline: Whisper word-level transcription → Claude segment classification (KEEP/CUT_FILLER/CUT_FALSE_START/CUT_STUTTER/CUT_DEAD_AIR) → ffmpeg with 40ms qsin crossfades and room-tone fill → optional Cleanvoice cloud polish; plus GateScan/GateRepair for noise-gate ticking artifacts. Modes: --preview, --aggressive, --polish. Workflow: Clean. USE WHEN clean audio, edit audio, remove filler words, clean podcast, remove ums, cut dead air, polish audio, trim recording, cut stutters, ticking audio, clicking audio, audio clicks, gate artifacts, popping audio. NOT FOR video composition (use Remotion).★ 19.3k GitHub stars