loop

loop is a skill for Claude Code from chan4lk/specclaw. It costs 15 tokens per session (2,555 once invoked), scanned A, original, MIT.

An automated controller that repeatedly builds, verifies, reviews, and fixes an existing SpecClaw change.

In plain words
What is it for?
Finishing an already planned and built change by running fix-and-verify cycles until the configured checks pass.
Why use it?
It can continue through repeated checks and stop when all gates pass or when it detects problems such as no progress, regressions, or repeated oscillation.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the specclaw-extras plugin — 8 skills, 7 agents shipped together

Good fit Finishing an already planned and built change by running fix-and-verify cycles until the configured checks pass.

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

Made for: Claude Code.

Or install specclaw-extras, the plugin that ships this one along with the rest of its 8 skills, 7 agents.

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/chan4lk/specclaw/loop/github.svg)](https://agentmods.dev/skills/chan4lk/specclaw/loop)
Your own site
<a href="https://agentmods.dev/skills/chan4lk/specclaw/loop"><img src="https://agentmods.dev/badge/skills/chan4lk/specclaw/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/chan4lk/specclaw/loop"><img src="https://agentmods.dev/badge/skills/chan4lk/specclaw/loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,555 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 94
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 94
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 94
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
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.00015 $0.02555
Opus 5.5 $0.00006 $0.01022
Sonnet 5.5 $0.00003 $0.00511
Haiku 4.5 $0.00002 $0.00255

Measured 5d ago against content hash 1b589a2ba7a3, 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 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 5d 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.

plugins/specclaw-extras/skills/loop/SKILL.md · 181 lines

How it starts

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

specclaw loop

First, run specclaw-ensure-init .specclaw — idempotently creates .specclaw/ if it doesn't exist (silent if already initialized; auto-inits using the current directory's basename as the project name).

Autonomously drive the change to all-green. The controller (specclaw-loop) owns every mechanical decision — gate evaluation, signatures, caps, no-progress / regression / oscillation detection, the reward-hack guard, and state/log persistence. This skill only orchestrates the LLM steps: reflect, spawn a fix agent, commit. Follow the controller's JSON verbatim — do not second-guess a halt.

Step 0 — Validate prerequisites

The loop presumes /specclaw:plan and at least one /specclaw:build pass have already run — it remediates an existing implementation, it does not create one. Confirm the change is built:

specclaw-validate-change .specclaw <change> verify

If it fails (tasks not all complete / no build), tell the user to run /specclaw:build first and stop.

Read loop.enabled from .specclaw/config.yaml:

grep -A1 '^loop:' .specclaw/config.yaml

If loop.enabled is false, tell the user the autonomous loop is disabled and to run /specclaw:build and /specclaw:verify normally, then stop. Otherwise continue.

Step 1 — Init

specclaw-loop init .specclaw <change>

Seeds loop-state.json and loop-log.md (idempotent — never clobbers an existing state or log). Send a loop started notification:

🦞 **Loop Started**
**Change:** <change>
**Mode:** autonomous build→verify→review
**Caps:** max <loop.max_iterations> local iterations

Step 2 — Local loop

Repeat up to loop.max_iterations (default 5). The controller enforces the cap in Step 2c — do not track it yourself.

a. Evaluate gates:

specclaw-loop gates .specclaw <change>

Parse the JSON: {all_green, passing_count, gates:[{name,green,errors,files}]}. The four gates are tasks-complete, tests, verify, review.

Read the full file on GitHub · 181 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. 5d ago Changed · -75 tokens per session 1b589a2ba7a3
  2. 29d ago Changed · +13 lines 02151029a1b0
  3. 1mo ago First seen · 168 lines · 90 tokens per session scan A a34fdf7fcdfd

Subscribe to this mod's changes

loop is a skill published in the GitHub repository chan4lk/specclaw (13 stars, last pushed yesterday), licensed MIT. It adds 15 tokens to every session and 2,555 once invoked, about $0.0001 per session on Opus 5.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-30.

Related

Other skills, from other repositories

upload-assets

An asset-upload workflow that sends files to a console’s content-delivery network and prepares a review-request payload for a person to submit.

TOKTOKHAN-DEV/agent-company · 2 tokens

from-intake

A workflow for reviewing material brought from another workspace and carrying relevant brand evidence into the project's assets. It checks inventories, brand guides, logos, and image sources before anything is used.

TOKTOKHAN-DEV/agent-company · 3 tokens

review-spec

A workflow for comparing an existing feature specification with the project's review checklist and implementation. It looks for missing requirements, differences between documented screens and actual screens, and lessons from rejected submissions.

TOKTOKHAN-DEV/agent-company · 2 tokens

wire-sdk

An SDK integration guide for 앱인토스, a platform for building apps inside Toss. It covers permissions, persistent storage, sharing links, screen controls, safe-area spacing, and secure WebSocket connections.

TOKTOKHAN-DEV/agent-company · 2 tokens

optimize-seo-geo

A workflow for filling only the SEO and GEO sections of a post's front matter. SEO helps a page appear in search results, while GEO prepares information for answer systems that may quote or cite it.

TOKTOKHAN-DEV/agent-company · 6 tokens

loki-mode

An autonomous software factory that knows what it is supposed to deliver, and proves it did. Use when the user says Loki Mode or asks to build, fix or verify software autonomously.

asklokesh/loki-mode · 41 tokens