技能索引片段
- 作者仓库星标 0
- 作者更新于 2026年8月7日 18:11
- 作者仓库 dotnet-skills
- 领域
- 通用
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @Aaronontheweb · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# Maintaining Skill Index Snippets (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
## 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)
## 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.
## Minimal Snippet Template (Readable)
Use this in target repos to route common tasks:
```markdown
# 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
```
## Compressed Snippet Template (Vercel-style)
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}
```
### Regenerating the README block
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
```
## 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.
## 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.
章节与文件索引
按说明文件中的顺序排列。
何时使用此技能
目标
真理之源
最小片段模板(可读)
压缩片段模板(Vercel 风格)
文件/命令 -> .claude-plugin/plugin.json · AGENTS.md · CLAUDE.md · agents/ · name: · name · ./scripts/validate-marketplace.sh
内容校验值 -> daef57e71516
当前原文的自动摘译,尚未人工审校。
何时使用此技能
在以下情况下使用此技能: 添加、删除或重命名此存储库中的任何技能或代理 更新
.claude-plugin/plugin.json为下游存储库(OpenCode、Claude Code 等)创建复制/粘贴片段 您需要一个紧凑、始终在线的索引来提高技能利用率目标
通过删除决策点,使技能和代理易于编码助理使用。不要希望助手“记住”调用技能,而是在
AGENTS.md/CLAUDE.md中提供一个小的路由器片段: 告诉助手更喜欢检索主导的推理 提供任务->技能/代理路由索引 定义轻量级质量门(可选)真理之源
注册表:
.claude-plugin/plugin.json技能以目录形式列出(每个都包含SKILL.md) 代理以降价文件形式列在agents/技能 ID:每个SKILL.mdfrontmatter 中的name:字段 代理 ID:每个代理 frontmatter 中的name:字段最小片段模板(可读)
在目标存储库中使用它来路由常见任务:
压缩片段模板(Vercel 风格)
当您需要最大密度(上下文占用空间小)时使用此选项: