evolve

A command that groups related learned instincts—short rules about recurring coding behavior—into higher-level skills, commands, or agents. It can analyze all instincts or limit the analysis to a named domain.

In plain words
What is it for?
Use it to review instincts, generate suggested structures, focus on areas such as testing, run a dry run, or require a minimum number of related instincts before grouping them.
Why use it?
It turns many small repeated observations into reusable automation and lets you preview proposed changes before creating them.

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/codelably/harmony-claude-code/evolve
Clone the repo
git clone --depth 1 https://github.com/codelably/harmony-claude-code
Per session 31 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,541 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.00031 $0.01541
Opus 5 $0.00015 $0.00771
Sonnet 5 $0.00006 $0.00308
Haiku 4.5 $0.00003 $0.00154

Measured yesterday against content hash 1f504ff65bb8, 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.

commands/evolve.md · 194 lines

How it starts

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

Evolve 命令

实现 (Implementation)

使用插件根路径运行直觉(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]

分析直觉(Instincts)并将相关的直觉聚类为更高级的结构:

  • 命令(Commands):当直觉描述用户调用的操作时
  • 技能(Skills):当直觉描述自动触发的行为时
  • 智能体(Agents):当直觉描述复杂的、多步骤的流程时

用法 (Usage)

/evolve                    # 分析所有直觉并建议演进方案
/evolve --domain testing   # 仅演进测试领域(testing domain)中的直觉
/evolve --dry-run          # 显示将要创建的内容而不实际创建
/evolve --threshold 5      # 要求至少有 5 个以上的相关直觉才进行聚类

演进规则 (Evolution Rules)

→ 命令 (Command)(用户调用)

当直觉描述用户会明确请求的操作时:

  • 多个关于“当用户要求...”的直觉
  • 带有“当创建新的 X 时”等触发器的直觉
  • 遵循可重复序列的直觉

示例:

  • new-table-step1: "when adding a database table, create migration"
  • new-table-step2: "when adding a database table, update schema"
  • new-table-step3: "when adding a database table, regenerate types"

→ 创建:/new-table 命令

→ 技能 (Skill)(自动触发)

当直觉描述应该自动发生的行为时:

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

示例:

  • prefer-functional: "when writing functions, prefer functional style"
  • use-immutable: "when modifying state, use immutable patterns"
  • avoid-classes: "when designing modules, avoid class-based design"

→ 创建:functional-patterns 技能(Skill)

→ 智能体 (Agent)(需要深度/隔离)

当直觉描述复杂的、多步骤的流程,且受益于隔离环境时:

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

示例:

  • debug-step1: "when debugging, first check logs"
  • debug-step2: "when debugging, isolate the failing component"
  • debug-step3: "when debugging, create minimal reproduction"
  • debug-step4: "when debugging, verify fix with test"

→ 创建:debugger 智能体(Agent)

操作步骤 (What to Do)

  1. ~/.claude/homunculus/instincts/ 读取所有直觉(Instincts)
  2. 按以下维度对直觉进行分组:
    • 领域(Domain)相似性
    • 触发模式重合度
    • 操作序列关联性
  3. 对于每个包含 3 个及以上相关直觉的聚类:
    • 确定演进类型(命令/技能/智能体)
    • 生成相应的文件
    • 保存至 ~/.claude/homunculus/evolved/{commands,skills,agents}/
  4. 将演进后的结构链接回原始直觉

Read the full file on GitHub · 194 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 · 194 lines · 31 tokens per session scan A 1f504ff65bb8

Subscribe to this mod's changes

evolve is a command published in the GitHub repository codelably/harmony-claude-code (42 stars, last pushed 6mo ago), licensed MIT. It adds 31 tokens to every session and 1,541 once invoked, about $0.0002 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.