Loop Engineer logo

Loop Engineer

Community
fltman
loop-engineer

Set up, scaffold, and administer agentic loops in Claude Code — headless while-loops around `claude -p`, evaluator-optimizer (generator/critic) loops, meta / prompt-refinement loops (a loop that refines the prompts another loop runs), and orchestrator fan-out. Every loop ships with non-negotiable guardrails: a verifiable exit condition, a max-iteration cap, and in-code budget enforcement. Use whenever the user wants to build, design, run, wire, or supervise loops / agent loops / "loop engineering" / nested sub-loops, or asks how to make Claude prompt Claude on a schedule or until a goal is met.

Overview

Publisherfltman
Repositoryloop-engineer
Skill nameloop-engineer
Stars
37
Forks
5
Bundled files
8
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.

  • 8 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

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

Installation

Install the Loop Engineer 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.
    https://github.com/fltman/loop-engineer/tree/main/.claude/skills/loop-engineer
  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/fltman/loop-engineer.git /tmp/loop-engineer
mkdir -p .claude/skills
cp -r /tmp/loop-engineer/.claude/skills/loop-engineer .claude/skills/loop-engineer
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Loop Engineer 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 Engineer 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 Engineer 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 Engineer

Loops are the third object of attention in coding: source code → agent → loop. Your job with this skill is to turn a user's goal into the right loop pattern, scaffolded with guardrails so it can't "loopmaxx" (run forever against a vague objective and burn money).

The one rule that prevents most disasters

Refuse to build a loop without a binary, verifiable exit condition. "Improve the UX" has no pass/fail and produces infinite loops + large API bills. "Make npm test exit 0" does. If the user's goal isn't binary, your first job is to help them make it binary — not to scaffold the loop.

Decision tree — pick the pattern

Is the goal one binary check the agent iterates toward (tests pass, lint clean)?
│
├─ YES, one agent is enough .......................... HEADLESS WHILE-LOOP
│        (templates/headless-loop.sh)                  or first-party /goal
│
├─ Quality matters & "done" is a judgment call ...... EVALUATOR-OPTIMIZER
│        (writing, code that must meet a bar)          (templates/evaluator-optimizer.sh)
│        → ALWAYS a separate critic agent
│
├─ You're improving the PROMPT itself, not the output  META / PROMPT-REFINEMENT
│        (a loop that rewrites the prompt another      (templates/meta-prompt-refine.sh)
│         loop runs, scored on a test set)             → needs holdout + anchor set
│
├─ Subtasks can't be predicted up front ............. ORCHESTRATOR FAN-OUT
│        (delegate dynamically, then verify each)      (templates/fanout-orchestrator.sh
│                                                        or the Workflow tool)
│
└─ Just run something on a schedule / interval ...... /loop or cloud Routines
         (poll, babysit PRs, recurring checks)         (reference/primitives.md)

Nest these: an orchestrator loop can spawn evaluator-optimizer inner loops; a meta loop wraps a headless loop and rewrites its prompt between runs.

Non-negotiable guardrail checklist

Before scaffolding ANY loop, confirm all five. See reference/guardrails.md for the why.

  1. Verifiable exit condition — a command/check that returns binary done/not-done.
  2. Max-iteration cap — a hard for bound, enforced in code, not in the prompt.
  3. Budget cap in code — sum total_cost_usd from --output-format json; stop before the next call when over budget. Alerts are not enforcement.
  4. Sandbox — loops that edit files/run commands run in a worktree, container, or branch — never unattended on main.
  5. Human checkpoint — for anything outward-facing (push, deploy, send), the loop stops and asks, or only proposes.

A loop missing #1 or #2 is a bug, not a loop. Don't ship it.

How to use this skill

  1. Read the user's goal; map it to a pattern via the decision tree.
  2. If the goal isn't binary/verifiable, fix that first (with the user).
  3. Copy the matching template from templates/, fill the config block, and wire the real exit check. Keep the guardrails.
  4. Walk the user through the five-point checklist for their specific loop.
  5. Tell them how to run it, how to stop it, and what it costs per iteration.

Reference (load as needed)

  • reference/primitives.md — every Claude Code loop primitive: claude -p, --continue/--resume, --output-format json (cost), /loop, /goal, Tasks (~/.claude/tasks, CLAUDE_CODE_TASK_LIST_ID), cloud Routines.
  • reference/taxonomy.md — the five patterns in depth + when to use each.
  • reference/guardrails.md — failure modes (loopmaxxing, cost blowups, evaluator collusion/drift) and the mitigations, with the cautionary numbers.
  • templates/*.sh, templates/goal-loop.md — runnable scaffolds.

What NOT to claim

Anthropic's Building Effective Agents is the canonical taxonomy source, but it does not officially endorse "shell fan-out loops" or "headless-in-CI with Task tracking" — those are community patterns. Attribute them as such.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Loop Engineer AI skill do?

Set up, scaffold, and administer agentic loops in Claude Code — headless while-loops around `claude -p`, evaluator-optimizer (generator/critic) loops, meta / prompt-refinement loops (a loop that refines the prompts another loop runs), and orchestrator fan-out. Every loop ships with non-negotiable guardrails: a verifiable exit condition, a max-iteration cap, and in-code budget enforcement. Use whenever the user wants to build, design, run, wire, or supervise loops / agent loops / "loop engineering" / nested sub-loops, or asks how to make Claude prompt Claude on a schedule or until a goal is...

Why use Loop Engineer on TypingMind?

Because you install it once and use it with any model. Loop Engineer 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 Engineer in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/fltman/loop-engineer/tree/main/.claude/skills/loop-engineer. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Loop Engineer?

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 Engineer?

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

Is the Loop Engineer AI skill free?

Yes. It is published on GitHub by fltman 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 👇