Aller au contenu
Skillpedia
Agents48k · #4765

goal-loop

Ce qu’il fait

La commande `/goal` transforme une tâche en un processus continu que l'agent gère de manière autonome. Il suit un cycle de planification, d'action, de test et de relecture, jusqu'à ce que la tâche soit terminée, que l'utilisateur la mette en pause, ou que le temps ou les ressources soient épuisés.

Quand l’utiliser

  • ✓Lorsqu'une tâche devrait prendre plus de 30 minutes.
  • ✓Lorsqu'il existe un moyen clair de vérifier si la tâche est terminée (par exemple, si les tests passent).
  • ✓Lorsque le projet est déjà prêt pour l'automatisation (avec des tests et de la documentation).

Lien du skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/goal-loop/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/goal-loop/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Crée un plan pour migrer notre projet de Python 2 vers Python 3, en veillant à ce que tous les tests passent et que l'API publique reste inchangée.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'agent reçoit des instructions claires sur l'objectif, sur ce qu'il ne doit pas modifier, sur la manière de vérifier l'avancement et sur le moment où il doit s'arrêter. Il travaille par étapes et rend compte de ses actions, jusqu'à ce que l'objectif soit atteint ou qu'une intervention humaine soit nécessaire.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis 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 /goal feature — 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:

  1. Task is >30 min of mechanical work.
  2. There's a verifiable stop condition (tests pass, coverage hit, eval ≥ X, build green).
  3. Repo is agent-ready (working build, decent tests, AGENTS.md present).

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)

  1. Objective — one sentence, one concrete outcome.
  2. Constraints — what must NOT change (public API, files, libs, conventions).
  3. Validation command — the exact shell command that proves progress (pytest -q, pnpm test, etc.).
  4. Stop condition — verifiable: "Stop when X passes" OR "when further changes need human/product input."
  5. Documentation — one sentence instructing the agent to write concise, targeted docs for every change, either creating new .md files 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 /goal prompt must include a single sentence committing the agent to concise, targeted docs — new .md files or focused updates to existing docs.

…

Questions fréquentes

Qu'est-ce que la « Ralph loop » ?

C'est le nom interne du processus utilisé par `/goal` : planifier, agir, tester, relire, puis recommencer jusqu'à ce que l'objectif soit atteint.

Puis-je utiliser `/goal` pour n'importe quelle tâche ?

Non, c'est idéal pour les tâches longues et bien définies, avec un critère de fin clair. Ce n'est pas adapté aux travaux exploratoires ni aux tâches sans point d'arrivée défini.

Qu'est-ce qu'une « condition d'arrêt vérifiable » ?

C'est une règle claire et objective qui signale la fin de la tâche, par exemple « tous les tests sont passés » ou « la couverture de code a atteint X % ». C'est quelque chose de mesurable.

Détails

Description originale de l’auteur

Draft and explain persistent goal-loop prompts for long-running agent work with clear stop conditions.

repo: sickn33/agentic-awesome-skills

Popularité

Étoiles GitHub
48k
Position au classement
#4765
Licence
MIT
Mis à jour
15/10/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires