agentleFS
BenedictKingBenedictKing/ccx/.agents/skills/model-update/SKILL.md

model-update

Skill4k starsChanged 8 days agoMITView on GitHub

新增或更新 CCX 项目中的 Claude 模型注册。当用户提到新模型发布、添加模型、更新模型元数据、model registry、模型注册时触发。覆盖上游能力表、AgentModelProfile、优先级排序和代码生成。

3 other projects use a version of this.

Trending

Quiet since September.thin dataabout the whole repository

Jan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 1 mentionJun 2026: 1 mentionJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 1 mentionOct 2026: 0 mentionsNov 2026: 0 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the BenedictKing/ccx repository that our weekly crawl found: only 3 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Most recently taken up by

The file

Files
SKILL.md

CCX 模型注册更新技能

当用户输入包含以下关键词时触发:

  • "新模型"、"添加模型"、"model registry"、"模型注册"、"添加 claude"、"新 claude"、"model update"

执行流程

0. 收集模型信息

向用户确认以下信息(可从发布文档或 skill 上下文提取):

字段示例
模型 IDclaude-sonnet-5
显示名Claude Sonnet 5
上下文窗口1000000
最大输出 tokens128000
Thinking 模式adaptive_only / adaptive_always_on / adaptive / extended
Reasoning efforts["low", "medium", "high", "xhigh", "max"]
Provideranthropic
是否更新 "sonnet"/"opus" 等 bare alias需要用户确认

1. 更新上游能力源(single source of truth)

文件: shared/model-registry/ccx_model_registry.json

在 upstreamCapabilities 数组中插入新条目,位置按家族分组(同家族内新版本在前):

{
  "patterns": ["(?:^|[-/])claude-<MODEL_ID>(?:-\\d{4}-\\d{2}-\\d{2}|-\\d{6,8})?(?=$|@)"],
  "provider": "anthropic",
  "displayName": "Claude <Display Name>",
  "contextWindowTokens": <N>,
  "maxOutputTokens": <N>,
  "thinkingMode": "<mode>",
  "reasoningEfforts": ["low", "medium", "high", "xhigh", "max"]
}

注意: 如果该模型存在 -thinking 变体(如 claude-sonnet-4-6-thinking),使用合并 pattern:claude-<ID>(?:-thinking)?(?:-...)?。4.6 系列以后的新模型通常不需要单独的 thinking 条目。

2. 更新后端 AgentModelProfile

文件: backend-go/internal/config/model_registry.go → BuiltinAgentModelProfiles()

添加 glob pattern 条目:

"claude-<MODEL_ID>*": {
    DisplayName:         "Claude <Display Name>",
    ContextWindowTokens: <N>,
    MaxOutputTokens:     <N>,
    ReasoningEfforts:    []string{"low", "medium", "high", "xhigh", "max"},
},

如果需要更新 bare alias(如 sonnet → sonnet-5),同步更新:

"sonnet": {
    DisplayName:         "Claude Sonnet alias",
    ContextWindowTokens: 1000000,
    MaxOutputTokens:     128000,  // 从 64000 更新到 128000
},

3. 更新模型优先级排序

文件: shared/model-priority/model-priority.ts

在 modelPriorityPatterns 数组中按正确位置插入 regex:

/sonnet-5/i,   // 新 Sonnet 5 放在 opus-4-7 之后、sonnet-4-7 之前

定位规则: Claude 家族优先级从高到低为 fable > opus > sonnet > haiku,版本号大的在前。

4. 运行代码生成

node scripts/generate-model-registry.mjs

自动更新以下三个生成文件(DO NOT EDIT):

  • backend-go/internal/config/generated_model_registry.go
  • frontend/src/generated/modelRegistry.ts
  • desktop/frontend/src/generated/model-registry.ts

5. 验证

  1. 确认生成文件包含新模型 ID:
    grep -r "claude-<MODEL_ID>" backend-go/internal/config/generated_model_registry.go frontend/src/generated/modelRegistry.ts desktop/frontend/src/generated/model-registry.ts
  2. 编译检查(可选):
    cd backend-go && go build ./...
  3. 前端类型检查(可选):
    cd frontend && bun run type-check

检查清单

完成更新后逐项核对:

  • ccx_model_registry.json 中新增条目且 pattern 正确
  • model_registry.go 中新增 AgentModelProfile
  • model-priority.ts 中正确位置插入优先级模式
  • bare alias 是否需要更新(向用户确认)
  • generate-model-registry.mjs 已运行,三端生成文件已更新
  • 验证 grep 确认新模型 ID 出现在生成文件中

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.