evolve

A knowledge-review workflow that groups repeated lessons and turns them into reusable commands, automatic skills, or separate agents. A command is user-triggered, a skill is an automatic behaviour, and an agent handles a complex multi-step task.

In plain words
What is it for?
Use it to analyse accumulated learning, preview proposed changes, limit analysis to a domain such as testing, set a minimum number of related lessons, or generate the resulting files.
Why use it?
It prevents useful lessons from remaining as scattered notes. Repeated patterns can become clearer, reusable instructions for future work.

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/xiaobei930/cc-best/evolve
Clone the repo
git clone --depth 1 https://github.com/xiaobei930/cc-best
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,331 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.00014 $0.02331
Opus 5 $0.00007 $0.01166
Sonnet 5 $0.00003 $0.00466
Haiku 4.5 $0.00001 $0.00233

Measured yesterday against content hash f60fd2b12ab2, 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 · 332 lines

How it starts

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

/evolve - 知识演化

将积累的学习内容聚类分析,演化为更高级的结构:Skills、Agents 或 Commands。核心原则:量变引发质变,经验升华为能力。

用法

/cc-best:evolve                    # 分析所有学习内容,建议演化
/cc-best:evolve --execute          # 执行演化,生成文件
/cc-best:evolve --domain testing   # 仅分析测试领域
/cc-best:evolve --threshold 5      # 要求 5+ 条相关知识才聚类
/cc-best:evolve --dry-run          # 预览不执行

角色定位

  • 身份: 知识架构师
  • 目标: 将碎片化知识升华为系统化能力
  • 原则: 模式重复 3 次,就值得抽象

核心理念

当同类知识积累到一定数量,就应该被抽象为更高级的结构


演化规则

演化为 Command(用户主动调用)

触发条件: 多条知识描述的是"用户请求时的操作序列"

示例:
- 知识1: "创建数据库表时,先写 migration"
- 知识2: "创建数据库表后,更新 schema"
- 知识3: "创建数据库表后,重新生成类型"

→ 演化为: /new-table 命令

特征:

  • 触发词包含"当用户请求"、"当创建"、"当添加"
  • 描述的是可重复的操作序列
  • 有明确的起点和终点

演化为 Skill(自动触发的能力)

触发条件: 多条知识描述的是"特定场景下的自动行为"

示例:
- 知识1: "写函数时,优先使用函数式风格"
- 知识2: "修改状态时,使用不可变模式"
- 知识3: "设计模块时,避免类继承"

→ 演化为: functional-patterns Skill

特征:

  • 触发词包含"当写代码时"、"当遇到"、"总是"
  • 描述的是编码风格或模式偏好
  • 应该在背景中持续生效

演化为 Agent(需要深度隔离的复杂任务)

触发条件: 多条知识描述的是"需要多步骤、多工具的复杂流程"

示例:
- 知识1: "调试时,先检查日志"
- 知识2: "调试时,隔离失败组件"
- 知识3: "调试时,创建最小复现"
- 知识4: "调试时,用测试验证修复"

→ 演化为: debugger Agent

特征:

  • 描述的是多步骤流程
  • 需要多种工具配合
  • 适合在独立上下文中执行

演化判定矩阵

知识特征 演化类型 理由
用户明确请求触发 Command 需要用户意图驱动
代码编写时自动应用 Skill 持续生效的背景知识
复杂多步骤流程 Agent 需要隔离和深度处理
简单的单条规则 Hook 用于自动检查
架构级别的约束 CLAUDE.md 宪法级别规则

工作流程

1. 知识收集
   ├─ 读取 memory-bank/*.md
   ├─ 读取 rules/*.md 中的规则
   ├─ 读取 /cc-best:learn --status 的内容
   └─ 统计每条知识的置信度和使用频率

2. 聚类分析
   ├─ 按领域分组(testing, git, api, style...)
   ├─ 按触发模式分组
   ├─ 按行为类型分组
   └─ 识别 3+ 条相关知识的聚类

3. 演化判定
   ├─ 分析聚类的特征
   ├─ 确定演化类型(Command/Skill/Agent)
   ├─ 计算演化置信度
   └─ 生成演化建议

4. 文件生成
   ├─ 生成 commands/*.md(Command)
   ├─ 生成 skills/*/SKILL.md(Skill)
   ├─ 生成 agents/*.md(Agent)
   └─ 标记源知识为"已演化"

5. 关联更新
   ├─ 更新 COMMANDS.md
   ├─ 更新 skills/README
   ├─ 更新 agents/README
   └─ 更新 CHANGELOG.md

Read the full file on GitHub · 332 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 · 332 lines · 14 tokens per session scan A f60fd2b12ab2

Subscribe to this mod's changes

evolve is a command published in the GitHub repository xiaobei930/cc-best (50 stars, last pushed 2mo ago), licensed MIT. It adds 14 tokens to every session and 2,331 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.