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.
npx agentmods add skills/emaraschio/cursor-commands/design-agent-loopnpx skills add emaraschio/cursor-commands --skill design-agent-loopgit clone --depth 1 https://github.com/emaraschio/cursor-commandsWrote 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.
[](https://agentmods.dev/skills/emaraschio/cursor-commands/design-agent-loop)<a href="https://agentmods.dev/skills/emaraschio/cursor-commands/design-agent-loop"><img src="https://agentmods.dev/badge/skills/emaraschio/cursor-commands/design-agent-loop.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00157 | $0.03444 |
| Opus 5 | $0.00078 | $0.01722 |
| Sonnet 5 | $0.00031 | $0.00689 |
| Haiku 4.5 | $0.00016 | $0.00344 |
Grade A, and why
design-agent-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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 214 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Design agent loop
Role
You design the loop a repeated task travels through, not the prompt that runs it once. You take a TASK and its COMPLETION CRITERIA and return a graph: nodes with context, tools, expected output, and evidence; transitions with named triggers; retry and escalation edges with ceilings; human approval gates on irreversible work; five eval cases with a scorecard; and one bottleneck to automate first.
This is a two-step handshake. Step one, you design the graph and stop. Step two, only after a later explicit execute now, you run one test case through the loop and improve the loop from what happened. Approving the graph is not permission to run the workload.
When to use
Use when the user invokes /design-agent-loop, or asks to design a reusable agent routine, workflow graph, or state machine for work that repeats and needs verification between steps. For a single delegated run with no repetition or verify cycle, use define-agent-goal. For raising artifact quality against a real reference, use gauntlet-loop. For choosing which business workflow to automate at all, use automation-roi-audit.
Loop charter
Repetition first, or route away. Graph before prompt. Every node states context, tools, expected output, and evidence. Every edge names its trigger. Retries capped, budget ceilinged, irreversible work gated on a human. Unverifiable steps stay manual. Evals sized to volume. One bottleneck first. Design and halt; run one case only on execute now.
Workflow
Run phases in order. Do not start the underlying TASK while designing, and do not run the loop until a later explicit execute now.
Phase 0: Intake
- Require two fields:
- TASK: the work the loop performs on each pass
- COMPLETION CRITERIA: the exact, observable definition of done for one pass
- Optionally accept: CONSTRAINTS (limits the loop must not cross, such as no production writes or do not close tickets), available tools, BUDGET (wall-clock, token, or spend ceiling), retry preferences, and volume (how often this loop runs). Every constraint the user supplies must survive into the design as a forbidden transition, an approval gate, or an eval fail signal. Never accept a constraint and then leave it out of the graph.
- If TASK or COMPLETION CRITERIA is missing, ask one focused question per gap. Do not invent the criteria and do not design against a vague bar like "make it good".
- Repetition check. If the work runs once, has no verification step, and has no retry cycle, say so and route to
define-agent-goalinstead of drawing a graph. Do not build a loop for a one-shot delegation. - Do not execute the TASK, edit code, or run destructive commands in this phase.
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 5d ago First seen · 214 lines · 157 tokens per session scan A 01040473edb5
design-agent-loop is a skill published in the GitHub repository emaraschio/cursor-commands (9 stars, last pushed 28d ago), licensed MIT. It adds 157 tokens to every session and 3,444 once invoked, about $0.0008 per session on Opus 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-08-31.
Other skills, from other repositories
grok-build-supervisor
Initialize the persistent local proxy, then immediately ensure a visible Grok Build TUI for the current workspace when /grokexecute on activates, and continuously supervise that coding-agent session through a user-level Supervisor daemon as the user sends work, waits for completion, reconnects from another host task…
cursor-delegate
Delegate bounded light-to-medium implementation, investigation, documentation, configuration, testing, and tooling work to Cursor Bridge after the primary agent owns direction and risk boundaries. Also use when the user explicitly asks to create, keep, continue, inspect, or close the same Cursor execution session…
grok-executor-mode
Task-local execution policy applied to ordinary user tasks only after an exact /grokexecute on; the host agent then plans, supervises, corrects, and verifies while all implementation and workspace-mutating execution goes through Grok Build Supervisor. Never activate or deactivate from ordinary requests, task text…
deep-research
Conducts multi-step deep research on any topic using iterative search, reflection, and synthesis. Use when the user asks to research, investigate, survey, compare, analyze, deep-dive, or explore a topic in depth. Covers web research, codebase analysis, documentation review, mixed-source investigation, and M3…
incident-triage-harness
Production-style incident triage workflow for logs, metrics, code, safe mitigations, and M3 multimodal visual evidence (screenshots, screen recordings). Use when debugging alerts, regressions, outages, or suspicious runtime behavior.
pm-patrol-routine
Project Manager patrol for GitHub repos. Triages new issues, reviews PRs for completeness (not code quality), verifies fixes match issue requirements, closes resolved issues, and coordinates between engineer and reviewer. Integrates with issue-patrol-routine (Scotty) and review-patrol-routine (Rémy).