Loop logo

Loop

Community
jtaroreh
loop

Run iterative verification hillclimbs against a concrete test command using Antigravity reactive scheduling. Use for /loop, 'loop until green', or automated hypothesis testing with a verification predicate.

Overview

Publisherjtaroreh
Repositoryagystack
Skill nameloop
Stars
120
Forks
12
Bundled files
1
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.

  • 1 bundled files

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

  • Open source

    Published by jtaroreh 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.
    https://github.com/jtaroreh/agystack/tree/main/skills/loop
  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/jtaroreh/agystack.git /tmp/agystack
mkdir -p .claude/skills
cp -r /tmp/agystack/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

Run iterative verification loops and hillclimbs on Antigravity without manual polling.

How It Works

The /loop skill drives discrete edits against a verification command (--verify "<command>"). It maintains iteration state in <appDataDir>/brain/<conversation-id>/scratch/loop/state.json. It uses the native Antigravity schedule tool to manage reactive iteration delays.

For open-ended autonomous tasks where no single bash exit code determines completion, use the /goal slash command or the Autonomous run playbook instead. For standing background jobs or periodic status checks, use the schedule tool directly.

Invocation

Format: /loop <goal> --verify "<command>" [--max-iterations N] [--interval S]

Default values:

  • max-iterations: 10
  • interval: 30 seconds

State Machine

The loop maintains durability through structured state transitions. The file state.json records git revision, active task ID, iteration counters, and status. During execution, state.json records git revision for each step.

  1. Frame. Read target files. Generate baseline evidence by executing the verify command via run_command or bash. Record initial state in <appDataDir>/brain/<conversation-id>/scratch/loop/state.json. Record the current git_revision from git rev-parse HEAD.
  2. Step. Apply one discrete edit or hypothesis. Update git_revision if a commit or checkpoint is created.
  3. Verify. Run the verification command. Capture stdout, stderr, and exit code.
  4. Decide.
    • When verify passes, log success, mark status CONVERGED, and finish.
    • When verify fails and iterations remain, record the delta, revert regressions if hillclimbing, and set a reactive timer using schedule(DurationSeconds=interval, Prompt="Loop iteration wakeup for <goal>", TimerCondition="never"). Update state.json with the returned task_id and next iteration count.
    • Stop calling tools immediately after scheduling to end the turn and let the timer fire.
    • When budget is reached, mark status EXHAUSTED and hand back to the user with a summary table.
  5. Wakeup. On schedule trigger, the agent reactively wakes up, reads state.json, and executes the next step.

Crash and Restart Recovery

The loop recovers gracefully across crashes, context compactions, or server restarts:

  1. State restoration. On session startup or resume, read <appDataDir>/brain/<conversation-id>/scratch/loop/state.json.
  2. Revision verification. Compare git rev-parse HEAD with the recorded git_revision. If the working tree has drifted, reset to the recorded revision before proceeding.
  3. Deduplication. Inspect the recorded task_id in state.json. Use manage_task with Action: "list" or Action: "status" to inspect pending scheduled tasks.
  4. Orphan cleanup. Kill stale or orphaned timers using manage_task with Action: "kill" to prevent duplicate wakeups.
  5. Execution resumption. Resume iteration from the restored state machine position without repeating finished work.

Arguments

ArgumentDescriptionDefault
goalDescription of the desired stateRequired
--verifyCommand that exits 0 on successRequired
--max-iterationsMaximum number of attempts10
--intervalDelay between iterations in seconds30

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 AI skill do?

Run iterative verification hillclimbs against a concrete test command using Antigravity reactive scheduling. Use for /loop, 'loop until green', or automated hypothesis testing with a verification predicate.

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/jtaroreh/agystack/tree/main/skills/loop. 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?

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 jtaroreh 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 👇