dos-self-improve

dos-self-improve is a skill for Claude Code, Codex from anthony-chaudhary/dos-kernel. It costs 56 tokens per session (3,074 once invoked), scanned A, original, MIT.

A controlled loop for testing possible improvements to a codebase. It verifies each proposed change in isolation and keeps it only when independent tests and measured results confirm a real improvement.

In plain words
What is it for?
Use it to propose and test recursive code improvements, check the test suite and measured metrics, and reject unconfirmed changes.
Why use it?
It reduces the risk of accepting changes based only on the author's opinion that they are better.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is git worktree add ../_si-candidate HEAD.

Part of the dos-kernel plugin — 18 skills, 3 hooks, 1 MCP server shipped together

Good fit Use it to propose and test recursive code improvements, check the test suite and measured metrics, and reject unconfirmed changes.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/anthony-chaudhary/dos-kernel
agentmods
npx agentmods add skills/anthony-chaudhary/dos-kernel/dos-self-improve

Made for: Claude Code, Codex.

Or install dos-kernel, the plugin that ships this one along with the rest of its 18 skills, 3 hooks, 1 MCP server.

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 dos-self-improve

README.md
[![agentmods](https://agentmods.dev/badge/skills/anthony-chaudhary/dos-kernel/dos-self-improve.svg)](https://agentmods.dev/skills/anthony-chaudhary/dos-kernel/dos-self-improve)
Your own site
<a href="https://agentmods.dev/skills/anthony-chaudhary/dos-kernel/dos-self-improve"><img src="https://agentmods.dev/badge/skills/anthony-chaudhary/dos-kernel/dos-self-improve.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,074 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: 1 finding, 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 Rogue Agent · line 86
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
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.00056 $0.03074
Opus 5 $0.00028 $0.01537
Sonnet 5 $0.00011 $0.00615
Haiku 4.5 $0.00006 $0.00307

Measured 7d ago against content hash 4c2abf1a4989, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

dos-self-improve 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 7d 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.

claude-plugin/skills/dos-self-improve/SKILL.md · 242 lines

How it starts

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

dos-self-improve — the loop where DOS adjudicates its own improvement

The first self-improving work loop for DOS. It proposes a change, checks it, measures it, and keeps it only if a witness the change's author did not write confirms it improved — the green suite on a clean worktree, the truth syscall, and a strictly-measured metric gain. Everything else is reverted. The keep decision is the kernel's improve verdict, not the loop's opinion of its own work. A run of candidates nothing accepts trips a breaker that hands the judgment back to a human.

This is the dispatch loop (/dos-dispatch-loop) turned inward on a codebase's own source, with the one rule no prior auto-improver enforced:

A self-improving loop's fatal failure mode is grading its own homework — the agent that wrote the change is the same one that says "yes, this is better," so it learns to narrate improvement instead of making it. dos improve closes that hole: the keep-bit is a pure function of facts the loop did not author, so the loop cannot keep a change by claiming it is better. The only path to KEEP is to actually move a metric the environment measures.

The recursive-self-improvement literature names verification as the gating constraint ("requiring verification regimes enabling labs to confirm"; "human judgment on which problems matter remains the bottleneck"). This loop is that verification regime, with the human kept in the loop by construction — the breaker escalates to a person exactly when the loop runs dry of witnessed improvements.

What the kernel decides vs. what you do

Step Who What
Propose one scoped change YOU (a subagent) the capable, untrusted step — the only place intelligence enters the loop
Verify + measure dos verbs run the suite, run the truth syscall, measure the metric — all on an isolated worktree
Keep / revert / escalate dos improve the kernel's typed verdict over the env-authored facts — NOT your opinion
Merge / discard / escalate YOU carry out the kernel's verdict

Read the full file on GitHub · 242 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. 7d ago First seen · 242 lines · 56 tokens per session scan A 4c2abf1a4989

Subscribe to this mod's changes

dos-self-improve is a skill published in the GitHub repository anthony-chaudhary/dos-kernel (19 stars, last pushed today), licensed MIT. It adds 56 tokens to every session and 3,074 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-30.

Related

Other skills, from other repositories