loop-goal-engineering

loop-goal-engineering is a skill for Claude Code from RadOrigin-LLC/RAD-Claude-Skills. It costs 193 tokens per session (1,438 once invoked), scanned A, original, Apache-2.0.

A guide for writing instructions that let coding agents keep working through a backlog or until a clearly testable condition is met. It also covers files that preserve progress between runs.

In plain words
What is it for?
Use it to write loop prompts, completion conditions, stop checks, or a multi-day project setup for autonomous coding work.
Why use it?
It helps prevent agents from stopping too early, looping without purpose, or lacking a reliable definition of finished work.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the rad-context-prompter plugin — 3 skills, 1 agent shipped together

Good fit Use it to write loop prompts, completion conditions, stop checks, or a multi-day project setup for autonomous coding work.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add RadOrigin-LLC/RAD-Claude-Skills
Claude Code
/plugin install rad-context-prompter

Made for: Claude Code.

Or install rad-context-prompter, the plugin that ships this one along with the rest of its 3 skills, 1 agent.

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 loop-goal-engineering

README.md
[![agentmods](https://agentmods.dev/badge/skills/radorigin-llc/rad-claude-skills/loop-goal-engineering/github.svg)](https://agentmods.dev/skills/radorigin-llc/rad-claude-skills/loop-goal-engineering)
Your own site
<a href="https://agentmods.dev/skills/radorigin-llc/rad-claude-skills/loop-goal-engineering"><img src="https://agentmods.dev/badge/skills/radorigin-llc/rad-claude-skills/loop-goal-engineering/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 loop-goal-engineering

Your own site · 80×15
<a href="https://agentmods.dev/skills/radorigin-llc/rad-claude-skills/loop-goal-engineering"><img src="https://agentmods.dev/badge/skills/radorigin-llc/rad-claude-skills/loop-goal-engineering.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 193 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,438 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.00193 $0.01438
Opus 5 $0.00097 $0.00719
Sonnet 5 $0.00039 $0.00288
Haiku 4.5 $0.00019 $0.00144

Measured 10d ago against content hash 1d3e80a18336, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

loop-goal-engineering 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 10d 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.

archive/plugins/rad-context-prompter/skills/loop-goal-engineering/SKILL.md · 124 lines

How it starts

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

Loop & Goal Engineering

Author the artifacts that drive autonomous agent runs: loop prompts (re-run cold each iteration until a backlog is done), goal conditions (machine- or evaluator-checkable completion criteria), and the long-horizon file scaffold that carries state between iterations.

The runtime primitives exist — Claude Code /goal and /loop, Stop hooks, Codex Goal Mode, bash while-loops. They all assume the human can already write a good loop prompt or goal condition. That authoring step is this skill's job.


Step 1 — Classify the Deliverable

User wants Deliverable Primary reference
Agent grinds through a backlog / overnight run Loop prompt (+ scaffold files) references/loop-patterns.md
Agent keeps working until X is true Goal condition references/goal-specs.md
Multi-hour/multi-day autonomous project Four-file scaffold + loop prompt + goal both
A check that must gate with zero exceptions Stop-hook script spec goal-specs.md §2

If the request is really a one-shot prompt with no iteration ("write a prompt that refactors this file"), hand off to the prompt-engineering skill.

Step 2 — Pick the Harness

Use the harness selection table in references/loop-patterns.md §1. Ask at most one question if the target runtime is ambiguous (Claude Code vs Codex vs raw bash loop) — it changes the output format:

  • Claude Code /goal → condition must be provable from the agent's own transcript output (the evaluator runs no commands itself)
  • Codex Goal Mode → Goal / Context / Constraints / Done-when skeleton
  • Stop hook → the condition becomes a script with exit codes
  • Bash/Ralph loop → full loop prompt + four-file scaffold + safety rails

Step 3 — Draft

Loop prompts: apply the ten rules in loop-patterns.md §2 — one task per iteration, state in files/git, search-before-assuming, no placeholders, in-iteration verification, protected tests, idempotency, per-iteration commits, bounds, one-deliverable scope. Start from the template in §4.

Read the full file on GitHub · 124 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 10d ago First seen · 124 lines · 193 tokens per session scan A 1d3e80a18336

Subscribe to this mod's changes

loop-goal-engineering is a skill published in the GitHub repository RadOrigin-LLC/RAD-Claude-Skills (5 stars, last pushed 24d ago), licensed Apache-2.0. It adds 193 tokens to every session and 1,438 once invoked, about $0.0010 per session on Opus 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

bug-reporting

Load this skill whenever you are filing, reviewing, or generating accessibility bug reports — whether from automated tool output, manual testing, user reports, or testing with disabled people. The purpose of this skill is to make accessibility findings easier to report accurately, connect them to real people and…

mgifford/accessibility-skills · 122 tokens

mermaid

Load this skill whenever the project uses Mermaid diagrams — flowcharts, sequence diagrams, class diagrams, Gantt charts, or any Mermaid-rendered visualization. Under no circumstances render a Mermaid diagram without an accessible title, description, and text-based alternative. Absolutely always add accTitle: and…

mgifford/accessibility-skills · 82 tokens

svg

Load this skill whenever the project contains SVG graphics — inline SVGs, external SVG files, SVG icons, SVG illustrations, or SVG-based data visualizations. Under no circumstances use SVG without proper accessible titles, descriptions, and ARIA roles where required. Absolutely always add and to meaningful SVGs and…

mgifford/accessibility-skills · 104 tokens

audio-video

Load this skill whenever the project contains audio or video content, media players, podcasts, video embeds, or any / elements. Under no circumstances publish audio or video without captions, transcripts, and audio descriptions where required. Absolutely always apply WCAG 1.2 criteria for time-based media.

mgifford/accessibility-skills · 65 tokens

charts-graphs

Load this skill whenever the project contains charts, graphs, data visualizations, infographics, or any visual representation of data (bar charts, line charts, pie charts, scatter plots, dashboards). Under no circumstances render a chart without a text alternative, data table, or summary. Prioritize conveying the same…

mgifford/accessibility-skills · 72 tokens

ci-cd

Load this skill when configuring or reviewing CI/CD pipelines, GitHub Actions workflows, or automated testing setups. Ensures accessibility regressions are caught before code reaches production by enforcing quality gates, structured reporting, and layered automated + manual testing across all pages and user…

mgifford/accessibility-skills · 57 tokens