evolve

A command that groups related learned coding habits into higher-level skills, commands, or agents.

In plain words
What is it for?
Use it to review learned patterns, filter them by topic, preview possible groupings, or generate new structures when enough related patterns exist.
Why use it?
It turns scattered observations into reusable structures that can be applied more consistently later.

Command

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 commands/luohaothu/everything-codex/evolve
Clone the repo
git clone --depth 1 https://github.com/Luohaothu/everything-codex
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,370 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.00016 $0.01370
Opus 5 $0.00008 $0.00685
Sonnet 5 $0.00003 $0.00274
Haiku 4.5 $0.00002 $0.00137

Measured yesterday against content hash 23af771af193, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 yesterday.

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.

docs/zh-CN/commands/evolve.md · 210 lines

How it starts

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

Evolve 命令

实现方式

使用插件根路径运行 instinct CLI:

python3 "${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning-v2/scripts/instinct-cli.py" evolve [--generate]

或者如果 CLAUDE_PLUGIN_ROOT 未设置(手动安装):

python3 ~/.claude/skills/continuous-learning-v2/scripts/instinct-cli.py evolve [--generate]

分析本能并将相关的本能聚合成更高层次的结构:

  • 命令:当本能描述用户调用的操作时
  • 技能:当本能描述自动触发的行为时
  • 代理:当本能描述复杂的、多步骤的流程时

使用方法

/evolve                    # Analyze all instincts and suggest evolutions
/evolve --domain testing   # Only evolve instincts in testing domain
/evolve --dry-run          # Show what would be created without creating
/evolve --threshold 5      # Require 5+ related instincts to cluster

演化规则

→ 命令(用户调用)

当本能描述用户会明确请求的操作时:

  • 多个关于“当用户要求...”的本能
  • 触发器类似“当创建新的 X 时”的本能
  • 遵循可重复序列的本能

示例:

  • new-table-step1: "当添加数据库表时,创建迁移"
  • new-table-step2: "当添加数据库表时,更新模式"
  • new-table-step3: "当添加数据库表时,重新生成类型"

→ 创建:/new-table 命令

→ 技能(自动触发)

当本能描述应该自动发生的行为时:

  • 模式匹配触发器
  • 错误处理响应
  • 代码风格强制执行

示例:

  • prefer-functional: "当编写函数时,优先使用函数式风格"
  • use-immutable: "当修改状态时,使用不可变模式"
  • avoid-classes: "当设计模块时,避免基于类的设计"

→ 创建:functional-patterns 技能

→ 代理(需要深度/隔离)

当本能描述复杂的、多步骤的、受益于隔离的流程时:

  • 调试工作流
  • 重构序列
  • 研究任务

示例:

  • debug-step1: "当调试时,首先检查日志"
  • debug-step2: "当调试时,隔离故障组件"
  • debug-step3: "当调试时,创建最小复现"
  • debug-step4: "当调试时,用测试验证修复"

→ 创建:debugger 代理

操作步骤

  1. ~/.claude/homunculus/instincts/ 读取所有本能
  2. 按以下方式对本能进行分组:
    • 领域相似性
    • 触发器模式重叠
    • 操作序列关联性
  3. 对于每个包含 3 个以上相关本能的集群:
    • 确定演化类型(命令/技能/代理)
    • 生成相应的文件
    • 保存到 ~/.claude/homunculus/evolved/{commands,skills,agents}/
  4. 将演化后的结构链接回源本能

输出格式

🧬 Evolve Analysis
==================

Found 3 clusters ready for evolution:

## Cluster 1: Database Migration Workflow
Instincts: new-table-migration, update-schema, regenerate-types
Type: Command
Confidence: 85% (based on 12 observations)

Would create: /new-table command
Files:
  - ~/.claude/homunculus/evolved/commands/new-table.md

## Cluster 2: Functional Code Style
Instincts: prefer-functional, use-immutable, avoid-classes, pure-functions
Type: Skill
Confidence: 78% (based on 8 observations)

Would create: functional-patterns skill
Files:
  - ~/.claude/homunculus/evolved/skills/functional-patterns.md

## Cluster 3: Debugging Process
Instincts: debug-check-logs, debug-isolate, debug-reproduce, debug-verify
Type: Agent
Confidence: 72% (based on 6 observations)

Would create: debugger agent
Files:
  - ~/.claude/homunculus/evolved/agents/debugger.md

---
Run `/evolve --execute` to create these files.

Read the full file on GitHub · 210 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. yesterday First seen · 210 lines · 16 tokens per session scan A 23af771af193

Subscribe to this mod's changes

evolve is a command published in the GitHub repository Luohaothu/everything-codex (24 stars, last pushed 21d ago), licensed MIT. It adds 16 tokens to every session and 1,370 once invoked, about $0.0001 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.