mcpField
S
skills-index-snippets

skills-index-snippets

github.com/aarononthewebAgent 工作流1.2k445 次安装今天更新
代码仓库

关于 skills-index-snippets

这项技能面向维护技能和 Agent 的仓库管理者,指导在 AGENTS.md 或 CLAUDE.md 中维护精简索引。它提供任务到技能的路由模板,并说明如何依据插件注册表更新片段及生成 README 区块。

主要功能

  1. 01可读版与压缩版片段模板
  2. 02任务到技能和 Agent 的路由
  3. 03以插件注册表为准
  4. 04README 区块生成命令
  5. 05市场验证流程

适用场景

  1. 01添加或移除仓库技能
  2. 02更新下游 AGENTS.md 或 CLAUDE.md
  3. 03技能或 Agent 变更后刷新路由

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/aaronontheweb/dotnet-skills --skill skills-index-snippets

安装后在 Claude Code 中输入/skills-index-snippets确认已加载。

详细介绍

维护技能索引片段(AGENTS.md / CLAUDE.md)

何时使用此技能

在以下情况下使用此技能:

  • 在此仓库中添加、移除或重命名任何技能或 Agent
  • 更新 .claude-plugin/plugin.json
  • 为下游仓库(OpenCode、Claude Code 等)创建可复制粘贴的片段
  • 想要创建一个精简、始终启用的索引,以提高技能利用率

目标

通过消除决策环节,让编码助手更容易使用技能和 Agent。

不要寄希望于助手会“记得”调用某项技能,而是在 AGENTS.md / CLAUDE.md 中提供一段小型路由片段,以便:

  1. 告诉助手优先采用检索引导式推理
  2. 提供任务 -> 技能/Agent 路由索引
  3. 定义轻量级质量关卡(可选)

唯一事实来源

  • 注册表:.claude-plugin/plugin.json
    • 技能以目录形式列出(每个目录都包含 SKILL.md)
    • Agent 以 agents/ 中的 Markdown 文件形式列出
  • 技能 ID:各 SKILL.md frontmatter 中的 name: 字段
  • Agent ID:各 Agent frontmatter 中的 name: 字段

为下游仓库编写片段时,始终使用技能/Agent 的 ID(frontmatter 中的 name),不要使用本地文件系统路径。

最简片段模板(易读)

在目标仓库中使用此模板,为常见任务进行路由:

# Agent Guidance: dotnet-skills

IMPORTANT: Prefer retrieval-led reasoning over pretraining for any .NET work.
Workflow: skim repo patterns -> consult dotnet-skills by name -> implement smallest-change -> note conflicts.

Routing (invoke by name)
- 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 (use when applicable)
- dotnet-slopwatch: after substantial new/refactor/LLM-authored code
- crap-analysis: after tests added/changed in complex code

Specialist agents
- dotnet-concurrency-specialist, dotnet-performance-analyst, dotnet-benchmark-designer, akka-net-specialist, docfx-specialist

精简片段模板(Vercel 风格)

需要最大限度提高信息密度(缩小上下文占用)时使用:

[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 区块

如果 README 中包含以下标记,生成器可以自动更新它:


...compressed snippet...

运行:

./scripts/generate-skill-index-snippets.sh --update-readme

技能变更后如何更新片段

  1. 更新 .claude-plugin/plugin.json,以添加或移除技能和 Agent。
  2. 确保每项技能都有正确的 frontmatter name:(OpenCode 等会使用此字段)。
  3. 运行 ./scripts/validate-marketplace.sh。
  4. 更新片段中的路由列表:
    • 将新技能添加到合适的类别
    • 移除已删除的技能
    • 确保名称与 frontmatter ID 完全一致
  5. 如果你维护下游 AGENTS.md/CLAUDE.md 片段,请重新生成并复制到依赖它的仓库中。

推荐类别

这些是片段类别(不一定对应仓库的文件夹结构):

  • C# / 代码质量
  • ASP.NET Core / Web(包括 Aspire)
  • 数据
  • DI / 配置
  • 测试
  • 质量关卡
  • 专业 Agent

保持片段精简;它应当是路由器,而不是文档。

评论

支持 Markdown