goal-loop

goal-loop is a skill for Claude Code, Codex from lamenting-hawthorn/SkillLoop. It costs 49 tokens per session (3,191 once invoked), scanned A, original, Apache-2.0.

A recurring work pattern that lets an agent retry a task until a clear, machine-checkable condition is met. A cron job is a scheduled command, and the pattern uses one agent to make changes and another to check them.

In plain words
What is it for?
Use it for repeated coding, testing, building, or linting tasks when an automated check can decide whether the objective has been reached.
Why use it?
It helps with work that may need several attempts while preventing vague or subjective definitions of “done.”

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it for repeated coding, testing, building, or linting tasks when an automated check can decide whether the objective has been reached.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lamenting-hawthorn/skillloop/goal-loop
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.

Any agent
npx skills add lamenting-hawthorn/SkillLoop --skill goal-loop
Clone the repo
git clone --depth 1 https://github.com/lamenting-hawthorn/SkillLoop

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for goal-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/lamenting-hawthorn/skillloop/goal-loop/github.svg)](https://agentmods.dev/skills/lamenting-hawthorn/skillloop/goal-loop)
Your own site
<a href="https://agentmods.dev/skills/lamenting-hawthorn/skillloop/goal-loop"><img src="https://agentmods.dev/badge/skills/lamenting-hawthorn/skillloop/goal-loop/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for goal-loop

Your own site · 80×15
<a href="https://agentmods.dev/skills/lamenting-hawthorn/skillloop/goal-loop"><img src="https://agentmods.dev/badge/skills/lamenting-hawthorn/skillloop/goal-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,191 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00049 $0.03191
Opus 5.5 $0.00020 $0.01276
Sonnet 5.5 $0.00010 $0.00638
Haiku 4.5 $0.00005 $0.00319

Measured 2mo ago against content hash 0a949de1ee12, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

goal-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 2mo 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.

references/hermes-skills/goal-loop/SKILL.md · 354 lines

How it starts

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

Goal Loop — The /goal Pattern

The /goal primitive: a cron job that runs on a cadence until an objective condition is met, verified by an independent checker model — not the agent that writes the code. This is the maker-vs-checker split applied to the stop condition itself.

When to Use

  • After passing the pre-loop-checklist (4-condition test + 30-second check)
  • When you have a clear, machine-checkable goal condition
  • When the work is iterative (agent tries, fails, learns, retries)
  • When verification can be fully automated

Do NOT use for:

  • One-shot tasks (use a single delegate_task)
  • Vague goals ("make it better")
  • Work that can't be verified by a test/build/linter
  • Anything where "done" is a judgment call

The Pattern (4 Parts)

                     ┌──────────────────────┐
                     │   Cron job fires on   │
                     │   cadence (e.g. 30m)  │
                     └──────────┬───────────┘
                                │
                     ┌──────────▼───────────┐
                     │  Read STATE.md        │
                     │  (resume, don't       │
                     │   restart from zero)  │
                     └──────────┬───────────┘
                                │
                     ┌──────────▼───────────┐
                     │  CHECKER subagent     │
                     │  (DIFFERENT model)    │
                     │  Evaluate: is goal    │
                     │  condition met?       │
                     └──────────┬───────────┘
                                │
                    ┌───────────┴───────────┐
                    │                       │
                    ▼                       ▼
              ┌──────────┐           ┌──────────┐
              │  GOAL    │           │  GOAL    │
              │  MET ✓   │           │  NOT MET │
              └────┬─────┘           └────┬─────┘
                   │                      │
                   ▼                      ▼
              ┌──────────┐           ┌──────────┐
              │  Report  │           │  WORKER   │
              │  success │           │  subagent │
              │  Update  │           │  (does    │
              │  STATE   │           │   the     │
              │  Option: │           │   work)   │
              │  self-   │           └────┬─────┘
              │  cancel  │                │
              └──────────┘                ▼
                                   ┌──────────┐
                                   │  Update  │
                                   │  STATE   │
                                   │  Report  │
                                   │  progress│
                                   │  (loop   │
                                   │   again  │
                                   │   next   │
                                   │   tick)  │
                                   └──────────┘

Read the full file on GitHub · 354 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. 2mo ago First seen · 354 lines · 49 tokens per session scan A 0a949de1ee12

Subscribe to this mod's changes

goal-loop is a skill published in the GitHub repository lamenting-hawthorn/SkillLoop (9 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 49 tokens to every session and 3,191 once invoked, about $0.0002 per session on Opus 5.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-31.

Related

Other skills, from other repositories

model_finetuning

Fine-tune LLMs using reinforcement learning with TRL - SFT for instruction tuning, DPO for preference alignment, PPO/GRPO for reward optimization, and reward model training. Use when need RLHF, align model with preferences, or train from human feedback. Works with HuggingFace Transformers.

vuralserhat86/antigravity-agentic-skills · 67 tokens

model_finetuning

Fine-tune LLMs using reinforcement learning with TRL - SFT for instruction tuning, DPO for preference alignment, PPO/GRPO for reward optimization, and reward model training. Use when need RLHF, align model with preferences, or train from human feedback. Works with HuggingFace Transformers.

DonggangChen/antigravity-agentic-skills · 67 tokens

openlore

Query and publish to an OpenLore knowledge repository over SSH using ordinary shell commands. Use when a task needs project documentation, runbooks, shared team knowledge, or a place to publish findings.

aakarim/OpenLore · 42 tokens

wikiskill-proposer

Propose skills from wiki patterns and traces (WikiSkill).

ashutoshsinghpr7/wikiskill · 18 tokens

llm-finetuning

Use this skill when the user says 'fine-tune an LLM', 'LoRA', 'QLoRA', 'PEFT', 'SFT', 'instruction tuning', 'TRL SFTTrainer', 'DPO', 'train on my data', 'merge adapter'. Decides whether fine-tuning is the right tool, prepares chat-format datasets, configures LoRA/QLoRA with PEFT and TRL, evaluates against the base…

j4flmao/agent-skills · 152 tokens

role-ai-ml-engineer

Use when orchestrating AI/ML systems, RAG pipeline architecture, multi-provider model routing, prompt engineering, agent self-improvement, model fine-tuning, and LLM serving deployments.

oyi77/1ai-skills · 45 tokens