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/sananthanarayan/skilldrop/agent-loop-designnpx skills add sananthanarayan/skilldrop --skill agent-loop-designgit clone --depth 1 https://github.com/sananthanarayan/skilldropWhat 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.00092 | $0.01704 |
| Opus 5 | $0.00046 | $0.00852 |
| Sonnet 5 | $0.00018 | $0.00341 |
| Haiku 4.5 | $0.00009 | $0.00170 |
Grade A, and why
agent-loop-design 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 3d 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 — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.
agent-loop-design
You shouldn't be prompting agents; you should be designing the loops that prompt them — and a loop is only as good as its exits. This skill produces a loop spec: the states, gates, caps, and failure routes that turn "run the agent again until it looks right" into a system a team can trust unattended. feature-implement-loop is this repo's worked example of the pattern (generate → adversarial review → gate, capped at 3 rounds); this skill designs new loops for the user's own tasks. Fan-out inside a stage is subagent-design's job; what the loop may spend is agent-budget's.
How to respond
-
Pin the loop's job and its "done". Ask at most 2 questions, spent on: "what artifact does one successful run produce?" and "how would a human verify it's right without watching the run?" The done-condition must be observable — tests pass, checklist satisfied, reviewer-agent returns zero blockers — never "output looks good". No observable done-condition derivable → the task isn't loop-ready; say what needs defining first. Non-interactive run (no user to ask): derive both from the input and tag
[assumption]; no artifact derivable → emitBLOCKED: need the task and its done-condition. -
Draw the state machine — generate, verify, gate, and nothing mushier.
- Generate: produces or revises the artifact. Must consume the verifier's findings from the previous round as explicit input — a generate step that can't see why it failed is retry, not iteration.
- Verify: judges the artifact against the done-condition. The verifier is never the generator — same model grading its own homework inflates; use a different persona, prompt, or agent (
devils-advocate-style adversarial framing where quality is the risk, or programmatic checks where they exist — cheapest adequate check wins, perllm-eval-harness's grading ladder). - Gate: routes on the verdict — pass → exit/handoff; fail → generate with findings; fail at cap → escalate. Every loop has exactly these three state types; "polish", "reflect", and "improve" states with no verdict are where loops go to wander.
What ships with it
4 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.
- 3d ago First seen · 69 lines · 92 tokens per session scan A bc66758d04f7
agent-loop-design is a skill published in the GitHub repository sananthanarayan/skilldrop (2 stars, last pushed 19d ago), licensed MIT. It adds 92 tokens to every session and 1,704 once invoked, about $0.0005 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
openlore-brainstorm
Transform a feature idea into an annotated story using a Domain Sketch or Constrained Option Tree. Use when asked to brainstorm, explore, or shape a feature before implementation.
openlore-analyze-codebase
Run a full static OpenLore analysis and summarize architecture, call graph, refactoring issues, and duplicate code. Use when asked to analyze, map, or assess a codebase without LLM inference.
openlore-review-changes
Review code changes using OpenLore risk, call, coverage, and cluster evidence without editing code. Use when asked for a change review, pre-PR safety check, or merge recommendation.
architect-implement
Generate a full Architecture Description (AD.md) from accepted ADRs using multi-agent DAG orchestration. Use when accepted ADRs exist and you need to produce or update unified architecture documentation.
team-repair
Re-index OKF v0.2 index.md/log.md files, derive CDR.md, rebuild .skills.json and AGENTS.md in team-ai-directives, migrate v0.1→v0.2 frontmatter, scan for rule conflicts, and verify directive freshness. Use when indexes are inconsistent, orphans are detected, after bulk changes, or for periodic team AI directives…
mission-brief
Mission-driven SDD orchestrator: take a feature description, structure it into a Mission Brief (goal, constraints, success criteria), generate an ordered step list with prompts that trigger installed SDD skills via model invocation or command-file discovery, and walk those steps to converged implementation. Use when…