mk:loop

mk:loop is a skill for Claude Code from ngocsangyem/MeowKit. It costs 18 tokens per session (1,813 once invoked), scanned A, original, MIT.

An automated optimization loop that makes bounded code changes to improve one measurable number, such as test coverage, bundle size, lint errors, or latency.

In plain words
What is it for?
Use it for tracked, limited iterations on a known set of files when a fast verification command produces one objective metric.
Why use it?
It provides a repeatable way to keep changes that improve the chosen metric and undo changes that make it worse.

Skill for Claude Code

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

Good fit Use it for tracked, limited iterations on a known set of files when a fast verification command produces one objective metric.

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

Made for: Claude Code.

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 mk:loop

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/ngocsangyem/meowkit/loop"><img src="https://agentmods.dev/badge/skills/ngocsangyem/meowkit/loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,813 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.
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.00018 $0.01813
Opus 5.5 $0.00007 $0.00725
Sonnet 5.5 $0.00004 $0.00363
Haiku 4.5 $0.00002 $0.00181

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

Security

Grade A, and why

mk: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 12d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (eval/fixtures/bundle-clean/src/app.js, eval/fixtures/bundle-dirty/src/app.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.claude/skills/loop/SKILL.md · 150 lines

How it starts

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

mk:loop — Bounded Optimization Loop

Scope + mechanical metric + fast verify = bounded, git-tracked, boundary-confirmed improvement.

What This Skill Does

Improves ONE scalar metric (coverage %, bundle KB, lint-error count, latency ms, …) by running bounded autonomous iterations: pick one atomic change → commit → verify → keep if the number improved, otherwise git revert. Git history is the loop's memory; a TSV log and summary are the artifacts. Autonomy is boundary-confirmed — one human approval before the loop, then hands-off iteration up to a hard cap, with hard re-confirmations on cap-reached, stuck/plateau, and scope-expansion. It never plans, never grades behavior, never ships.

When to Use

  • An objective, fast (<30s) Verify command prints a single number.
  • A Scope of editable file globs is known.
  • You want N git-tracked trials with automatic keep-on-improve, revert-on-regress.

When NOT to Use

Situation Better tool
Subjective goal ("make it cleaner", "make it nicer") mk:cook
Known root-cause bug to fix once mk:fix / mk:investigate
Grade a running build against behavior/rubric mk:evaluate
Green-field product build (generator⇄evaluator) mk:autobuild
Structural review of a diff mk:review
Open a PR / ship mk:ship
No mechanical metric exists mk:cook --interactive

Configuration

Parsed from the user message. Missing required fields trigger ONE batched Ask the user — no command runs before they are supplied.

Required: Goal, Scope (globs), Metric (name + unit), Direction (higher|lower), Verify (shell command → one number). Optional: Guard, Iterations (default 10), Noise (low|medium|high, default medium), Min-Delta (default derived from Noise), Stop-At.

Full contract, the batched-question template, the Verify/Metric pattern library, and Noise/Min-Delta semantics live in references/config-and-metrics.md.

Read the full file on GitHub · 150 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. 12d ago Changed · -58 lines · -4 tokens per session c1f38fb19a35
  2. 14d ago Changed 0b26e70a198b
  3. 15d ago Changed 16667b803dae
  4. 17d ago Changed · -10 tokens per session cff300487b73
  5. 24d ago Changed · -63 tokens per session 6a1526740975
  6. 3mo ago First seen · 208 lines · 95 tokens per session scan A b3a0a5eb1df2

Subscribe to this mod's changes

mk:loop is a skill published in the GitHub repository ngocsangyem/MeowKit (18 stars, last pushed 2d ago), licensed MIT. It adds 18 tokens to every session and 1,813 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-09-03.

Related

mk:loop compared with skills from other repositories

mk:loop next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mk:loopngocsangyem/MeowKitSkill182d agoMITA18Claude Code
tokenjuicevincentkoc/tokenjuiceSkill5562d agoMITA18Claude Code, Codex
markdown-documentsagent0ai/agent-zeroSkill20ktodaynoneA22Claude Code
scheduled-tasksagent0ai/agent-zeroSkill20ktodaynoneA26Claude Code, Codex
skill-opt-literexleimo/aiosSkill63todayMITA79Claude Code, Codex
evaluator-optimizerNickCrew/Claude-CortexSkill7814d agoMITA33Claude Code, Codex
meeting-notesownpilot/OwnPilotSkill4402mo agoMITA46Claude Code, Codex