self-evolve

self-evolve is a skill for Claude Code from fortunto2/rust-code. It costs 71 tokens per session (569 once invoked), scanned A, original, MIT.

A self-improvement workflow for the coding agent. It reviews past sessions to find recurring failures, makes one targeted code improvement, tests it, and rebuilds the agent.

In plain words
What is it for?
Analyzing session logs, tracing recurring agent errors to their source, and applying and verifying a focused fix.
Why use it?
It addresses repeated problems in patching, tool arguments, schemas, prompt handling, or agent loops instead of treating each failure separately.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Analyzing session logs, tracing recurring agent errors to their source, and applying and verifying a focused fix.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fortunto2/rust-code/self-evolve
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 fortunto2/rust-code --skill self-evolve
Clone the repo
git clone --depth 1 https://github.com/fortunto2/rust-code

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/fortunto2/rust-code/self-evolve/github.svg)](https://agentmods.dev/skills/fortunto2/rust-code/self-evolve)
Your own site
<a href="https://agentmods.dev/skills/fortunto2/rust-code/self-evolve"><img src="https://agentmods.dev/badge/skills/fortunto2/rust-code/self-evolve/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-evolve

Your own site · 80×15
<a href="https://agentmods.dev/skills/fortunto2/rust-code/self-evolve"><img src="https://agentmods.dev/badge/skills/fortunto2/rust-code/self-evolve.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 569 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 2
    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.00071 $0.00569
Opus 5.5 $0.00028 $0.00228
Sonnet 5.5 $0.00014 $0.00114
Haiku 4.5 $0.00007 $0.00057

Measured 3mo ago against content hash 71fb217c5c27, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

self-evolve 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 3mo 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/self-evolve/SKILL.md · 45 lines

What it actually says

Self-Evolution

Analyze your own performance history and fix recurring issues. ONE improvement per iteration.

Process

  1. Read .rust-code/evolution.jsonl + recent session logs
  2. Find patterns: patch failures, loop warnings, error spikes
  3. Trace to root cause in source code
  4. Apply minimal fix, make check, commit
  5. Signal RESTART_AGENT if you changed agent code

Reference files for diagnosis: references/diagnosis-paths.md

Key Source Files

Symptom Source
Patch matching failures crates/sgr-agent/src/app_tools/apply_patch.rs
Agent stuck in loops crates/sgr-agent/src/loop_detect.rs
Prompt confusion crates/rc-cli/src/agent.rs (SGR_SYSTEM_PROMPT)
Tool argument errors crates/rc-cli/src/agent.rs (execute_action)
Schema issues crates/sgr-agent/src/schema.rs

Signals

  • Fixed something → finish: "RESTART_AGENT — [what you fixed]"
  • Nothing to fix → finish: "<solo:done/>"
  • Stuck → finish: "<solo:done/> — need human input"

Gotchas

  1. RESTART_AGENT kills your context — everything in memory is lost. Commit first, write notes to .tasks/ for the next session to pick up.
  2. Simplicity threshold — a 0.001 score improvement that adds 20 lines of hacky code is NOT worth it. Removing code with equal results is always a win.
  3. make check can take 2+ minutes — don't call it in a tight loop. Run once after your change, fix issues, run once more to verify.
  4. Don't optimize what you can't measure — read actual session logs, grep for error patterns. Don't guess at improvements.
  5. Evolution log is append-only — don't edit evolution.jsonl. The loop engine reads it for scoring trends.
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. 3mo ago First seen · 45 lines · 71 tokens per session scan A 71fb217c5c27

Subscribe to this mod's changes

self-evolve is a skill published in the GitHub repository fortunto2/rust-code (47 stars, last pushed 3mo ago), licensed MIT. It adds 71 tokens to every session and 569 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-evolve compared with skills from other repositories

self-evolve next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
self-evolvefortunto2/rust-codeSkill473mo agoMITA71Claude Code
code_explorergoogle-gemini/gemini-cliSkill109ktodayApache-2.0A28Gemini CLI
qualitygoogle-gemini/gemini-cliSkill109ktodayApache-2.0B24Gemini CLI
write-zot-themespatriceckhart/zotSkill373yesterdayMITA23Claude Code, Codex
writing-git-commitspatriceckhart/zotSkill373yesterdayMITA14Claude Code, Codex
planner-task-packetSeemSeam/claude_codex_bridgeSkill3.6k6d agononeA25Claude Code, Codex
ccb-comm-reply-recoverSeemSeam/claude_codex_bridgeSkill3.6k6d agononeA77Claude Code, Codex