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/richfrem/agent-plugins-skills/dual-loopnpx skills add richfrem/agent-plugins-skills --skill dual-loopgit clone --depth 1 https://github.com/richfrem/agent-plugins-skillsWrote 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/richfrem/agent-plugins-skills/dual-loop)<a href="https://agentmods.dev/skills/richfrem/agent-plugins-skills/dual-loop"><img src="https://agentmods.dev/badge/skills/richfrem/agent-plugins-skills/dual-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.00055 | $0.00668 |
| Opus 5 | $0.00028 | $0.00334 |
| Sonnet 5 | $0.00011 | $0.00134 |
| Haiku 4.5 | $0.00006 | $0.00067 |
Grade A, and why
dual-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 today.
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 — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Dual-Loop (Inner/Outer Agent Delegation)
The Dual-Loop architecture splits work between a strategic Outer Loop (Supervisor/Director) and an execution-focused Inner Loop (tactical coding sub-agent). The Outer Loop organizes tasks, delegates via Strategy Packets, verifies output, and generates Correction Packets.
1. Setup & Interactive Orientation (Outer Loop)
- Decomposition: Break work down into atomic, testable Work Packages (WPs).
- Interactive CLI & Model Selection: Ask user for preferred CLI (
agy,claude,copilot,codex,llama) and model. Consultreferences/cheapest_models.json. - Workspace Isolation: Receive isolated git worktree or directory branch from orchestrator.
2. Strategy Packet Generation & Dispatch
- Author Strategy Packet (
handoffs/task_packet_NNN.md):- Scope, target files, acceptance criteria, and explicit "NO GIT" rule for the Inner Loop.
- Dispatch sub-agent with standard input redirected (
< /dev/nullto preventSIGTTINhalts):python scripts/run_agent.py handoffs/task_packet_001.md <target_file> handoffs/result.md \ "Execute strategy packet exactly." --cli <cli> --model "<model>" < /dev/null
3. Supervised Verification Gates
Upon completion signal, the Outer Loop verifies output:
- Delta Audit: Run
git diffto verify only authorized paths were modified; zero stub placeholders (TODO,TBD). - Automated Test Run: Run unit and integration tests mechanically.
- Outcome Resolution:
- PASS: Mark complete, update task tracker, proceed to closure.
- FAIL: Issue a Correction Packet categorized by severity:
- 🔴 CRITICAL: Fails compile/tests. Return immediate error diagnostics.
- 🟡 MODERATE: Breaks architecture/conventions. Cite specific rule.
- 🟢 MINOR: Style only. Supervisor fixes directly.
4. Retrospective & Closure
- Conduct post-run self-assessment survey (
references/post_run_survey.md). - If friction reoccurs 3+ times, flag for triple-loop escalation.
- Merge verified branch and emit handoff summary.
What ships with it
8 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.
- today Changed · -145 lines · -25 tokens per session 2cf39bc1e10a
- 4d ago First seen · 201 lines · 80 tokens per session scan A 75611c28c3fe
dual-loop is a skill published in the GitHub repository richfrem/agent-plugins-skills (6 stars, last pushed yesterday), licensed MIT. It adds 55 tokens to every session and 668 once invoked, about $0.0003 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
bootstrap
Generate a personalized SOUL.md through a warm, adaptive onboarding conversation. Trigger when the user wants to create, set up, or initialize their AI partner's identity — e.g., "create my SOUL.md", "bootstrap my agent", "set up my AI partner", "define who you are", "let's do onboarding", "personalize this AI", "make…
multi-agent
Orchestrate a task across multiple AI models/providers. Define a team of agents with different roles, providers, and models. Each agent handles a phase (planning, execution, auditing, etc.) and results are combined. (/multi-agent, orchestrate, multi-model, team).
kapso-whatsapp
How to interact with Kapso WhatsApp from the swarm — read inbound webhook payloads (text AND media), fetch message history, send free-form messages within the 24h session window (and template messages outside it), mark-as-read, show the typing indicator, send reactions, download media, verify webhook signatures, and…
prd
Generates a Product Requirements Document from a natural language app description. Asks clarifying questions, researches similar apps, defines scope, stack, architecture, and produces a structured PRD that Archon can decompose into a campaign.
attio-interaction
Generic Attio CRM REST API v2 recipes for querying records, upserting companies/people/deals, writing notes/tasks/comments, managing lists, and handling webhooks.
scheduled-task-resilience
Guardrails for polling, scheduled jobs, and long-running external operations. Use whenever a task waits on CI, builds, deploys, browser jobs, or another asynchronous API so work survives heartbeat checks without duplicate delivery.