turnstile-loop-start

A process for repeatedly pursuing a stated goal until an observable success condition is met, a maximum number of attempts is reached, or an unrecoverable error occurs.

In plain words
What is it for?
It is for starting an autonomous or manually confirmed loop with a required goal, success condition, and optional iteration limit.
Why use it?
It structures repeated agent work around a clear finish condition and keeps track of the run’s progress.

Skill for Claude CodeCodex

Part of the turnstile plugin — 24 skills, 23 commands, 5 agents, 3 hooks, 1 MCP server shipped together

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/febradc-github/turnstile/turnstile-loop-start
Any agent
npx skills add febradc-github/turnstile --skill turnstile-loop-start
Clone the repo
git clone --depth 1 https://github.com/febradc-github/turnstile

Made for: Claude Code, Codex.

Or install turnstile, the plugin that ships this one along with the rest of its 24 skills, 23 commands, 5 agents, 3 hooks, 1 MCP server.

Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,127 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00050 $0.01127
Opus 5 $0.00025 $0.00563
Sonnet 5 $0.00010 $0.00225
Haiku 4.5 $0.00005 $0.00113

Measured 2d ago against content hash 971f93d89d8a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

turnstile-loop-start 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 2d 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.

skills/turnstile-loop-start/SKILL.md · 96 lines

How it starts

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

Loop Start

Process

1. Parse arguments

From $ARGUMENTS, extract:

  • goal (required) -- what the loop is trying to accomplish.
  • success (required) -- the observable condition that marks the loop done.
  • max-iterations (optional, default 3) -- hard cap; must be a positive integer.

If goal or success is missing, tell the user the required arguments and stop.

Validate max-iterations: if present and not a positive integer, tell the user and stop.

2. Determine mode

Ask the user:

Run in loop mode? [y] autonomous -- iterations run uninterrupted until done [n] manual -- you confirm each DECIDE before the loop advances

Wait for the user's reply. Accept y/yes/Y as autonomous and n/no/N as manual. Any other input: re-ask once, then stop with an explanation.

3. Generate a loop id

Construct an id of the form L-<timestamp> where <timestamp> is the current Unix timestamp in seconds (e.g. L-1721000000). This id must be unique per run.

4. Initialise state

Determine the project root: use CLAUDE_PROJECT_DIR if set, otherwise process.cwd().

Run:

const { initState } = require('<pluginRoot>/scripts/loop-state.js');
initState(id, goal, success, maxIterations, mode, projectRoot);

Tell the user:

Loop <id> initialised. Goal: . Success: . Max iterations: . Mode: . State file: turnstile/loops//state.json

5. Query prior brain notes

Use the search_notes MCP tool to find any brain notes from previous runs that match the current goal string:

search_notes(query: goal)

Read the full file on GitHub · 96 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. 2d ago First seen · 96 lines · 50 tokens per session scan A 971f93d89d8a

Subscribe to this mod's changes

turnstile-loop-start is a skill published in the GitHub repository febradc-github/turnstile (1 stars, last pushed 1mo ago), licensed MIT. It adds 50 tokens to every session and 1,127 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.

Related

Other skills, from other repositories

model-compatibility

Model family compatibility matrix covering loaders, resolutions, samplers, CFG, VAE, ControlNet, and LoRA compatibility for SD 1.5, SDXL, Flux, SD3, and video models.

artokun/comfyui-mcp · 47 tokens

comfyui-node-registry

Authoring & publishing ComfyUI custom nodes to the Comfy Registry, covering node structure, pyproject.toml spec, comfy-cli publishing, and CI.

artokun/comfyui-mcp · 38 tokens

flux-txt2img

Build Flux txt2img workflows with Flux.1 Dev (SRPO), Flux 2 Klein 9B, Turbo LoRAs, FluxGuidance, and DualCLIPLoader patterns.

artokun/comfyui-mcp · 44 tokens

civitai

Discover Civitai models with the BUILT-IN downloadmodel action:"searchcivitai" and install/generate them locally. Find a checkpoint/LoRA/embedding on Civitai, download it into ComfyUI, and use its trigger words. Optionally pair the official Civitai MCP for community features (images browsing, posting, collections).

artokun/comfyui-mcp · 76 tokens

chief-strategy-officer

Owns where the business plays and how it wins over a multi-year horizon — portfolio choices, corporate development, strategic partnerships, and planning under uncertainty. Use this for a decision about which markets or businesses to be in, whether to build, buy, or partner, how to allocate capital across business…

cbrock84/headcount · 93 tokens

performance-analysis

Measurement approaches, profiling patterns, bottleneck identification, and optimization guidance. Use when diagnosing performance issues, establishing baselines, identifying bottlenecks, or planning for scale. Always measure before optimizing.

rsmdt/the-startup · 42 tokens