select-loop-strategy

select-loop-strategy is a skill for Claude Code, Codex from richfrem/agent-plugins-skills. It costs 53 tokens per session (1,108 once invoked), scanned A, original, MIT.

Selects the optimal agent orchestration or looping strategy for a given task using a deterministic decision tree. Distinguishes between solo discovery, dual-loop delegation, adversarial review, parallel swarms, meta-learning, and deterministic graph-state machines.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/richfrem/agent-plugins-skills/select-loop-strategy
Any agent
npx skills add richfrem/agent-plugins-skills --skill select-loop-strategy
Clone the repo
git clone --depth 1 https://github.com/richfrem/agent-plugins-skills

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 select-loop-strategy

README.md
[![agentmods](https://agentmods.dev/badge/skills/richfrem/agent-plugins-skills/select-loop-strategy.svg)](https://agentmods.dev/skills/richfrem/agent-plugins-skills/select-loop-strategy)
Your own site
<a href="https://agentmods.dev/skills/richfrem/agent-plugins-skills/select-loop-strategy"><img src="https://agentmods.dev/badge/skills/richfrem/agent-plugins-skills/select-loop-strategy.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,108 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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 $0.00053 $0.01108
Opus 5 $0.00026 $0.00554
Sonnet 5 $0.00011 $0.00222
Haiku 4.5 $0.00005 $0.00111

Measured today against content hash 35c68297afba, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

select-loop-strategy 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.

plugins/agent-orchestration/skills/select-loop-strategy/SKILL.md · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Select Loop Strategy: Orchestration Pattern Decision Tree

Provides a deterministic decision framework to help agents and developers select the right execution topology for any given software engineering, research, or system evolution task.


The Master Decision Tree

Evaluate your task against the following gates in order:

[Incoming Task / Trigger]
    │
    ▼
1. Does the task require strict human approval gates, formal state tracking, 
   transactional worktree isolation, or automatic rollbacks on test failure?
   ├─ YES ──▶ Pattern 7: graph-execution (Deterministic State Machine)
   └─ NO  ──▶ continue
    │
    ▼
2. Can the work be partitioned into 10+ independent, non-overlapping items 
   that execute simultaneously with zero shared state?
   ├─ YES ──▶ Pattern 4: agent-swarm (Parallel Fan-Out)
   └─ NO  ──▶ continue
    │
    ▼
3. Is the primary requirement adversarial critique, security analysis, 
   or multi-perspective red-teaming until an explicit "Approved" verdict?
   ├─ YES ──▶ Pattern 2: red-team-review (Generator / Critic Feedback)
   └─ NO  ──▶ continue
    │
    ▼
4. Does the task involve unguided friction discovery, automated hypothesis 
   testing, and headless benchmark evaluation over long horizons?
   ├─ YES ──▶ Pattern 5: triple-loop-learning (Meta-Learning System)
   └─ NO  ──▶ continue
    │
    ▼
5. Does the task require separating strategy/git management (Outer Loop) 
   from tactical coding/test execution (Inner Loop)?
   ├─ YES ──▶ Pattern 3: dual-loop (Hierarchical Delegation)
   │          (Optionally use co-pilot-loop for Claude + Gemini Flash Low pairing)
   └─ NO  ──▶ continue
    │
    ▼
6. Is this self-directed research, documentation, or local exploratory discovery 
   where the agent works autonomously in a single context window?
   └─ YES ──▶ Pattern 1: learning-loop (Single-Agent Cognitive Continuity)

Pattern Comparison Matrix

Pattern Skill Core Mechanics Primary Use Case Risk / Tradeoff
1. Solo Learning learning-loop Single context, orientation $\rightarrow$ synthesis $\rightarrow$ closure Research, documentation, local spikes Risk of context drift on large tasks
2. Adversarial Review red-team-review Generator + multi-persona critics, convergence limit Security audits, architectural decisions High token cost; multi-round latency
3. Dual-Loop dual-loop Outer Director (Git) $\leftrightarrow$ Inner Worker (No Git) Features, bugs, bounded code changes Inner agent must wait for manager review
4. Parallel Swarm agent-swarm Partitioned jobs, concurrent batch worker runners Bulk migrations, mass doc generation Merge conflicts if tasks share dependencies
5. Meta-Learning triple-loop-learning Friction logging $\rightarrow$ hypothesis $\rightarrow$ headless eval Autonomous system self-optimization Requires objective automated test harness
6. Fast-Tier Pair co-pilot-loop Claude (Director) + Gemini Flash Low (Worker) Cost-sensitive rapid prototyping Requires multi-CLI tooling configuration
7. Graph Execution graph-execution Deterministic DAG state transitions, receipts, rollbacks High-assurance self-evolution, safe migrations Highest structural rigor; state files required

Read the full file on GitHub · 94 lines

Files

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.

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. today First seen · 94 lines · 53 tokens per session scan A 35c68297afba

Subscribe to this mod's changes

select-loop-strategy is a skill published in the GitHub repository richfrem/agent-plugins-skills (6 stars, last pushed today), licensed MIT. It adds 53 tokens to every session and 1,108 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-09-03.

Related

Other skills, from other repositories

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…

desplega-ai/agent-swarm · 156 tokens

composio

Use Composio from Agent Swarm through the agent-swarm x composio CLI route, the swarmx MCP tool, or a registered ctx.api.composio script connection. Trigger when a task needs connected third-party app tools such as Gmail, Google Calendar, Google Docs, Google Drive, GitHub, Slack, Notion, or HubSpot through Tool Router…

desplega-ai/agent-swarm · 128 tokens

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.

desplega-ai/agent-swarm · 39 tokens

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.

desplega-ai/agent-swarm · 48 tokens

swarm-scripts

Bulk, repeat, fan-out, or data-heavy work: write and run swarm scripts (inline script-run, named script-upsert, durable launch-script-run). Covers the script-vs-tool rubric, the authoring contract (args first, ctx second), the seed catalog, connections and secrets, dbquery, and exposing a script as an API.

desplega-ai/agent-swarm · 82 tokens

user-management

How to manage the user registry — creating users for new Slack/GitHub/GitLab/Linear identities, managing aliases, resolving users across platforms. Use when a new human interacts with the swarm or when user identity needs updating.

desplega-ai/agent-swarm · 49 tokens