loop

A pass-by-pass control system for an ongoing work loop. It stores loop status and limits each agent turn to one pass so the process can continue safely through later turns.

In plain words
What is it for?
Use it for repeated research, coding, or review tasks that need several separate passes, shared state, and a clear stopping rule.
Why use it?
It prevents an agent from running indefinitely without yielding control. It also helps preserve progress, enforce time limits, and stop when the work becomes stuck or complete.

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

Made for: Claude Code, Codex.

Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,924 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00037 $0.02924
Opus 5 $0.00018 $0.01462
Sonnet 5 $0.00007 $0.00585
Haiku 4.5 $0.00004 $0.00292

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

Security

Grade C, and why

loop scanned grade C 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 yesterday.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

**Hard-enforced — the PreToolUse hook denies these deterministically (you'll get a tool error; adapt, don't retry):** editing denylist paths (`**/.env`, `**/.env.*`, `**/secrets/**`, `**/.git/**`, `**/*.pem`, `**/id_rsa*
skills/loop/SKILL.md · 42 lines

How it starts

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

seeks — per-pass protocol

CARDINAL RULE: do exactly ONE pass, then STOP and end your turn. Never loop internally across passes. Ending your turn is what lets the Stop hook drive the next pass, advance stop_fires (so the max_iters backstop + stuck guard can fire), and survive context compaction. A loop where you never yield is unkillable by the hook.

Wind-down: if the Stop-hook continue-message says the time budget is nearly up, treat it as a wind-down — do NOT start new work: write/refresh summary.md (what you found, what's still open), commit it, then end your turn. The clock will halt the loop shortly after.

State for loop <name> lives in the PRIMARY checkout's .seeks/run/<name>/. You are usually inside the loop's worktree; always mutate state through the CLI, which resolves the control plane via git — never write .seeks/... by relative path yourself: node "${CLAUDE_PLUGIN_ROOT}/bin/seeks.mjs" <subcommand> <name> ... (run via the Bash tool).

Every pass

  1. Orient — read .seeks/run/<name>/{state.md,backlog.md,context.md} and .seeks/loops/<name>/spec.md (resolve .seeks with git rev-parse --path-format=absolute --git-common-dir if needed).
  2. Backlog has - [ ] items → do the SINGLE next one (respect level: L1 = no edits, findings to state.md; L2 = edit + commit on seeks/<name>). Mark it - [x]; record: … status-set <name> '{"last_change":"<what you did>"}'; … log-add <name> "pass N — <summary>" (appends to log.md; never hand-append by relative path); commit seeks(<name>): pass N — <summary> (L2+).
  3. Backlog EMPTY → ask the engine whether the sweep bar is met — never re-derive it yourself: STATUS=$(node "${CLAUDE_PLUGIN_ROOT}/bin/seeks.mjs" sweep-status <name>). This returns the exact predicate the gate releases on ({mode, satisfied, label, …}). Reading dry_sweeps/min_dry_sweeps by hand is the trap that deadlocks an exhaustive loop: in mode:"exhaustive" the gate keys off dry_depth_rounds, not dry_sweeps, so a "3 dry sweeps → certify" shortcut sets done while the gate holds out forever.
    • satisfied:true (this includes mode:"none" — no sweep configured, the legacy default) → go to the verifier (below).
    • satisfied:false → run exactly one creative discovery sweep through a fresh lens, then end the pass. Get the angle: LENS=$(… sweep-next-lens <name>) (breadth-first through the catalog; a repeated lens won't advance the streak, so always take the one you're handed). Depth (exhaustive): the sweep-status label shows depth — depth 1 = each module's logic; depth 2 = cross-module dataflow; depth 3 = adversarial inputs / probing tests. Review through $LENS at the current depth; when a full catalog pass comes up dry the engine deepens automatically (via sweep-tick). You MUST dispatch a bug-hunter subagent for the sweep (triage role's model — node "${CLAUDE_PLUGIN_ROOT}/bin/seeks.mjs" role triage), handing it $LENS + the goal's blast radius. Bound its reply so a high-effort model doesn't stall generating a huge final answer (the failure mode where an opus hunter has to be killed and re-dispatched): tell it to reason internally but return ONLY a terse findings list — per real, demonstrable defect one line of file:line · one-line defect · severity · one-line repro/why; cap ~5; if it finds nothing, reply exactly FINDINGS: 0. No prose essay, no re-listing the source. This is not optional: a sweep you run inline is anchored on your own edits, so an inline "found nothing" is the self-grading seeks exists to prevent — and in until-dry/exhaustive mode those dry sweeps are exactly what advances the gate toward release. The subagent READS source and reasons about correctness through $LENS; re-running tests/linters is only a regression floor, NOT the bug finder. Then … sweep-tick <name> <count-of-NEW-real-bugs> "$LENS":
      • Found > 0… backlog-add <name> "<each new item>" (re-seed); end the pass. (sweep-tick reset the dry streak to 0.)
      • Found == 0 → end the pass. The loop keeps sweeping — and in exhaustive mode deepening — until sweep-status reports satisfied:true or the time budget winds it down. For a rich/overnight target the time-budget halt is the expected end; do NOT short-circuit to the verifier on a few dry sweeps, and do NOT disarm — if the gate keeps blocking a loop you think is finished, read its block reason, which names the unmet bar (e.g. dry depth-round k/N).

Read the full file on GitHub · 42 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. yesterday First seen · 42 lines · 37 tokens per session scan C 3a66298e4b46

Subscribe to this mod's changes

loop is a skill published in the GitHub repository Bogzx/seeks (4 stars, last pushed 15d ago), licensed MIT. It adds 37 tokens to every session and 2,924 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). 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

orloj-generator

Interactive scaffold generator for Orloj multi-agent systems. Use this skill whenever someone wants to create, set up, scaffold, bootstrap, or generate an Orloj agent system, pipeline, swarm, or hierarchy. Also trigger when users mention "orlojctl init", ask how to get started with Orloj, want to build a multi-agent…

OrlojHQ/orloj · 168 tokens

agentfootprint

Use when building AI agents with agentfootprint — LLMCall, Agent, skills, RAG, memory, control flow, Swarm concepts, mock/anthropic/openai/ollama providers, tools, recorders, resilience, and streaming. Also use when someone asks how agentfootprint works or wants to understand the framework.

footprintjs/agentfootprint · 72 tokens

nio-scan

Nio code/skill execution-risk scanner. Use when the user wants to scan a file, repo, directory, or skill for execution risks — e.g. "scan this code for risks", "is this file/plugin dangerous", "check this repo for malicious code", "run nio scan on ". Focused single-purpose skill; for other Nio operations use /nio.

core0-io/nio · 81 tokens

nio-action

Nio runtime action safety evaluator. Use when the user asks whether a specific runtime action is safe — e.g. "is it safe to run ", "should I allow this curl/POST", "evaluate this file write / secret access", "check this action with nio". Returns allow/deny/confirm. Focused single-purpose skill; for other Nio…

core0-io/nio · 83 tokens

nio-external-score

Nio external scoring-endpoint snapshot. Use when the user asks about their current Nio/risk scores from configured external scoring endpoints — e.g. "what's my Nio score", "tell me the nio score", "check my external/guardrail endpoint scores", "what do my scoring services return right now", "list the current risk…

core0-io/nio · 97 tokens

nio-report

Nio execution audit report. Use when the user wants to review recent agent execution activity — e.g. "show my nio report", "what did nio block recently", "show the audit log / recent activity", "any diagnostics / errors in nio". Read-only. Focused single-purpose skill; for other Nio operations use /nio.

core0-io/nio · 72 tokens