agentleFS
jpoindexterjpoindexter/ai-agent-skills/closed-loop/SKILL.md

closed-loop

Skill1 starsChanged 5 months agoMITView on GitHub

Run a bounded 5-stage agent loop (discover → plan → execute → evaluate → improve) against a defined goal, rubric, and stop rule. Use for marketing production, content ops, CRO, and any repeatable asset workflow.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Not for open-ended exploration — use fleet-loop for that.

    line 18

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Closed Loop

A bounded looping harness for producing high-quality assets. You define the goal, inputs, and rubric. The loop runs discover → plan → execute → evaluate → improve until every gate passes or the iteration cap is hit.

When to use

  • Landing page rewrites
  • Ad creative generation
  • Email nurture sequences
  • Content repurposing
  • SEO articles
  • Offer research and positioning

Not for open-ended exploration — use fleet-loop for that.

The 5 stages

StageJob
DiscoverResearch the market, buyer, offer, competitors, source material, or objections
PlanMap the work into clear steps with acceptance criteria
ExecuteDraft, build, or produce the asset
EvaluateScore the output against the rubric; identify what's below threshold
ImproveFix weak sections, re-run evaluation, repeat

Reusable prompt template

Goal:
[Business outcome — not just the asset type.]

Inputs:
- Audience:
- Offer:
- Source material:
- Brand voice:
- Constraints:

Loop:
1. Discover: research relevant context, extract useful facts.
2. Plan: break the work into clear steps.
3. Execute: produce the first draft.
4. Evaluate: score against the rubric below.
5. Improve: fix anything below the pass threshold.
6. Repeat until every gate passes or you hit the stop rule.

Eval rubric:
- Clear target buyer: pass/fail
- Specific pain or desire addressed: 1–10
- Strong proof (evidence, data, testimony): 1–10
- Differentiated angle (not generic): 1–10
- Concrete examples: 1–10
- No generic filler: pass/fail
- CTA or next step is obvious: pass/fail

Stop rule:
Stop when every scored item is 8/10 or higher and every pass/fail gate passes.
If the loop runs 3 times without improvement, stop and explain the blocker.

Worked examples

Landing page

  • Discover: ICP, offer, competitors, objections, current page
  • Plan: hero, proof, mechanism, offer, CTA, FAQ
  • Execute: rewrite each section
  • Eval: clarity, specificity, proof, objection handling, CTA strength
  • Improve: fix any section under 8/10

Ad creative

  • Discover: customer language, reviews, competitor ads, pain points
  • Plan: angles (pain, proof, contrarian, urgency, identity, demo)
  • Execute: hooks, body copy, CTA
  • Eval: reject generic claims, weak hooks, unclear offer
  • Improve: 3 stronger variants per winning angle

Content repurposing

  • Discover: thesis, claims, proof, sharp lines from source
  • Plan: formats (LinkedIn, X thread, newsletter, short script)
  • Execute: draft each asset
  • Eval: voice fidelity, platform fit, specificity, usefulness
  • Improve: cut generic sections, add concrete examples

Slop prevention

  • The eval gate is the difference between compounding quality and compounding slop.
  • Where an objective gate exists (test, build, lint, word count, link check), it outranks the rubric score — a rubric without any objective signal is the agent grading its own homework.
  • Loose goals ("make it better") always produce generic output. Specify what "better" means.
  • Cap iterations. If quality stops improving after 3 runs, surface the blocker — don't iterate into noise.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.