self-evolution

self-evolution is a skill for Claude Code, Codex from xg-gh-25/SwarmAI. It costs 63 tokens per session (1,186 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 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,186 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.00063 $0.01186
Opus 5.5 $0.00025 $0.00474
Sonnet 5.5 $0.00013 $0.00237
Haiku 4.5 $0.00006 $0.00119

Measured 1mo ago against content hash 05a547ba8c7b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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 · 96 lines

How it starts

The opening of the file, as written. The whole thing — 96 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 overlap and size delta
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

Admission, not a count budget (enforced on PROMOTE/REFINE)

There is no count cap (AGENT.md § Intake Gate): the real risk is attention dilution, which no count measures. Every new rule passes three questions — a NO blocks it: (1) a genuinely new axis? overlap → fold into the existing rule; (2) load-bearing — can I name the failure it prevents? (3) belongs here — principle → SOUL, one-off → EVOLUTION, better as a mechanism → SOUL P7. Before drafting, ask whether a clearer skill, a better tool result, a mechanism or an edit to an existing rule fixes it: a new sentence in the prompt is the last resort. An addition that would dilute the set must REPLACE an existing rule or not land.

Read the full file on GitHub · 96 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. 1mo ago Changed · +13 lines · -49 tokens per session 05a547ba8c7b
  2. 3mo 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 (66 stars, last pushed today), licensed MIT. It adds 63 tokens to every session and 1,186 once invoked, about $0.0003 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

self-evolution compared with skills from other repositories

self-evolution next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
self-evolutionxg-gh-25/SwarmAISkill66todayMITA63Claude Code, Codex
hindsight-architectvectorize-io/hindsightSkill64kyesterdayMITA35Claude Code, Codex
hindsight-localvectorize-io/hindsightSkill64kyesterdayMITA32Claude Code, Codex
hindsight-coding-agentvectorize-io/hindsightSkill64kyesterdayMITA74Claude Code, Codex
bot-handoffvectorize-io/hindsightSkill64kyesterdayMITA57Cursor
memory-contextvectorize-io/hindsightSkill64kyesterdayMITA47Cursor
routine-memoryvectorize-io/hindsightSkill64kyesterdayMITA54Cursor