Agent Loop Skill logo

Agent Loop Skill

Community
dososo
agent-loop-skill

Build and run long-running AI agent workflows for Codex, Claude Code, Cursor, and other coding agents with contracts, disk-backed state, role separation, verification traces, restart criteria, subjective scoring, and harness cleanup. Use when a user asks an agent to complete multi-step coding, product, research, content, design, debugging, batch generation, or cross-session tasks that require planning, repeated execution, evidence, or recovery after failures.

Overview

Publisherdososo
Repositoryagent-loop-skill
Skill nameagent-loop-skill
Stars
32
Forks
4
Bundled files
1
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 dososo on GitHub. Read the source before you install it.

Installation

Install the Agent Loop Skill 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/dososo/agent-loop-skill/tree/main/skills/agent-loop-skill
  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/dososo/agent-loop-skill.git /tmp/agent-loop-skill
mkdir -p .claude/skills
cp -r /tmp/agent-loop-skill/skills/agent-loop-skill .claude/skills/agent-loop-skill
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Agent Loop Skill 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 Agent Loop Skill 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 Agent Loop Skill 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.

Agent Loop Skill

Use this skill to turn an open-ended agent task into a repeatable loop that can run, verify, recover, and finish without relying only on chat context.

Do not use the full loop for trivial one-line answers, simple typo fixes, or single commands with obvious output.

Quick Start

When the task is non-trivial:

  1. Read the user request and local project context.
  2. Create .agent-loop/contract.md.
  3. Create .agent-loop/progress.md.
  4. Create .agent-loop/log.md.
  5. Split work into Planner, Generator, and Evaluator roles.
  6. Execute the smallest verifiable round.
  7. Save evidence in logs, traces, screenshots, command output, or diffs.
  8. Fix, restart, or finish based on the contract.
  9. Remove or justify temporary harness files before delivery.

1. Write The Loop, Not Just The Prompt

Convert the request into a loop before doing the work.

Define:

  • the final deliverable
  • in-scope work
  • out-of-scope work
  • acceptance criteria
  • validation commands or evidence
  • restart criteria
  • stop conditions

If chat messages are repeating without progress, stop and write the loop to disk.

2. Separate Roles

Use three roles by default:

  • Planner: clarify the goal, scope, risks, acceptance criteria, and execution order.
  • Generator: implement, edit, generate, or repair only inside the contract.
  • Evaluator: test, inspect, read traces, and decide whether acceptance criteria pass.

Add a Referee only when the roles disagree. The Referee arbitrates; it does not expand scope.

3. Negotiate The Contract First

Before writing final code or content, write .agent-loop/contract.md.

Use this structure:

text
Goal:
In scope:
Out of scope:
Definition of done:
Acceptance criteria:
Validation commands:
Subjective scoring criteria:
Risk assumptions:
Stop conditions:
Restart conditions:
Final deliverables:

Avoid vague criteria. Each item must be checkable through command output, screenshot, trace, log, diff, checklist, or scorecard.

4. Write To Disk, Not To Context

For long work, maintain these files:

text
.agent-loop/contract.md
.agent-loop/progress.md
.agent-loop/log.md

Use optional files only when useful:

text
.agent-loop/state.json
.agent-loop/scorecard.md
.agent-loop/defects.md
.agent-loop/traces/

If these files cannot describe the state clearly, split the task.

Append to .agent-loop/log.md; do not rewrite history.

5. Let The Loop Restart

Restart from the contract when:

  • the same acceptance item fails twice
  • implementation is turning into patches on patches
  • tests pass but the deliverable misses the user goal
  • the log shows the contract was forgotten
  • continuing is more expensive than a clean retry

Before restarting, append the failure reason and evidence to .agent-loop/log.md.

6. Score The Subjective

For design, writing, UX, product, architecture, or taste-heavy work, write the scoring criteria before judging the result.

Default dimensions:

DimensionQuestion
FunctionalityDoes it solve the real target problem?
SimplicityDoes it avoid unnecessary abstraction and scope?
CraftAre details, naming, flow, and edge cases handled well?
OriginalityDoes it show judgment instead of copying a template?

Score 0-10 and write one sentence of evidence per dimension.

When references exist, compare against at least one strong sample, one weak sample, and the current output.

7. Read The Traces

Judge from evidence, not intuition.

Useful traces include:

  • test output
  • build logs
  • console errors
  • browser screenshots
  • Playwright traces
  • API requests and responses
  • diffs
  • generated artifacts
  • user-visible output

If trace evidence conflicts with intuition, trust the trace and create a smaller reproduction.

8. Delete The Harness

Before delivery, inspect whether the harness still helps.

Review:

  • temporary scripts
  • debug logs
  • redundant state files
  • verification-only code
  • stale traces
  • overgrown automation

Delete, archive, or justify anything that should not remain in the final project.

9. The Bottleneck Always Moves

At the end of each round, update .agent-loop/progress.md:

text
Current bottleneck:
Why this is the bottleneck:
How the next round will verify it is solved:

When coding is solved, planning may become the bottleneck. When planning is solved, verification may become the bottleneck. Keep looking for the current constraint.

Default Completion Standard

Only finish when:

  • every contract item passes
  • every acceptance criterion has evidence
  • .agent-loop/progress.md has no unresolved blocker
  • .agent-loop/log.md explains key decisions and failed attempts
  • subjective work has a scorecard or user approval
  • temporary harness files are removed or justified
  • final deliverables are usable directly

Suggested Trigger

text
Use agent-loop-skill for this task. Write the contract first, keep state in .agent-loop, separate Planner/Generator/Evaluator, verify each round with traces, and restart if the same acceptance item fails twice.

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

Build and run long-running AI agent workflows for Codex, Claude Code, Cursor, and other coding agents with contracts, disk-backed state, role separation, verification traces, restart criteria, subjective scoring, and harness cleanup. Use when a user asks an agent to complete multi-step coding, product, research, content, design, debugging, batch generation, or cross-session tasks that require planning, repeated execution, evidence, or recovery after failures.

Why use Agent Loop Skill on TypingMind?

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

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dososo/agent-loop-skill/tree/main/skills/agent-loop-skill. 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 Agent Loop Skill?

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 Agent Loop Skill?

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

Is the Agent Loop Skill AI skill free?

It is published on GitHub by dososo. Check the repository for licensing terms. 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 👇