SuperAPI AI 工具集

skills-index-snippets

编程与开发

查看项目

更新于 10-15 11:50

技能介绍

用途

skills-index-snippets 用于维护 dotnet-skills 仓库中的技能索引片段(AGENTS.md / CLAUDE.md)。其目标是让编码助手更容易使用技能与智能体:不再依赖助手“记得”调用某个技能,而是在 AGENTS.md / CLAUDE.md 中放置一个小型路由片段,明确告诉助手优先采用检索驱动的推理,并提供任务到技能/智能体的路由索引,以及可选的质量门禁。

何时使用

  • 在本仓库中新增、删除或重命名任何技能或智能体时
  • 更新 .claude-plugin/plugin.json 时
  • 为下游仓库(OpenCode、Claude Code 等)创建可复制粘贴的片段时
  • 希望获得一个紧凑、常驻的索引以提升技能利用率时

事实来源

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

为下游仓库编写片段时,始终通过技能/智能体的 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 包含以下标记,生成器可以自动更新它:

<!-- BEGIN DOTNET-SKILLS COMPRESSED INDEX -->
...compressed snippet...
<!-- END DOTNET-SKILLS COMPRESSED INDEX -->

运行:

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

使用方式:技能变更后如何更新片段

  1. 更新 .claude-plugin/plugin.json,加入或移除技能与智能体。
  2. 确保每个技能具有正确的 frontmatter name:(供 OpenCode 等使用)。
  3. 运行 ./scripts/validate-marketplace.sh。
  4. 更新片段路由列表:
    • 将新技能加入正确分类
    • 移除已删除的技能
    • 保持名称与 frontmatter ID 完全一致
  5. 如果维护下游 AGENTS.md/CLAUDE.md 片段,重新生成并重新复制到依赖仓库中。

推荐分类

这些是片段分类(不一定是仓库文件夹结构):

  • C# / code quality
  • ASP.NET Core / Web (incl. Aspire)
  • Data
  • DI / config
  • Testing
  • Quality gates
  • Specialist agents

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

适用场景

  • 维护 dotnet-skills 仓库的技能与智能体索引
  • 为下游仓库生成可复制的路由片段
  • 通过 README 标记与脚本自动同步压缩索引

限制

资料未提供该技能的收费、价格、平台支持范围或效果保证等信息。