Loop

A repeated-improvement workflow that runs several complete review cycles on the same target. A target might be code, a prompt, a diagram, or writing.

In plain words
What is it for?
Use it to refine work over multiple rounds while tracking improvement and dead ends. It is useful when each new pass should build on the previous one.
Why use it?
One pass is often not enough, and manual repetition can lose earlier decisions, rejected ideas, and evidence of progress. This workflow carries those details into the next cycle and allows review between cycles.

Skill for Claude CodeCodex

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 skills/danielmiessler/lifeos/loop
Any agent
npx skills add danielmiessler/LifeOS --skill loop
Clone the repo
git clone --depth 1 https://github.com/danielmiessler/LifeOS

Made for: Claude Code, Codex.

Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 988 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.00037 $0.00988
Opus 5 $0.00018 $0.00494
Sonnet 5 $0.00007 $0.00198
Haiku 4.5 $0.00004 $0.00099

Measured 2d ago against content hash fe047b46eb63, 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.

LifeOS/install/skills/Loop/SKILL.md · 81 lines

How it starts

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

/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

Read the full file on GitHub · 81 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 · 81 lines · 37 tokens per session scan A fe047b46eb63

Subscribe to this mod's changes

Loop is a skill published in the GitHub repository danielmiessler/LifeOS (18,798 stars, last pushed 18d ago), licensed MIT. It adds 37 tokens to every session and 988 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

mobile-harness

Portable Android and iOS device-control harness for agents. Use when an agent needs to control or automate Android/iOS devices — tap, swipe, screenshot, app control — locally (ADB/Portal/Simulator) or on Mobilerun cloud devices.

droidrun/mobile-harness · 54 tokens

macos-harness

Control a whole Mac from one persistent Python session with screenshots, PID-targeted input, an animated virtual pointer, targeted Apple Accessibility, Apple Events, Browser Harness CDP, and filesystem access. Use for native, Electron, browser, dialog, file, or cross-app tasks without moving the physical cursor or…

Zfinix/aster · 71 tokens

aster-cli

Guidance for using the aster CLI to work in a codebase with an AI agent: chat and edit code, run AI code reviews, apply fixes, and manage sessions, memory, and skills. Use when running or designing aster commands, reviewing a diff or PR with aster, or when the user mentions aster review, aster chat, aster fix, or…

Zfinix/aster · 85 tokens

aster-config

Reference for aster.yaml, covering review models, analyzers, focus areas, include/exclude globs, minconfidence, and the permissions block that gates edits. Use when creating or editing aster.yaml, choosing hypothesis/verify models, enabling semgrep or ast-grep, or configuring edit permissions.

Zfinix/aster · 65 tokens

aster-chat-sessions

Drive aster chat programmatically and manage sessions and memory: one-shot --print/--json answers, --messages-json for caller-owned history, --continue and --session persistence, --allow-edits gating, and the sessions/memory commands. Use when scripting aster chat, integrating it into an editor or agent, or inspecting…

Zfinix/aster · 74 tokens

aster-review-ci

Run aster code reviews non-interactively in CI, GitHub Actions, or from another agent. Covers aster review --pr, --json, --stream, --comment, diff-from-stdin, token handling, and filtering findings. Use when wiring aster into a pipeline, posting PR comments, or parsing review output programmatically.

Zfinix/aster · 75 tokens