convergence-detect

convergence-detect is a skill for Claude Code, Codex from momentmaker/kaijutsu. It costs 63 tokens per session (1,230 once invoked), scanned A, original, MIT.

A way to decide when a repeated improvement or review process has stopped finding useful new information. It checks whether the output is getting shorter, changes are slowing, and new results resemble earlier ones.

In plain words
What is it for?
It is for deciding when to end review, planning, polishing, or retrospective loops.
Why use it?
It prevents stopping too soon while useful issues remain, or wasting time and tokens on rounds that mostly repeat previous results.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for deciding when to end review, planning, polishing, or retrospective loops.

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

Made for: Claude Code, Codex.

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 convergence-detect

README.md
[![agentmods](https://agentmods.dev/badge/skills/momentmaker/kaijutsu/convergence-detect.svg)](https://agentmods.dev/skills/momentmaker/kaijutsu/convergence-detect)
Your own site
<a href="https://agentmods.dev/skills/momentmaker/kaijutsu/convergence-detect"><img src="https://agentmods.dev/badge/skills/momentmaker/kaijutsu/convergence-detect.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,230 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.00063 $0.01230
Opus 5 $0.00032 $0.00615
Sonnet 5 $0.00013 $0.00246
Haiku 4.5 $0.00006 $0.00123

Measured 8d ago against content hash cd5887beba64, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

convergence-detect 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 8d 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/core/convergence-detect/SKILL.md · 122 lines

How it starts

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

convergence-detect

Iterative loops (review-fix loops, plan-polish loops, retrospective extraction) have a natural endpoint: when each new pass mostly restates the previous one, you're done. This skill is a primitive for detecting that endpoint quantitatively, so loops don't stop too early (missed signal) or too late (wasted tokens).

When to invoke

  • Another skill says "use convergence-detect to decide when to stop"
  • You're running a multi-round refinement and want a principled stop
  • The user asks "are we done iterating?"

The three signals

Track these across the last 3 rounds (minimum). All three must point the same way before declaring convergence.

1. Output size shrinking

Token count of the output decreases round-over-round. New rounds add fewer findings, suggestions, or words than the previous.

Round Output tokens
N-2 1500
N-1 800
N 350

Decreasing → signal to stop.

2. Change rate slowing

Of the items in round N, how many are new vs. restated from a previous round?

Round Items New Restated
N-2 12 12 0
N-1 8 5 3
N 6 1 5

New / total approaching 0 → signal to stop.

3. Content similarity rising

Compare round N output to round N-1 output. If they're saying mostly the same things in different words, you've converged.

Practical heuristic without an embedding model:

  • Take each finding/item from round N
  • Check if a substantively-equivalent item appears in round N-1
  • If 80%+ of round N items have a match in round N-1, they're saying the same thing

Quantitative scoring

Don't eyeball — measure.

  • Output tokens: count tokens (or characters as a proxy) per round. Track the ratio tokens(N) / tokens(N-1). Below 0.6 = strongly shrinking; below 0.8 = mildly shrinking.
  • New-item ratio: of the items in round N, count how many are new vs. restated. Items whose normalized text matches an item from N-1 (case-insensitive, whitespace-collapsed, identifier-equivalent) count as restated. Below 0.2 = strongly slowing.
  • Jaccard similarity to previous round: |intersect(N, N-1)| / |union(N, N-1)|. Above 0.7 = strongly similar.

Read the full file on GitHub · 122 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 122 lines · 63 tokens per session scan A cd5887beba64

Subscribe to this mod's changes

convergence-detect is a skill published in the GitHub repository momentmaker/kaijutsu (3 stars, last pushed 2mo ago), licensed MIT. It adds 63 tokens to every session and 1,230 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.