Agent skill

Define Loop

by yc-software in yc-software/qm

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.

MITAuto-check passedProductivity & Automation

Install Define Loop

skills CLI
$ npx skills add yc-software/qm --skill define-loop -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install yc-software/qm define-loop --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/yc-software/qm.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills-seed/define-loop .claude/skills/define-loop && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
define-loop
GitHub stars
15k
Token cost
~1.6k tokens
SKILL.md length
874 words
Files
1
Skills in repo
29
Repo updated
First seen
Licence
MIT

At a glance

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.

  • Works in 4 steps: Interview → Shadow run (never skip) → Emit → …
  • Someone wants an agent to keep doing a kind of work on a schedule
  • SKILL.md covers Stage 1 — Interview, Stage 2 — Shadow run (never…, Stage 3 — Emit and Stage 4 — Supervised fires, plus 2 more sections
  • Calls npm

What it does

Define Loop is an agent skill from yc-software/qm. 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.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Productivity & Automation, covering Scheduled and recurring tasks. It works with Sentry. The repository describes itself as: Multiplayer agent harness for work. The licence is MIT.

When your agent uses it

  • Someone wants an agent to keep doing a kind of work on a schedule
  • Rather than one-off

Example prompts

  • “/define-loop”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Interview
  2. Shadow run (never skip)
  3. Emit
  4. Supervised fires

What it can do on your machine

Read from SKILL.md and the folder at commit 23af31b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Define Loop loads about 1.6k tokens when it runs. Until then it costs about 99 tokens; SKILL.md has 874 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~99
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from yc-software/qm at commit 23af31b, republished under its MIT licence (© yc-software). 874 words, ~1,641 tokens.

Download SKILL.mdSave it as .claude/skills/define-loop/SKILL.md (or your agent's skills folder).
name
define-loop
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.

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.

WhatWhy it matters
Source of workHow 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.
TriggerA cadence (calendar cron in their timezone) or an event. Ask when output is actually useful, not just how often.
Success conditionWhat "done" means for ONE item.
Ship actionsWhich externally-visible actions the loop may take (open_pr, send_email, front_reply). Anything not declared is a quarantine when it happens.
CapsOptional. Propose defaults; record a decline without argument.
EscalationWho 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 test exits 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.

Show full SKILL.md (402 more words)Show less

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.

  1. Pull one real candidate from the source.
  2. Do the whole job to the ship line — write the actual PR or the actual reply — and stop.
  3. Show the user the finished artifact. Ask directly: would you have sent this?
  4. 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 the loop tool: name, purpose, playbook, success condition, checks, ship actions, caps, trigger. Every ship action starts at hold no matter what was asked for — auto is earned in stage 4, never granted at creation.

State back to the user, in one message: what it will do, when it fires, what it will produce, what it will hold for them, and how to pause it.

Stage 4 — Supervised fires

Watch the first few fires with the user.

  • Review the held outputs together the first time.
  • When a slice of work has been shipped unchanged several times running, offer graduation: "always ship open_pr labelled lint-fix from this loop". That writes a standing grant and flips only that slice to auto. If the org disables always-grants, graduation is unavailable — say so plainly instead of half-doing it.
  • If outputs keep coming back returned, the playbook is wrong, not the reviewer. Fix the playbook; a high return rate is the loudest signal a loop isn't working.

Editing a live loop

Playbook edits are versioned with provenance, from chat or the UI — same path, one history. "Skip payments-service tickets from now on" is a playbook edit, so make it one: propose the diff, get agreement, write it. Never let a loop carry behavior that isn't readable in its playbook.

Refuse to arm

Say no, and say why, when:

  • the user can't state a stable per-item id (work will repeat)
  • the success condition has no measurable end state (nothing can judge it)
  • auto is requested at creation on an externally-visible action (that's stage 4's job)
  • the shadow run never produced an artifact the user would actually send

© yc-software, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills-seed/define-loop of yc-software/qm.

Open the folder on GitHubat commit 23af31b

Compare with similar skills

Define Loop next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Define Loop compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Define Loop this skillyc-software/qm15k—~1.6kAutomated safety check: PassMIT
Superset Automatesuperset-sh/superset15k—~1.4kAutomated safety check: PassCustom licence
Sentry Nextjs SDKgetsentry/sentry-for-ai268—~4.7kAutomated safety check: NotesApache-2.0
Sentry Cloudflare SDKgetsentry/sentry-for-ai268—~5.3kAutomated safety check: PassApache-2.0
Sentry Dotnet SDKgetsentry/sentry-for-ai268—~5.8kAutomated safety check: PassApache-2.0
Sentry Elixir SDKgetsentry/sentry-for-ai268—~3.5kAutomated safety check: PassApache-2.0

Similar skills

  • Superset Automate

    superset-sh/superset

    Turns a recurring chore into a scheduled or event-triggered Superset agent, drafting its prompt, picking a target and trigger, and reviewing the first run.

    15k GitHub stars~1.4k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Sentry Nextjs SDK

    getsentry/sentry-for-ai

    Official

    Full Sentry SDK setup for Next.js. An agent skill from getsentry/sentry-for-ai.

    268 GitHub stars~4.7k tokensUpdated today
    Productivity & AutomationAuto-check: notes
  • Sentry Cloudflare SDK

    getsentry/sentry-for-ai

    Official

    Full Sentry SDK setup for Cloudflare Workers and Pages. An agent skill from getsentry/sentry-for-ai.

    268 GitHub stars~5.3k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Sentry Dotnet SDK

    getsentry/sentry-for-ai

    Official

    Full Sentry SDK setup for .NET. An agent skill from getsentry/sentry-for-ai.

    268 GitHub stars~5.8k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Sentry Elixir SDK

    getsentry/sentry-for-ai

    Official

    Full Sentry SDK setup for Elixir. An agent skill from getsentry/sentry-for-ai.

    268 GitHub stars~3.5k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Sentry Node SDK

    getsentry/sentry-for-ai

    Official

    Full Sentry SDK setup for Node.js, Bun, and Deno. An agent skill from getsentry/sentry-for-ai.

    268 GitHub stars~8.4k tokensUpdated today
    Backend & APIsAuto-check passed

More from yc-software/qm

All 29 skills in this repo
  • Admin

    yc-software/qm

    Act for an org admin — the admin API (scope directory, per-scope config & SOUL, any scope's memory, transcripts & captured prompts, files, user roster & external users, audit/errors/metrics/egress)…

    15k GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • Browse

    yc-software/qm

    Drive a real stealth browser from your shell — act on websites (order food, file an expense, pull data behind a login), with per-person persistent sign-ins via the provider's managed auth (Kernel…

    15k GitHub stars~4k tokensUpdated today
    Auto-check passed
  • Composio

    yc-software/qm

    Show the app connection picker or setup widget when users ask to connect apps, reopen setup, or need an app that isn't connected yet.

    15k GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Dev Instance

    yc-software/qm

    Run the current worktree as a production-shaped local dev instance with web, Slack, or both, on a real LLM + Postgres.

    15k GitHub stars~3.7k tokensUpdated today
    Auto-check: notes
  • GitHub GitLab

    yc-software/qm

    Work with GitHub and GitLab repositories through resident gh/glab/git auth on the agent computer.

    15k GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Google Workspace

    yc-software/qm

    Read and act on the user's Gmail, Google Calendar, and Google Tasks through per-user OAuth.

    15k GitHub stars~1.8k tokensUpdated today
    Auto-check passed

Works with

Questions about Define Loop

What does Define Loop do?

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. Define Loop is an agent skill from yc-software/qm. 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.

When should I use Define Loop?

Define Loop fits situations like: someone wants an agent to keep doing a kind of work on a schedule; rather than one-off.

How do I install Define Loop in Claude Code?

Run `npx skills add yc-software/qm --skill define-loop -a claude-code`. Or copy the skill folder (skills-seed/define-loop in yc-software/qm) into .claude/skills/define-loop in your project. Claude Code loads it when a task matches its description.

How do I install Define Loop in Codex?

Run `npx skills add yc-software/qm --skill define-loop -a codex`. Or copy the skill folder (skills-seed/define-loop in yc-software/qm) into .agents/skills/define-loop in your project. Codex loads it when a task matches its description.

Can I use Define Loop in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add yc-software/qm --skill define-loop -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/define-loop, .gemini/skills/define-loop, .github/skills/define-loop and .opencode/skills/define-loop in your project.

What does Define Loop need to run?

Going by SKILL.md and its folder, Define Loop needs the command-line tools its instructions call (npm).

Does Define Loop access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Define Loop safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Define Loop use?

Define Loop is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Define Loop use?

About 1.6k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Define Loop?

Skills that share tags, products or a category with Define Loop: Superset Automate (superset-sh/superset, 15k stars), Sentry Nextjs SDK (getsentry/sentry-for-ai, 268 stars), Sentry Cloudflare SDK (getsentry/sentry-for-ai, 268 stars) and Sentry Dotnet SDK (getsentry/sentry-for-ai, 268 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Define Loop?

yc-software (a GitHub organization) maintains it in yc-software/qm, which has 15,357 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on October 6, 2026.

Source: yc-software/qm on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.