Loop logo

Loop

CommunityPopular
danielmiessler
Loop

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

Overview

Publisherdanielmiessler
RepositoryLifeOS
Skill nameLoop
Stars
19K
Forks
2.5K
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by danielmiessler on GitHub. Read the source before you install it.

Installation

Install the Loop AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/danielmiessler/LifeOS.git /tmp/LifeOS
mkdir -p .claude/skills
cp -r /tmp/LifeOS/LifeOS/install/skills/Loop .claude/skills/Loop
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Loop in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Loop on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Loop is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

/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

ArgumentRequiredDefaultDescription
--target PATHyesWhat to improve (file, directory, skill)
--goal TEXTinferredWhat "better" means for this target
--iterations N3Maximum number of Algorithm cycles
--resumeResume a previous loop
--statusShow iteration history
--autoresearchoffOpt-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.

Frequently asked questions

What does the Loop AI skill do?

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

Why use Loop on TypingMind?

Because you install it once and use it with any model. Loop is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Loop in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/danielmiessler/LifeOS/tree/main/LifeOS/install/skills/Loop. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Loop?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Loop?

As many as you like. As long as a model supports skills, you can use Loop with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Loop AI skill free?

Yes. It is published on GitHub by danielmiessler under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇