goal-loop
Was er macht
Der Befehl `/goal` verwandelt eine Aufgabe in einen fortlaufenden Prozess, den der Agent selbststÃĪndig abarbeitet. Er folgt einem Kreislauf aus Planen, Umsetzen, Testen und ÃberprÞfen, bis die Aufgabe erledigt ist, du ihn anhÃĪltst oder Zeit bzw. Ressourcen ausgehen.
Wann du ihn nutzt
- ✓Wenn eine Aufgabe voraussichtlich mehr als 30 Minuten dauert.
- ✓Wenn es einen klaren Weg gibt, zu prÞfen, ob die Aufgabe erledigt ist (z. B. wenn alle Tests laufen).
- ✓Wenn dein Projekt schon fÞr Automatisierung vorbereitet ist (mit Tests und Dokumentation).
Link zum Skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/goal-loop/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Erstelle einen Plan, um unser Projekt von Python 2 auf Python 3 umzustellen. Achte darauf, dass alle Tests weiterhin laufen und die Ãķffentliche API unverÃĪndert bleibt.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Agent bekommt klare Vorgaben: was das Ziel ist, was er nicht ÃĪndern darf, wie er den Fortschritt prÞft und wann er aufhÃķren soll. Er arbeitet in Schritten und berichtet, was er tut, bis das Ziel erreicht ist oder er deine Hilfe braucht.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Agent /goal Loop
What /goal is
/goal is a slash command that turns an agent prompt into a persistent agent looping plan → act → test → review → iterate until a stop condition is met, the user pauses, or the token budget runs out. Internally called the "Ralph loop."
Agents with the /goal feature right now: Codex, Claude Code, and Hermes Agent.
Key difference from a normal prompt: when a turn ends but the goal isn't met, the agent auto-continues instead of waiting for input.
Lifecycle states: pursuing, paused, achieved, unmet, budget-limited.
When monitoring a running /goal, every check should include a one-line update to the user: what the agent is doing and whether it is on track. Keep it extremely concise.
Not: a budget command, a safety boundary, "run forever", or a replacement for /plan. It's a contract enforcer with a verification loop.
Requirements
- An agent with the
/goalfeature — right now: Codex, Claude Code, or Hermes Agent - The goals feature enabled in the agent's config
- Subscription auth — API-key auth does not work. A pro-tier plan is the realistic minimum for long runs.
When to Use it
Use only when all three are true:
- Task is >30 min of mechanical work.
- There's a verifiable stop condition (tests pass, coverage hit, eval ≥ X, build green).
- Repo is agent-ready (working build, decent tests,
AGENTS.mdpresent).
Fits: migrations, coverage lifts, TDD feature builds, refactors with contract tests, prompt/eval optimization, deploy retry loops, bug-repro-then-fix.
Bad fits: exploratory work, vague "improve this", anything without a "done" definition, prod credentials, destructive shared-infra ops.
The 5-part contract (every goal needs this)
- Objective — one sentence, one concrete outcome.
- Constraints — what must NOT change (public API, files, libs, conventions).
- Validation command — the exact shell command that proves progress (
pytest -q,pnpm test, etc.). - Stop condition — verifiable: "Stop when X passes" OR "when further changes need human/product input."
- Documentation — one sentence instructing the agent to write concise, targeted docs for every change, either creating new
.mdfiles or updating existing ones.
Plus: tell the agent what to read first, ask it to work in checkpoints with a short progress log.
Writing a goal (the core deliverable)
When the user wants a quick /goal instruction, produce a structured markdown block with one line per contract item (proper newlines, not flowing prose). Do not prefix the output with /goal — the user adds the slash command themselves in the composer. Emit only the contract body. Template:
**Objective:** <one-sentence objective>
**Read first:** <files/PLAN.md/issue>
**Constraints:** <what not to change, libs, conventions>
**Validate:** `<exact command>` after each change
**Document:** Write concise, targeted documentation for all changes — create new `.md` files or update existing docs as needed.
**Checkpoints:** work in checkpoints and log progress briefly
**Stop when:** <verifiable condition>, OR when further changes require human/product input
Example (migration)
**Objective:** Migrate this project from Pydantic v1 to v2.
**Read first:** pyproject.toml, src/, tests/
**Constraints:** no public API changes; keep imports backwards-compatible via shims if needed; no new dependencies
**Validate:** `pytest -q` after each change
**Checkpoints:** work in checkpoints; log progress briefly
**Stop when:** full suite passes with zero deprecation warnings, OR when a change requires architecture decisions
Example (coverage lift)
**Objective:** Raise coverage in src/auth/ from ~38% to ≥75%.
**Read first:** src/auth/, tests/auth/, AGENTS.md
**Constraints:** no new deps; mirror existing test style; do not modify production code unless strictly required for testability
**Validate:** `pytest --cov=src/auth --cov-report=term-missing`
**Checkpoints:** work in checkpoints; log coverage delta each one
**Stop when:** coverage ≥75% AND all tests pass, OR when uncovered code needs design changes
Writing rules
- One objective, one stop condition. Not a backlog.
- Documentation is mandatory. Every
/goalprompt must include a single sentence committing the agent to concise, targeted docs — new.mdfiles or focused updates to existing docs.
…
Häufige Fragen
Was ist die 'Ralph-Schleife'?
Das ist der interne Name fÞr den Ablauf, den `/goal` nutzt: planen, umsetzen, testen, prÞfen und wiederholen, bis das Ziel erreicht ist.
Kann ich `/goal` fÞr jede Aufgabe nutzen?
Nein, es eignet sich am besten fÞr lange, gut beschriebene Aufgaben mit einem klaren Kriterium fÞr 'fertig'. FÞr explorative Arbeit oder Aufgaben ohne festes Ende ist es nicht geeignet.
Was ist eine 'ÞberprÞfbare Abbruchbedingung'?
Das ist eine klare, objektive Regel, die das Ende der Aufgabe markiert, zum Beispiel 'alle Tests sind bestanden' oder 'die Code-Abdeckung hat X % erreicht'. Also etwas Messbares.
Details
Originalbeschreibung des Autors
Draft and explain persistent goal-loop prompts for long-running agent work with clear stop conditions.
Beliebtheit
- GitHub-Sterne
- 48k
- Platz im Ranking
- #4765
- Lizenz
- MIT
- Aktualisiert
- 15.10.2026
Kommentare
- …
Weitere Skills aus diesem Repository
00-andruia-consultant
48kHilft deinem Agenten, KI-Projekte zu starten oder zu verbessern. Er analysiert Code, schlägt Tools vor und erstellt Aktionspläne auf Spanisch.
007
48kLässt deinen Agenten Sicherheitsaudits und Bedrohungsmodellierung durchführen. Nützlich, um Projekte vor Angriffen und Schwachstellen zu schützen.
10-andruia-skill-smith
48kHilft deinem Agenten, KI-Tools zu erstellen oder zu verbessern. Er legt fest, wie Tools funktionieren, schreibt die Dokumentation und prüft die Struktur.
20-andruia-niche-intelligence
48kLässt deinen Agenten eine Branchenzusammenfassung erstellen. Nützlich, um Kontext, Regeln, Nutzungsmuster und Risiken anhand verlässlicher Quellen zu verstehen.
Ähnliche Skills
add-model-provider
394kLässt deinen Agenten einen neuen KI-Modellanbieter mit sicheren Befehlen an OpenClaw anbinden, API-Schlüssel nicht im Klartext speichern und einen Live-Test starten.
acp-router
394kHilft deinem Agenten, eine Aufgabe über OpenClaw an einen Coding-Assistenten wie Claude Code oder Cursor zu senden, damit die Arbeit in diesem Tool läuft.
browser-automation
394kBringt deinem Agenten bei, Webseiten Schritt für Schritt zu steuern, einschließlich Anmeldungen, Tabs und Wiederherstellung, wenn eine Seite nicht mehr reagiert.