# Define Loop

Define a Loop, a durable scaffold that works a queue of recurring tasks autonomously...

- Repository: https://github.com/yc-software/qm (15597 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add yc-software/qm --skill define-loop -g -a claude-code -y`
Codex: `npx skills add yc-software/qm --skill define-loop -g -a codex -y`
Cursor: `npx skills add yc-software/qm --skill define-loop -g -a cursor -y`
Gemini CLI: `npx skills add yc-software/qm --skill define-loop -g -a gemini-cli -y`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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.

The rest: https://github.com/yc-software/qm/blob/HEAD/skills-seed/define-loop/SKILL.md
