self-evolve

self-evolve is a skill for Claude Code, Codex from jnMetaCode/skillet. It costs 52 tokens per session (855 once invoked), scanned A, original, MIT.

A workflow for improving an AI agent after a task by reviewing what happened, extracting a few reusable lessons, and saving them as local memory. It can use tracing data when available.

In plain words
What is it for?
Use it after substantial tasks to inspect failures and retries, identify root causes or working recipes, and store only lessons that will change future work.
Why use it?
An agent may repeat failed approaches or forget useful project-specific discoveries. Recording durable lessons helps future tasks start with better information.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/jnmetacode/skillet/self-evolve
Any agent
npx skills add jnMetaCode/skillet --skill self-evolve
Clone the repo
git clone --depth 1 https://github.com/jnMetaCode/skillet

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/jnmetacode/skillet/self-evolve.svg)](https://agentmods.dev/skills/jnmetacode/skillet/self-evolve)
Your own site
<a href="https://agentmods.dev/skills/jnmetacode/skillet/self-evolve"><img src="https://agentmods.dev/badge/skills/jnmetacode/skillet/self-evolve.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 855 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00052 $0.00855
Opus 5 $0.00026 $0.00428
Sonnet 5 $0.00010 $0.00171
Haiku 4.5 $0.00005 $0.00085

Measured 4d ago against content hash b6c8f35749ce, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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 · 68 lines

How it starts

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

self-evolve

An agent that doesn't learn repeats its mistakes at full price. This skill is the improvement loop: observe the run → distill the lesson → store it → reinforce what worked → recall it next time. It uses local tools (engram for memory, tracelet for observation), so the learning stays on the user's machine.

The loop (run it at the end of each non-trivial task)

  1. Observe what actually happened. Don't trust your memory of the run — check it. If tracing is on (npx @jnmetacode/tracelet), look at the trace: which tool calls failed or were retried, where the time and tokens went, which approach was abandoned. Without a trace, review your own steps: what did you try first that didn't work?

  2. Distill at most 1–3 lessons. A lesson is durable knowledge that would change how you act next time, not a diary entry:

    • a root cause ("the staging DB rejects connections without SSL")
    • a working recipe ("build fails unless npm ci runs before codegen")
    • a user preference revealed by a correction ("they want diffs, not files") Skip anything the repo/docs already record.
  3. Store each lesson (one fact per memory, dated, with the why):

    engram_remember: "2026-06-12: deploys to staging need SSL_MODE=require —
    the pooler silently drops non-SSL connections (cost us 40 min)."
    

    (CLI: npx @jnmetacode/engram remember … via the HTTP API, or the engram_remember MCP tool.)

  4. Reinforce retrievals that proved right. If you recalled a memory during the task and it turned out to be the correct answer, say so — recall gets measurably better with use:

    engram_reinforce: { query: "staging deploy fails", source: "deploys" }
    

    Future similar queries will rank that source higher. Only reinforce what was verified (the fix worked, the user confirmed) — reinforcing guesses trains the memory to be confidently wrong.

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

Subscribe to this mod's changes

self-evolve is a skill published in the GitHub repository jnMetaCode/skillet (1 stars, last pushed 2mo ago), licensed MIT. It adds 52 tokens to every session and 855 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.