大模型应用
新增/删除/重命名技能或代理、更新插件清单或为下游仓库制作…
在带 .claude-plugin/plugin.json 的技能仓库中,维护 AGENTS.md/CLAUDE.md 的任务→技能/代理路由片段,并在技能变更后同步更新。
🧪 尚未被验证(还没有小呱复用过的记录,不代表不好)
GDI C 38/100
进化评分(GDI)
综合排序依据 —— 四个维度的加权结果,让你看出「为什么这条排在前面」
内在质量 55/100 ×0.35
使用度 0/100 ×0.30
口碑 50/100 ×0.20
新鲜度 59/100 ×0.15
适用场景
新增/删除/重命名技能或代理、更新插件清特定
解决思路
- 在 AGENTS.md / CLAUDE.md 中放置一个小型 router 片段,而不是依赖助手“记得”调用技能;片段应包含:1) 要求助手优先使用 retrieval-led reasoning;2) 提供 task->skill/agent 路由索引;3) 可选地定义轻量 quality gates。
- 以 `.claude-plugin/plugin.json` 作为 registry:skills 以目录列出(每个目录包含 `SKILL.md`),agents 以 `agents/` 下的 markdown 文件列出。
- 技能 ID 取每个 `SKILL.md` frontmatter 中的 `name:` 字段;代理 ID 取每个 agent frontmatter 中的 `name:` 字段。
- 为下游仓库写 snippet 时,始终用技能/代理的 ID(frontmatter `name`)引用,不要用本地文件系统路径。
- 在目标仓库中使用可读版最小 snippet 来路由常见任务;模板包含标题 `# Agent Guidance: dotnet-skills`、IMPORTANT 提示、workflow、按类别列出的 routing、quality gates、specialist agents。
- 可读版 workflow 写成:`skim repo patterns -> consult dotnet-skills by name -> implement smallest-change -> note conflicts`;IMPORTANT 写成:`Prefer retrieval-led reasoning over pretraining for any .NET work.`
- 可读版 routing 按类别写:C# / code quality 用 `modern-csharp-coding-standards, csharp-concurrency-patterns, api-design, type-design-performance`;ASP.NET Core / Web (incl. Aspire) 用 `aspire-service-defaults, aspire-integration-testing`;Data 用 `efcore-patterns, database-performance`;DI / config 用 `dependency-injection-patterns, microsoft-extensions-configuration`;Testing 用 `testcontainers-integration-tests, playwright-blazor-testing, snapshot-testing`。
- 可读版 quality gates 写:`dotnet-slopwatch` 用于 substantial new/refactor/LLM-authored code 之后;`crap-analysis` 用于 tests added/changed in complex code 之后。
- 可读版 specialist agents 写:`dotnet-concurrency-specialist, dotnet-performance-analyst, dotnet-benchmark-designer, akka-net-specialist, docfx-specialist`。
- 需要最大密度、最小 context footprint 时,使用 Vercel-style compressed snippet;格式为 `[dotnet-skills]|IMPORTANT: Prefer retrieval-led reasoning over pretraining for any .NET work. |flow:{skim repo patterns -> consult dotnet-skills by name -> implement smallest-change -> note conflicts} |route: |csharp:{modern-csharp-coding-standards,csharp-concurrency-patterns,api-design,type-design-performance} |aspnetcore-web:{aspire-service-defaults,aspire-integration-testing} |data:{efcore-patterns,database-performance} |di-config:{dependency-injection-patterns,microsoft-extensions-configuration} |testing:{testcontainers-integration-tests,playwright-blazor-testing,snapshot-testing} |quality-gates:{dotnet-slopwatch(after:substantial new/refactor/LLM code),crap-analysis(after:tests added/changed in complex code)} |agents:{dotnet-concurrency-specialist,dotnet-performance-analyst,dotnet-benchmark-designer,akka-net-specialist,docfx-specialist}`。
- 如果 README 包含 `<!-- BEGIN DOTNET-SKILLS COMPRESSED INDEX -->` 和 `<!-- END DOTNET-SKILLS COMPRESSED INDEX -->` 标记,运行 `./scripts/generate-skill-index-snippets.sh --update-readme` 自动更新 README 中的 compressed index block。
- 技能变更后,先更新 `.claude-plugin/plugin.json`,加入或移除 skills 和 agents。
- 确保每个 skill 的 frontmatter `name:` 正确(OpenCode 等会使用)。
- 运行 `./scripts/validate-marketplace.sh`。
- 更新 snippet 路由列表:把新技能加到正确类别,移除已删除技能,并保持名称与 frontmatter ID 完全一致。
- 如果维护下游 `AGENTS.md` / `CLAUDE.md` snippet,重新生成并重新复制到依赖仓库。
- 使用推荐类别组织 snippet:C# / code quality、ASP.NET Core / Web (incl. Aspire)、Data、DI / config、Testing、Quality gates、Specialist agents。
- 保持 snippet 很小;它应是 router,不是 documentation。
适用边界 · 注意事项
- 不适用于没有 `.claude-plugin/plugin.json`、`agents/` 以及 `scripts/generate-skill-index-snippets.sh`、`scripts/validate-marketplace.sh` 的仓库;它依赖这些注册表与脚本。
- 当目标不是路由索引而是完整文档时不要用;snippet 应保持为小型 router,避免塞满文档。
- 下游仓库不要用本地文件系统路径引用技能/代理,应改用 frontmatter `name` ID。