self-evolution

self-evolution is a skill for Claude Code, Codex from xg-gh-25/SwarmAI. It costs 112 tokens per session (856 once invoked), scanned A, original, MIT.

A governance lifecycle manager for organizing principles, rules, and automated checks that guide an AI system. It supports six operations: classify, capture, promote, refine, retire, and compress.

In plain words
What is it for?
Use it to classify proposed changes, record user corrections, promote repeated patterns, sharpen rules, retire obsolete ones, and merge overlapping rules.
Why use it?
It gives recurring corrections and governance changes a defined place in the system instead of leaving them as scattered or temporary instructions.

Skill for Claude CodeCodex

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

Good fit Use it to classify proposed changes, record user corrections, promote repeated patterns, sharpen rules, retire obsolete ones, and merge overlapping rules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xg-gh-25/swarmai/s_self-evolution
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 xg-gh-25/SwarmAI --skill s_self-evolution
Clone the repo
git clone --depth 1 https://github.com/xg-gh-25/SwarmAI

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 self-evolution

README.md
[![agentmods](https://agentmods.dev/badge/skills/xg-gh-25/swarmai/s_self-evolution/github.svg)](https://agentmods.dev/skills/xg-gh-25/swarmai/s_self-evolution)
Your own site
<a href="https://agentmods.dev/skills/xg-gh-25/swarmai/s_self-evolution"><img src="https://agentmods.dev/badge/skills/xg-gh-25/swarmai/s_self-evolution/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 self-evolution

Your own site · 80×15
<a href="https://agentmods.dev/skills/xg-gh-25/swarmai/s_self-evolution"><img src="https://agentmods.dev/badge/skills/xg-gh-25/swarmai/s_self-evolution.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 856 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 pass 7 Sept 2026
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.00112 $0.00856
Opus 5 $0.00056 $0.00428
Sonnet 5 $0.00022 $0.00171
Haiku 4.5 $0.00011 $0.00086

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

Security

Grade A, and why

self-evolution 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 9d 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.

backend/skills/s_self-evolution/SKILL.md · 83 lines

How it starts

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

Self-Evolution — Governance Lifecycle Manager

Manages the Three-Layer Governance OS: Principles → Rules → Gates. Read INSTRUCTIONS.md for the full protocol.

Six Operations

Operation Trigger What It Does
CLASSIFY Any governance change proposed Classify layer, parent principle, check conflict/budget
CAPTURE User correction detected Write C-entry with bias tag (A/B/C/D)
PROMOTE Pattern seen 3x OR user approves Elevate from EVOLUTION → AGENT/STEERING (absorbs steeringify)
REFINE Principle not precise enough Sharpen existing principle/rule wording
RETIRE Rule covered by gate, or 30d idle Remove from active rules, record in EVOLUTION
COMPRESS 3+ rules share same root Merge into single rule with broader coverage

Trigger Detection (unchanged from v1)

🔴 Reactive — Capability gap

🟡 Proactive — Better way exists (deferred)

🟢 Correction Capture — User pushback → C-entry with bias tag

🔵 Stuck — Going in circles

Priority: Stuck > Reactive > Correction > Proactive Limits: Max 3 triggers/session. 60s cooldown.

Bias Classification (on every correction)

Bias Pattern Indicator
A Premature completion "Good enough", skip review, defer known issue
B Inference over evidence Assert without reading, stale memory
C Productivity over quality Rush output, shallow analysis
D Surrender on obstacle Give up, ask user to compensate

Governance Budget (enforced on PROMOTE/REFINE)

  • SOUL.md principles: ≤12
  • AGENT.md rules: ≤25
  • STEERING.md standing rules: ≤15

At cap → COMPRESS or RETIRE existing before adding.

Intake Classification (on every governance change)

Before writing to SOUL/AGENT/STEERING:

  1. Layer: principle / rule / gate?
  2. Parent: P1-P7?
  3. Conflict: duplicates/contradicts existing?
  4. Budget: current count vs cap
  5. Source: user / correction / pipeline / self-detect

Read the full file on GitHub · 83 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. 9d ago First seen · 83 lines · 112 tokens per session scan A aa59bcb57981

Subscribe to this mod's changes

self-evolution is a skill published in the GitHub repository xg-gh-25/SwarmAI (44 stars, last pushed 2d ago), licensed MIT. It adds 112 tokens to every session and 856 once invoked, about $0.0006 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.