17 Commits

Author SHA1 Message Date
1f7c8b9673 feat: skills i18n 改造(schemaVersion 1.1,零向后兼容) (#1)
* feat: skills i18n 改造 — schemaVersion 1.1,零向后兼容

把 21 个 skills + 1 个 agent + manifest/categories 全量迁移到 schemaVersion 1.1
的 i18n 结构,配套 CI AI 翻译流水线(GitHub Models)与本地工具链。

## 关键变更

### 数据结构(破坏性,schemaVersion 1.0 → 1.1)
- SKILL.md: 顶层 name 改为 ASCII slug(== 目录名,符合 agentskills.io 规范);
  中文显示名/short_desc/description 全部迁入 metadata.i18n.<locale>
- agents/<id>/agent.json: shortDesc/fullDesc/tags/persona.{role,traits} 迁入
  i18n.<locale>;changelog[].changes 改为 { <locale>: string[] } 对象
- categories.json: 每个分类的 label/description 迁入 i18n.<locale>,顶层只剩
  color/icon
- manifest.json: 加 supportedLocales / defaultLocale;顶层 description 迁入
  i18n.<locale>

### Body 文件结构
- 根 SKILL.md = frontmatter + default_locale (en-US) body
- SKILL.<locale>.md = 各 locale 的 markdown body(首行 <!-- locale: xx --> 自校验)

### 工具链(scripts/i18n/)
- glossary.json: zh→en 术语表 + do_not_translate 白名单
- schema/skill-frontmatter.schema.json: i18n frontmatter JSON Schema
- validate-i18n.py: 8 条校验规则(name 合规 / locale 完整性 / hash 一致性等)
- translate.py: GitHub Models / Anthropic 双 backend,sha256 增量翻译
- migrate.py: 一次性迁移脚本(旧格式 → i18n 结构)

### CI(.github/workflows/)
- i18n-validate.yml: PR 触发跑 validate + translate --check
- i18n-translate.yml: PR 触发用 GitHub Models(默认 openai/gpt-5-mini)翻译缺失
  locale,自动追加 commit;可切到 ANTHROPIC_API_KEY 走 Claude

### 文档
- docs/I18N.md: 作者贡献指南(schema 说明 / 提交流程 / 常见问题)
- README.md: 加多语言段落

## 验证

- uv run scripts/i18n/validate-i18n.py: OK,49 文件 0 错误
- uv run scripts/i18n/translate.py --check: 0 stale locale
- 21 skills 标题数 zh-CN == en-US 严格对齐(最大 66=66)
- skills-ref 规范校验:全部通过(顶层 name ASCII slug + description 单字段)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(i18n): 修复 PR #1 review 反馈的 6 项问题

- schema: translated_by 正则放宽为 ^(human|ai:[A-Za-z0-9._:/-]+)$,接受
  'ai:github:openai/gpt-5-mini' 这类 backend:model 形式(CI 翻译输出格式)
- README + docs/I18N.md: 修正"CI 用 Claude API"误导描述,正确说明默认是
  GitHub Models(openai/gpt-5-mini)+ GITHUB_TOKEN,可选切到 Anthropic
- skills/minimax-tts/SKILL.md & SKILL.zh-CN.md: 删除多余的 ``` 闭合,避免
  Markdown 后续渲染错乱
- skills/docx/SKILL.md: 翻译时丢失的 • Unicode escape 示例已恢复,
  与 zh-CN 版本对齐

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 00:26:33 +08:00
3bed41d7a1 fix: 全局技能 disable-model-invocation 改为 true,按需加载减少 system prompt 体积
13 个技能从 false(自动注入 ~160KB)改为 true(按需加载),
大幅减少每次 LLM 请求的 system prompt token 占用。

涉及技能(版本号 patch +1):
- create-agent 2.4.1→2.4.2
- delete-agent 2.4.1→2.4.2
- discover-agent 2.5.1→2.5.2
- docx 1.0.1→1.0.2
- frontend-design 1.0.1→1.0.2
- mail-operations 1.0.1→1.0.2
- manage-skills 1.0.1→1.0.2
- pdf 1.0.1→1.0.2
- pptx 1.0.1→1.0.2
- s3-storage-operations 2.0.1→2.0.2
- skill-creator 1.0.0→1.0.1
- update-agent 3.0.1→3.0.2
- xlsx 1.0.1→1.0.2
2026-04-13 16:28:52 +08:00
aa6b1389fe fix: 为 9 个 skill 补全 L0/L1/L2 分层结构,版本号 +1
按照 desirecore-format.md 规范,为以下 skill 添加标准分层结构:
- docx (1.0.0→1.0.1), pdf (1.0.0→1.0.1), pptx (1.0.0→1.0.1), xlsx (1.0.0→1.0.1)
- frontend-design (1.0.0→1.0.1), mail-operations (1.0.0→1.0.1)
- environment-setup (1.1.0→1.1.1), web-access (1.1.0→1.1.1)
- manage-teams (1.2.0→1.2.1)

每个文件增加 L0(一句话摘要)、L1(概述与使用场景)、L2(详细规范)三层,
原有技术内容保持不变,metadata.updated_at 更新为 2026-04-13。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 15:33:56 +08:00
0f8daa5a0f refactor: discover-agent 改为按需加载(disable-model-invocation: true)
与 Claude Code 的 skills 加载机制对齐:默认不将完整内容注入 system prompt,
改为通过 Skill 工具按需加载,节省 token 消耗。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 15:38:58 +08:00
0e013567d3 refactor: 四个全局技能复盘优化(v2.4.0)
P0 结构性修复:
- update-agent 阶段 5 统一为 HTTP API,移除所有 Git 操作示例
- create-agent 响应格式与实际 API 对齐
- delete-agent 合并"前置检查"与"错误处理"

P1 一致性修复:
- 统一 frontmatter 字段顺序、tags 英文化
- 提取 AgentFS 背景知识到共享 _agentfs-background.md
- 受保护路径统一引用 _protected-paths.yaml

P2 缺失补充:
- discover-agent 补充"了解更多"API 实现
- update-agent 新增 Persona 修改示例
- create-agent 补充"修改"分支交互流程
- delete-agent 补充停止 Agent 方式

P3 精简优化:
- 精简版本回滚、删除范围、匹配算法描述

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 22:47:09 +08:00
41afa07fbe chore: 全局技能升版至 v2.3.0
- 统一版本来源(移除 metadata.version 冗余)
- create-agent / update-agent risk_level 降为 low
- 技能名称中文化

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:53:47 +08:00
cb52235673 refactor: 移除 metadata.version 冗余,顶层 version 为唯一来源
- 所有 SKILL.md 的版本号统一由顶层 version 字段定义
- 删除 metadata 中的冗余 version 副本
- 参考 OpenClaw 实践:version 作为顶层一等公民

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:50:59 +08:00
2c40829b63 chore: discover-agent / delete-agent 升版至 2.2.0
- 与 create-agent / update-agent 版本对齐
- name 字段已在上个提交改为中文

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 19:21:00 +08:00
53fbc46150 refactor: 技能 name 改为中文 + update-agent 加入 AgentFS 背景知识
- 4 个技能 name 改为中文:创建智能体、更新智能体、发现智能体、删除智能体
- update-agent 新增 AgentFS 仓库结构背景知识(仅 Agent 内部使用)
- update-agent 回执改为用户友好格式,移除内部路径和 YAML 回执
- 合并重复的受保护路径段到背景知识中
2026-02-28 18:46:26 +08:00
b8ba404577 refactor: 消灭 skill.json,SKILL.md 成为唯一真相源
- 将 skill.json 中的 icon、shortDesc、category、maintainer、
  compatibleAgents、channel 迁移到 SKILL.md frontmatter 的 market 段
- 将 skill.json 中的 changelog 字段提取为独立 CHANGELOG.md
- 删除所有 skill.json(downloads/rating/ratingCount 等虚假数据一并移除)
- 版本号统一从 SKILL.md frontmatter version 读取

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 20:38:00 +08:00
89e68de812 feat: 上架 DesireCore 核心智能体,新增管理分类,精简 latestVersion
- 新增 management 分类(系统管理与编排工具)
- 创建 DesireCore Agent 市场条目(id: desirecore, verified)
- 更新 manifest 统计(totalAgents: 1, lastUpdated: 2026-02-27)
- 移除 4 个 skill.json 中冗余的 latestVersion 字段(version 已够用)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 20:28:51 +08:00
b2926b3212 fix: 同步 skill.json 版本至 2.1.0,移除 fetch_api 依赖
- 4 个全局技能 skill.json version/latestVersion 统一为 2.1.0
- requires.tools 移除已废弃的 fetch_api
- 更新 updatedAt 和 changelog
2026-02-26 20:54:06 +08:00
761226d567 feat: 统一全局技能至 v2.1.0,简化 API 调用方式
- 4 个全局技能版本统一为 2.1.0
- 移除 fetch_api 工具引用,改为通过 Bash/curl 调用 HTTP API
- API 基础地址由 system prompt 注入,技能无需自行端口发现
- create-agent 改为以用户阅读体验优先的 blockquote 格式呈现 markdown 内容
2026-02-26 20:38:35 +08:00
c1ca91c80a style: 技能图标升级为色彩丰富的多色 SVG
将 9 个技能图标从单色 stroke 风格升级为带渐变、填充、多色的
丰富视觉风格,每个图标使用项目 3+2 色彩体系中的特征色:
- search: 蓝/青渐变镜片
- file-text: 蓝色文档+紫色文字行
- calendar-days: 绿色框架+蓝/青日期点
- compass: 紫色罗盘+橙色指针
- folder-open: 橙/黄渐变文件夹
- mail: 蓝色渐变信封
- user-plus: 绿色人物+绿色加号
- user-minus: 橙红色人物+红色减号
- user-cog: 紫蓝色人物+蓝色齿轮

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 11:15:28 +08:00
6837bd897a refactor: icon 字段从 Lucide 名称迁移到内联 SVG
将 9 个技能的 icon 字段从 Lucide 图标名称(如 "search")替换为
内联 SVG 字符串,使市场数据完全自包含,新增技能无需修改前端代码。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 10:17:01 +08:00
a787208db9 feat: 为 4 个 builtin 技能添加 skill.json 市场元数据
- create-agent: 创建智能体(元技能,medium 风险)
- delete-agent: 删除智能体(元技能,high 风险)
- discover-agent: 发现智能体(流程型,low 风险)
- update-agent: 更新智能体(元技能,high 风险)

使 market-sync 的 scanSkills() 能够索引这些技能,
在市场 UI 中正常展示。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 09:15:32 +08:00
15e8d1f0c8 feat: 添加 4 个全局技能到 builtin 通道
- 新增 builtin-skills.json 清单
- 添加 create-agent / delete-agent / discover-agent / update-agent SKILL.md
- 添加 _protected-paths.yaml 共享配置
- 与捆绑源版本一致,启用 Phase 2 热更新通道

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 09:10:44 +08:00