define-loop
Was er macht
Lässt den Assistenten eine sich wiederholende Routine aufbauen, die eine Liste von Aufgaben abarbeitet, etwa Support-Tickets oder Fehlermeldungen. Ergebnisse warten auf eine Prüfung durch einen Menschen. Er ist für Teams mit laufender Arbeit gedacht.
Wann du ihn nutzt
- ✓Wenn du willst, dass der Assistent dieselbe Art von Arbeit regelmäßig nach Zeitplan erledigt.
- ✓Wenn Aufgaben nachverfolgt werden müssen, damit sie nicht doppelt bearbeitet werden.
- ✓Wenn du die Ergebnisse des Assistenten prüfen willst, bevor sie versendet oder veröffentlicht werden.
Link zum Skill
https://github.com/yc-software/qm/blob/main/skills-seed/define-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
“Richte eine Routine ein, die jeden Morgen unsere Support-Tickets prüft und Antworten als Entwurf für meine Prüfung vorbereitet.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Assistent stellt ein paar Fragen, führt einen Eintrag als Test aus und speichert dann ein Vorgehensmuster. Die Schleife läuft nach Zeitplan und führt Buch über erledigte Einträge.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
define-loop — author a Loop
A Loop is a cron with a memory and a gate: a trigger, a playbook, a ledger of work items that survives across fires, ship-ready outputs held for a person, and a governor watching its health. Reach for one when the ask is "keep doing this kind of work", not "do this".
Intake, work, and judge turns use the loop's existing owner/scope authorization, credentials, command policy, and security posture. They run without surface tools or addressed delivery. Intake reads candidates; work prepares outputs; the judge inspects the work and executes the declared checks. Final external actions belong in the approved ship stage. The review gate controls loop output shipping; it is not a read-only sandbox for arbitrary shell commands or API calls in earlier stages.
A cron is enough when each fire is independent and nothing needs reviewing. Prefer the cron; a loop earns its complexity only when work items persist, must not be worked twice, and produce artifacts someone should see before they go out.
The one rule: never arm a loop you have not watched work. Stage 2 is not optional.
Stage 1 — Interview
Get these, in the user's own words. Ask about them one or two at a time, not as a form.
| What | Why it matters |
|---|---|
| Source of work | How to enumerate candidates each fire, and the stable id per item (Sentry issue id, Front conversation id). That id is the dedupe key — get it right or work repeats. |
| Trigger | A cadence (calendar cron in their timezone) or an event. Ask when output is actually useful, not just how often. |
| Success condition | What "done" means for ONE item. |
| Ship actions | Which externally-visible actions the loop may take (open_pr, send_email, front_reply). Anything not declared is a quarantine when it happens. |
| Caps | Optional. Propose defaults; record a decline without argument. |
| Escalation | Who the governor pings, and where. |
Writing the success condition
Free text, and it's the most load-bearing sentence in the loop. A good one has:
- one measurable end state — a test result, a linked PR, an empty queue
- a stated check — how the agent proves it ("
npm testexits 0", "the PR shows CI green") - the constraints that matter — what must not change on the way ("touches only the implicated module")
- a bound — "or park with a diagnosis after 5 turns", so a hopeless item stops burning money
The Sentry issue has a linked PR whose tests pass and CI is green, the fix touches only the implicated module, or park with a diagnosis after 5 turns.
Add successChecks for anything a command can settle (npm test, npm run lint). The
judge runs each check and reports its command and result. A missing or failed reported
check prevents completion even when the judge claims success. Check results are
model-reported, not an independent deterministic execution attestation.
Stage 2 — Shadow run (never skip)
Work one real item end to end, in this conversation, with the user watching. No loop record exists yet.
- Pull one real candidate from the source.
- Do the whole job to the ship line — write the actual PR or the actual reply — and stop.
- Show the user the finished artifact. Ask directly: would you have sent this?
- Fix what they flag. Repeat on a second item if the first needed real correction.
Then write the playbook from what you just did — the steps that actually worked, the dead ends worth skipping, the exact success condition you'd have wanted. A playbook written before the shadow run is a guess; one written after is a procedure.
Stage 3 — Emit
Create the loop with t
Häufige Fragen
Warum führt der Assistent zuerst einen Testeintrag aus?
Ein Testlauf zeigt dir die Arbeit, bevor die Routine von selbst startet. So überraschen dich geplante Ergebnisse nicht.
Reicht eine einfache geplante Aufgabe?
Wenn jeder Lauf unabhängig ist und nichts geprüft werden muss, reicht ein einfacher Zeitplan. Eine Schleife ist für Arbeit gedacht, die nachverfolgt und geprüft werden muss.
Wer gibt das endgültige Ergebnis frei?
Ein Mensch prüft die zurückgehaltenen Ergebnisse, bevor externe Aktionen erfolgen. Der Prüfschritt bestimmt, was veröffentlicht wird.
Details
Originalbeschreibung des Autors
Define a Loop — a durable scaffold that works a queue of recurring tasks autonomously (Sentry issues, Front tickets, small perf PRs) with its outputs held for human review. Use when someone wants an agent to keep doing a kind of work on a schedule, rather than one-off. Walks the interview, runs one real item live before arming anything, then writes the playbook and creates the loop.
repo: yc-software/qm
Beliebtheit
- GitHub-Sterne
- 16k
- Platz im Ranking
- #10888
- Lizenz
- MIT
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
deploy-qm
16kStellt das QM-Paket auf Fly.io, AWS oder Render bereit und richtet danach einen Administrator, Konnektoren und optional Slack ein, nach einer vollständigen Checkliste.
onboarding
16kFührt einen neuen Nutzer in einem kurzen Gespräch durch das Verbinden von Konten, das Beschreiben seiner Arbeitsweise, die Wahl einer Stimme und die erste Hilfe.
admin
16kLässt einen geprüften Organisations-Administrator unternehmensweite und andere Einstellungen im Chat prüfen oder ändern, wobei jede Änderung vorher bestätigt werden muss.
browse
16kSteuert einen echten Stealth-Browser aus deiner Shell, um auf Websites zu handeln, etwa sich anzumelden oder Formulare auszufüllen. Anmeldungen bleiben pro Person erhalten. Gedacht für Aktionen, nicht zum Lesen.
Ähnliche Skills
knowledge-automation
394kHilft deinem Agenten, einen wiederkehrenden Auftrag einzurichten, der regelmäßig neue Inhalte in deinen Knowledge-Vault bringt, und danach zu prüfen, ob er läuft.
knowledge-source-ingest
394kHilft deinem Agenten, den Knowledge-Vault mit neuen Einträgen aus Chat-Kanälen, Feeds oder Postfächern aktuell zu halten, ohne bereits Vorhandenes erneut hinzuzufügen.
benchmark
280kHilft deinem Agenten, die Geschwindigkeit und Performance von Code zu messen. Nützlich, um Tempo sicherzustellen und Bremsen zu finden.