loop

loop is a skill for Claude Code from Abilityai/abilities. It costs 101 tokens per session (6,626 once invoked), scanned A, original, MIT.

A bounded loop runner for sending a task to a remote Trinity agent repeatedly in sequence. It can chain each response into the next, stop after a fixed limit or signal, and continue running after your session disconnects.

In plain words
What is it for?
Use it for remote iterative refinement, repeated agent tasks, or bounded polling; local mode is available for work that should stay on your machine.
Why use it?
It handles retries, polling, and iterative work that must continue on the server rather than depending on an open local chat session.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool; mentions Claude Code.

Part of the trinity plugin — 7 skills shipped together

Good fit Use it for remote iterative refinement, repeated agent tasks, or bounded polling; local mode is available for work that should stay on your machine.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/abilityai/abilities/loop
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 Abilityai/abilities --skill loop
Clone the repo
git clone --depth 1 https://github.com/Abilityai/abilities

Made for: Claude Code.

Or install trinity, the plugin that ships this one along with the rest of its 7 skills.

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 loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/abilityai/abilities/loop/github.svg)](https://agentmods.dev/skills/abilityai/abilities/loop)
Your own site
<a href="https://agentmods.dev/skills/abilityai/abilities/loop"><img src="https://agentmods.dev/badge/skills/abilityai/abilities/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 loop

Your own site · 80×15
<a href="https://agentmods.dev/skills/abilityai/abilities/loop"><img src="https://agentmods.dev/badge/skills/abilityai/abilities/loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,626 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00101 $0.06626
Opus 5.5 $0.00040 $0.02650
Sonnet 5.5 $0.00020 $0.01325
Haiku 4.5 $0.00010 $0.00663

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

Security

Grade A, and why

loop scanned grade A with 1 finding 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 7d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- "1.5.1: Reworded the connection prerequisite to the canonical block shared with /trinity:sync and /trinity:onboard — delegates to /trinity:connect (the single connection owner), reconnect via /mcp, never the CLI/curl"
plugins/trinity/skills/loop/SKILL.md · 262 lines

How it starts

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

/trinity:loop — run a remote agent in a sequential loop (or run it locally with local)

ℹ️ First, set expectations: before anything else, print one short line with this skill's version and its most recent change — the top entry of metadata.changelog above — e.g. loop vX.Y — recent: <summary>. Then proceed.

The remote counterpart to Claude Code's built-in /loop. Where /loop re-invokes your local session on a cadence, /trinity:loop hands one bounded, sequential loop to a remote Trinity agent: you fire it once with run_agent_loop, get a loop_id, and can walk away — the backend runs every iteration in order, optionally chaining each response into the next, and exits on a hard cap or a stop signal.

Use it for iterative refinement, agentic retry, and bounded polling that must outlive your session (and the sync MCP window — a plain chat_with_agent hands back a queued_timeout receipt at ~25s; a server-side loop outlives all of that). When the task lives on this machine and doesn't need to outlive the session, add local to run the same bounded loop natively here — see Local mode.

Usage

/trinity:loop [@agent] <message>             start a remote loop (default verb)
/trinity:loop local <message>                run the loop natively in this session
/trinity:loop status <loop_id>               show per-run progress
/trinity:loop stop <loop_id>                 request a graceful stop

No @agent means this agent's remote copy — the usual case is looping your own remote counterpart on Trinity.

Modifiers, anywhere in the message:

<N> times | x<N> | max <N>      iteration cap (max_runs, 1–100; default 5)
every <N>m | every <N>s         pause between iterations (delay_seconds, up to 1h)
until <condition> | stop when … Until mode — exits early on the [[DONE]] sentinel

Examples:

/trinity:loop @researcher draft section {{run}} of the report, 5 times
/trinity:loop refine the report until every TODO marker is resolved — stop when none remain
/trinity:loop @ci-agent run the test suite until it passes, max 10
/trinity:loop @monitor poll the deploy every 2m until it's healthy
/trinity:loop local run the test suite until it passes, max 10
/trinity:loop status loop_a1b2c3
/trinity:loop stop loop_a1b2c3

Read the full file on GitHub · 262 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. 7d ago Changed · +1 lines b0cde443e761
  2. 16d ago Changed · +1 lines bcb49d83f0e9
  3. 29d ago Changed · +2 lines f57ee090b565
  4. 1mo ago Changed · +1 lines b00bb2ead106
  5. 1mo ago First seen · 257 lines · 101 tokens per session scan A ec64edd5d82e

Subscribe to this mod's changes

loop is a skill published in the GitHub repository Abilityai/abilities (12 stars, last pushed 3d ago), licensed MIT. It adds 101 tokens to every session and 6,626 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-07.

Related

Other skills, from other repositories

gke-compute-classes

Configures, optimizes, and troubleshoots GKE ComputeClasses. Use when configuring Spot VMs with on-demand fallback, targeting specific accelerators (GPUs/TPUs) or machine families, restricting ComputeClass access, or debugging pending pods related to node pool auto-creation. Do not use for cluster-level Node Auto…

google/skills · 83 tokens

gke-reliability

Improves GKE workload reliability, using PDBs, health probes, and topology spread constraints. Use when configuring GKE workload reliability, setting up PDBs, or configuring GKE health probes (liveness, readiness, startup). Don't use for generating K8s YAML manifests (use gke-manifest-generation) or disaster recovery…

google/skills · 85 tokens

gke-workload-security

Audits, configures, and hardens workload-level security controls for Google Kubernetes Engine (GKE) applications and namespaces. Covers running security audits (auditcluster.sh), enforcing Network Policies (default-deny and Dataplane V2 logging), isolating high-risk pods inside GKE Sandbox (gVisor), enforcing Pod…

google/skills · 171 tokens

cloud-architect

Designs cloud architectures, creates migration plans, generates cost optimization recommendations, and produces disaster recovery strategies across AWS, Azure, and GCP. Use when designing cloud architectures, planning migrations, or optimizing multi-cloud deployments. Invoke for Well-Architected Framework, cost…

Jeffallan/claude-skills · 71 tokens

nemo-automodel-launcher-config

Configure NeMo AutoModel job launches for interactive runs, Slurm clusters, and SkyPilot cloud execution.

NVIDIA/skills · 30 tokens

azure-mgmt-botservice-dotnet

Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".

microsoft/skills · 78 tokens