define-loop

define-loop is a skill for Claude Code, Codex from yc-software/qm. It costs 87 tokens per session (1,347 once invoked), scanned A, original, MIT.

A guided setup for a recurring work loop: an agent finds queued items, works on them, records what happened, and holds results for human review. It is meant for repeated work rather than a one-time request.

In plain words
What is it for?
It helps define scheduled workflows for items such as Sentry issues, support tickets, or small performance changes.
Why use it?
It prevents recurring tasks from being duplicated or sent out without review, while keeping a record across runs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps define scheduled workflows for items such as Sentry issues, support tickets, or small performance changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yc-software/qm/define-loop
About the project

QM is a shared work environment for coding agents that gives each employee and conversation an isolated workspace while allowing collaboration in Slack and on the web. Startups use it to run agents for individuals, teams, and company operations, with selectable harnesses and models. The catalogue entries extend QM with skills, instructions, and settings.

yc-software/qm · 15,434 stars · on GitHub · x.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add yc-software/qm --skill define-loop
Clone the repo
git clone --depth 1 https://github.com/yc-software/qm

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for define-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/yc-software/qm/define-loop/github.svg)](https://agentmods.dev/skills/yc-software/qm/define-loop)
Your own site
<a href="https://agentmods.dev/skills/yc-software/qm/define-loop"><img src="https://agentmods.dev/badge/skills/yc-software/qm/define-loop/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for define-loop

Your own site · 80×15
<a href="https://agentmods.dev/skills/yc-software/qm/define-loop"><img src="https://agentmods.dev/badge/skills/yc-software/qm/define-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,347 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00087 $0.01347
Opus 5.5 $0.00035 $0.00539
Sonnet 5.5 $0.00017 $0.00269
Haiku 4.5 $0.00009 $0.00135

Measured 28d ago against content hash 82ec9028bded, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

define-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 28d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills-seed/define-loop/SKILL.md · 105 lines

How it starts

The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on 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.

Read the full file on GitHub · 105 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 28d ago Changed · +5 lines 82ec9028bded
  2. 1mo ago First seen · 100 lines · 87 tokens per session scan A 10e465bbe1a2

Subscribe to this mod's changes

define-loop is a skill published in the GitHub repository yc-software/qm (15,434 stars, last pushed today), licensed MIT. It adds 87 tokens to every session and 1,347 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-08.