evolving-config

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Evolve Configuration

配置优化

Audit Claude Code config against latest capabilities. Conservative by default — says "no changes needed" when that's true.
Use TaskCreate to track these 6 phases:
  1. Snapshot current configuration
  2. Fetch latest capabilities
  3. Research best practices
  4. Gap analysis
  5. Present report
  6. Apply changes

对照最新功能审核Claude Code配置。默认采用保守策略——当配置无问题时会提示“无需更改”。
使用TaskCreate追踪以下6个阶段:
  1. 快照当前配置
  2. 获取最新功能
  3. 研究最佳实践
  4. 差距分析
  5. 提交报告
  6. 应用更改

Phase 1: Snapshot Current Configuration

阶段1:快照当前配置

Read ALL config files in parallel:
bash
undefined
并行读取所有配置文件:
bash
undefined

Glob these patterns

匹配这些模式

CLAUDE.md # Root instructions .claude/CLAUDE.md # Project instructions .claude/settings.json # Settings + hooks .claude/settings.local.json # Local overrides .claude/skills//SKILL.md # All skills .claude/agents/.md # All agents (if present) .claude/commands/**/.md # All commands (if present) hooks/ # Hook scripts

Build inventory summary:

| Category    | Count | Details                       |
| ----------- | ----- | ----------------------------- |
| Skills      | N     | list names                    |
| Agents      | N     | list names                    |
| Commands    | N     | list names                    |
| Hooks       | N     | list events                   |
| MCP servers | N     | list names                    |
| Model refs  | list  | which models referenced where |

Note any staleness indicators (outdated model names, deprecated patterns).

---
CLAUDE.md # 根目录说明文档 .claude/CLAUDE.md # 项目说明文档 .claude/settings.json # 设置与钩子 .claude/settings.local.json # 本地覆盖配置 .claude/skills//SKILL.md # 所有技能 .claude/agents/.md # 所有Agent(如果存在) .claude/commands/**/.md # 所有命令(如果存在) hooks/ # 钩子脚本

构建清单摘要:

| 分类         | 数量 | 详情                           |
| ----------- | --- | ----------------------------- |
| Skills      | N   | 列出名称                        |
| Agents      | N   | 列出名称                        |
| Commands    | N   | 列出名称                        |
| Hooks       | N   | 列出事件                        |
| MCP servers | N   | 列出名称                        |
| Model refs  | 列表 | 记录各模型的引用位置               |

标记任何过时迹象(过时的模型名称、已弃用的模式)。

---

Phase 2: Fetch Latest Capabilities

阶段2:获取最新功能

Fetch the Claude Code changelog:
WebFetch(
  url="https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md",
  prompt="Extract ALL features, changes, and deprecations from the last 6 months. Group by: new features, configuration changes, breaking changes, new hook events, new settings, new CLI flags, new MCP capabilities, new agent types. Be thorough."
)
If WebFetch fails or returns insufficient data, note the gap and rely on Phase 3.

获取Claude Code更新日志:
WebFetch(
  url="https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md",
  prompt="提取过去6个月内的所有功能、变更和弃用信息。按以下类别分组:新功能、配置变更、破坏性变更、新钩子事件、新设置项、新CLI标志、新MCP功能、新Agent类型。请确保内容全面。"
)
如果WebFetch失败或返回数据不足,记录此缺口并依赖阶段3的研究结果。

Phase 3: Research Best Practices

阶段3:研究最佳实践

Two targeted Perplexity queries:
Query 1 — Features and configuration:
json
mcp__perplexity-ask__perplexity_ask({
  "messages": [{ "role": "user", "content": "Claude Code CLI by Anthropic: what are the latest features, configuration options, best practices, and power user tips as of 2026? Include: hooks, skills, agents, MCP servers, settings.json options, CLAUDE.md patterns, team features, model routing, context management." }]
})
Query 2 — Ecosystem and integrations:
json
mcp__perplexity-ask__perplexity_ask({
  "messages": [{ "role": "user", "content": "Claude Code CLI advanced configuration 2026: MCP server recommendations, hook patterns, permission optimization, context fork strategies, agent orchestration patterns, skill design best practices. What are experienced users doing?" }]
})
If Perplexity returns cited URLs with high-value content, WebFetch top 2 for deeper details.

执行两次定向Perplexity查询:
查询1 — 功能与配置:
json
mcp__perplexity-ask__perplexity_ask({
  "messages": [{ "role": "user", "content": "Anthropic的Claude Code CLI:截至2026年,有哪些最新功能、配置选项、最佳实践和高级用户技巧?包括:钩子、技能、Agent、MCP服务器、settings.json选项、CLAUDE.md模式、团队功能、模型路由、上下文管理。" }]
})
查询2 — 生态系统与集成:
json
mcp__perplexity-ask__perplexity_ask({
  "messages": [{ "role": "user", "content": "2026年Claude Code CLI高级配置:MCP服务器推荐、钩子模式、权限优化、上下文分支策略、Agent编排模式、技能设计最佳实践。资深用户都在使用哪些方案?" }]
})
如果Perplexity返回带有高价值内容的引用URL,使用WebFetch获取排名前2的URL以获取更详细的信息。

Phase 4: Gap Analysis

阶段4:差距分析

Compare current config against latest capabilities. For EACH category below, produce findings:
将当前配置与最新功能进行对比。针对以下每个类别,输出审计结果:

Audit Categories

审计类别

CategoryWhat to Check
Model routingAre model assignments optimal? New models available? Effort levels configured?
HooksNew hook events available? Async hooks? Hook v2 features?
SkillsStale patterns? New tool types to leverage? Missing
context: fork
?
AgentsNew subagent types? Agent features (memory, skills)?
MCP serversNew useful servers? Deprecated transports? OAuth improvements?
PermissionsNew permission syntax? Over-permissive rules? Missing deny rules?
SettingsNew settings fields? Deprecated options? Sandbox improvements?
CLAUDE.mdOutdated instructions? Stale references? Missing new patterns?
TeamsNew team features? Configuration improvements?
CommandsDeprecated command patterns? New frontmatter fields?
类别检查内容
模型路由模型分配是否最优?是否有新模型可用?是否配置了工作层级?
Hooks是否有新的钩子事件可用?异步钩子?Hook v2功能?
Skills是否存在过时模式?是否可利用新工具类型?是否缺少
context: fork
配置?
Agents是否有新的子Agent类型?Agent功能(记忆、技能)?
MCP servers是否有新的实用服务器?是否有已弃用的传输方式?OAuth改进?
Permissions是否有新的权限语法?是否存在过度宽松的规则?是否缺少拒绝规则?
Settings是否有新的设置字段?是否有已弃用的选项?沙箱改进?
CLAUDE.md是否有过时的说明?陈旧的引用?是否缺少新模式?
Teams是否有新的团队功能?配置改进?
Commands是否有已弃用的命令模式?是否有新的前置字段?

Classification Rules

分类规则

For each finding, assign ONE rating:
RatingCriteriaAction
STILL GOODCurrent config matches or exceeds best practiceNo change needed
DEPRECATEDFeature removed or replaced upstreamMust update
WORTH ADOPTINGClear value, low disruption, proven stableRecommend
NICE-TO-HAVEMinor improvement, some disruptionMention only
NOT YETToo experimental or doesn't fit workflowSkip or note
Critical rule: Default classification is STILL GOOD. A finding must clear the bar: "Is this worth the disruption?" Changing working config has real cost — context relearning, potential breakage, testing overhead. Only promote to WORTH ADOPTING when the benefit clearly exceeds that cost.
Cap: Maximum 10 recommendations across WORTH ADOPTING + DEPRECATED. If more exist, prioritize by impact and note the overflow.

针对每个发现,分配一个评级:
评级标准行动
依然良好当前配置符合或优于最佳实践无需更改
已弃用功能已被上游移除或替代必须更新
值得采用价值明确、低干扰、已被验证稳定推荐采用
锦上添花小幅改进、存在一定干扰仅作提及
暂不考虑过于实验性或不符合工作流跳过或记录
关键规则:默认分类为依然良好。任何发现必须满足以下标准:“该变更是否值得付出切换成本?”修改正常运行的配置会产生实际成本——重新学习上下文、潜在故障、测试开销。只有当收益明显超过成本时,才将其归类为值得采用
上限:“值得采用”+“已弃用”类别的建议最多不超过10条。如果超过,按影响优先级排序并记录超出数量。

Phase 5: Present Report

阶段5:提交报告

Format the report:
markdown
undefined
报告格式如下:
markdown
undefined

Configuration Audit Report

配置审核报告

Date: {date} Changelog checked through: {version or date} Sources: {list: changelog, perplexity, docs URLs}
日期: {日期} 已检查的更新日志版本/日期: {版本或日期} 信息来源: {列表:更新日志、Perplexity、文档URL}

What's Working Well (STILL GOOD)

运行良好的配置(依然良好)

  • {explicit acknowledgment of things that don't need changing}
  • {this section should be the longest — most config should be fine}
  • {明确列出无需更改的内容}
  • {此部分应最长——大多数配置应无问题}

Action Required (DEPRECATED)

必须处理(已弃用)

  • {breaking changes or removed features — empty is normal}
  • {破坏性变更或已移除的功能——为空属于正常情况}

Recommended Updates (WORTH ADOPTING)

推荐更新(值得采用)

  • {high-value, low-disruption improvements}
  • {each item: what to change, why, and estimated disruption}
  • {高价值、低干扰的改进措施}
  • {每项内容:需更改的内容、原因、预计干扰程度}

On Your Radar (NICE-TO-HAVE)

关注项(锦上添花)

  • {minor improvements that can wait}
  • {可延后的小幅改进}

Not Yet (TOO EARLY)

暂不考虑(为时尚早)

  • {experimental features, not ready for production config}
  • {实验性功能,暂不适合生产配置}

Summary

摘要

  • {X} areas reviewed — no changes needed
  • {Y} updates recommended
  • {Z} items informational

**STOP here.** Use `AskUserQuestion`:

| Header | Question                                      | Options                                                                                                      |
| ------ | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| Action | How should we proceed with the audit results? | Apply all recommended (Recommended) / Select items to apply / Dry run only (show diffs) / Skip (report only) |

If `$ARGUMENTS` contains `--dry-run`: Skip the question, show diffs only, do not apply.

---
  • 已审查{X}个领域——无需更改
  • 推荐{Y}项更新
  • {Z}项仅作信息参考

**在此处暂停**。使用`AskUserQuestion`:

| 标题 | 问题                                      | 选项                                                                                                      |
| ------ | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| 操作 | 我们应如何处理审核结果? | 应用所有推荐项(推荐)/ 选择部分项应用 / 仅试运行(显示差异) / 跳过(仅提交报告) |

如果`$ARGUMENTS`中包含`--dry-run`:跳过该问题,仅显示差异,不应用更改。

---

Phase 6: Apply Changes

阶段6:应用更改

Based on user selection:
  1. Apply only approved items — never sneak in extras
  2. Prefer Edit over Write — modify existing files, don't recreate
  3. Show diff summary after each change
  4. Verify the change doesn't break existing config (quick sanity read)
If user selected "Dry run only": show what each edit would look like, then stop.

根据用户选择执行:
  1. 仅应用已批准的项——绝不擅自添加额外内容
  2. 优先使用Edit而非Write——修改现有文件,而非重新创建
  3. 每次更改后显示差异摘要
  4. 验证更改不会破坏现有配置(快速 sanity 检查)
如果用户选择“仅试运行”:展示每项编辑的预期效果,然后停止。

Edge Cases

边缘情况

  • No changelog access: Fall back to Perplexity-only research, note reduced confidence
  • No new features found: Report "Configuration is up to date — no changes needed" — this is a valid, expected outcome
  • --dry-run
    flag in arguments
    : Show full report, skip Phase 6
  • Too many suggestions: Cap at 10, note overflow count
  • Perplexity unavailable: Fall back to WebFetch of docs + changelog only
  • All findings are STILL GOOD: Celebrate it — a well-maintained config is the goal

Execute now. Snapshot config, fetch latest capabilities, analyze gaps, and present a conservative report.
  • 无法访问更新日志:退回到仅使用Perplexity进行研究,记录置信度降低
  • 未发现新功能:报告“配置已为最新版本——无需更改”——这是合理且预期的结果
  • 参数中包含
    --dry-run
    标志
    :显示完整报告,跳过阶段6
  • 建议过多:上限为10条,记录超出数量
  • Perplexity不可用:退回到仅使用WebFetch获取文档和更新日志
  • 所有发现均为“依然良好”:对此表示认可——维护良好的配置是最终目标

立即执行。快照当前配置、获取最新功能、分析差距并提交一份保守的审核报告。