skills-index-snippets

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Maintaining Skill Index Snippets (AGENTS.md / CLAUDE.md)

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

When to Use This Skill

何时使用此技能

Use this skill when:
  • Adding, removing, or renaming any skills or agents in this repository
  • Updating
    .claude-plugin/plugin.json
  • Creating copy/paste snippets for downstream repositories (OpenCode, Claude Code, etc.)
  • You want a compact, always-on index that improves skill utilization
当出现以下情况时使用此技能:
  • 在本仓库中添加、移除或重命名任何技能或Agent
  • 更新
    .claude-plugin/plugin.json
  • 为下游仓库(OpenCode、Claude Code等)创建可复制粘贴的片段
  • 你需要一个紧凑、随时可用的索引来提升技能利用率

Goal

目标

Make skills and agents easy for coding assistants to use by removing the decision point.
Instead of hoping an assistant will "remember" to invoke a skill, provide a small router snippet inside
AGENTS.md
/
CLAUDE.md
that:
  1. Tells the assistant to prefer retrieval-led reasoning
  2. Provides a task->skill/agent routing index
  3. Defines lightweight quality gates (optional)
通过消除决策环节,让编码助手能够轻松使用技能与Agent。
不要寄希望于助手“记住”调用某个技能,而是在
AGENTS.md
/
CLAUDE.md
中提供一个小型路由片段,该片段需实现:
  1. 告知助手优先采用检索驱动的推理方式
  2. 提供任务到技能/Agent的路由索引
  3. 定义轻量级质量门(可选)

Source of Truth

事实来源

  • Registry:
    .claude-plugin/plugin.json
    • Skills are listed as directories (each contains
      SKILL.md
      )
    • Agents are listed as markdown files in
      agents/
  • Skill IDs: the
    name:
    field in each
    SKILL.md
    frontmatter
  • Agent IDs: the
    name:
    field in each agent frontmatter
When writing snippets for downstream repos, always reference skills/agents by their IDs (frontmatter
name
), not by local filesystem paths.
  • 注册表:
    .claude-plugin/plugin.json
    • 技能以目录形式列出(每个目录包含
      SKILL.md
    • Agent以markdown文件形式存放在
      agents/
      目录下
  • 技能ID:每个
    SKILL.md
    前置元数据中的
    name:
    字段
  • Agent ID:每个Agent前置元数据中的
    name:
    字段
为下游仓库编写片段时,始终通过ID(前置元数据的
name
)引用技能/Agent,而非本地文件系统路径。

Minimal Snippet Template (Readable)

最小化片段模板(易读版)

Use this in target repos to route common tasks:
markdown
undefined
在目标仓库中使用此模板来路由常见任务:
markdown
undefined

Agent Guidance: dotnet-skills

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
undefined
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
undefined

Compressed Snippet Template (Vercel-style)

压缩片段模板(Vercel风格)

Use this when you want maximum density (small context footprint):
markdown
[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}
当你需要最高密度(最小上下文占用)时使用此模板:
markdown
[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}

Regenerating the README block

重新生成README块

If the README contains the markers below, the generator can update it automatically:
<!-- BEGIN DOTNET-SKILLS COMPRESSED INDEX -->
...compressed snippet...
<!-- END DOTNET-SKILLS COMPRESSED INDEX -->
Run:
bash
./scripts/generate-skill-index-snippets.sh --update-readme
如果README包含以下标记,生成器可以自动更新它:
<!-- BEGIN DOTNET-SKILLS COMPRESSED INDEX -->
...compressed snippet...
<!-- END DOTNET-SKILLS COMPRESSED INDEX -->
运行:
bash
./scripts/generate-skill-index-snippets.sh --update-readme

How to Update Snippets After Skill Changes

技能变更后如何更新片段

  1. Update
    .claude-plugin/plugin.json
    to include/remove skills and agents.
  2. Ensure each skill has correct frontmatter
    name:
    (used by OpenCode and others).
  3. Run
    ./scripts/validate-marketplace.sh
    .
  4. Update your snippet routing lists:
    • Add new skills to the right category
    • Remove deleted skills
    • Keep names exactly matching frontmatter IDs
  5. If you maintain a downstream
    AGENTS.md
    /
    CLAUDE.md
    snippet, regenerate it and re-copy into dependent repos.
  1. 更新
    .claude-plugin/plugin.json
    以添加/移除技能和Agent。
  2. 确保每个技能的前置元数据
    name:
    字段正确(供OpenCode等工具使用)。
  3. 运行
    ./scripts/validate-marketplace.sh
  4. 更新你的片段路由列表:
    • 将新技能添加到对应分类
    • 移除已删除的技能
    • 确保名称与前置元数据ID完全匹配
  5. 如果你维护下游仓库的
    AGENTS.md
    /
    CLAUDE.md
    片段,重新生成并复制到依赖仓库中。

Recommended Categories

推荐分类

These are snippet categories (not necessarily repository folder structure):
  • C# / code quality
  • ASP.NET Core / Web (incl. Aspire)
  • Data
  • DI / config
  • Testing
  • Quality gates
  • Specialist agents
Keep the snippet small; it should be a router, not documentation.
以下是片段分类(不一定与仓库文件夹结构一致):
  • C# / 代码质量
  • ASP.NET Core / Web(含Aspire)
  • 数据
  • DI / 配置
  • 测试
  • 质量门
  • 专业Agent
保持片段简洁;它应该是一个路由工具,而非文档。