$npx -y skills add Aaronontheweb/dotnet-skills --skill skills-index-snippetsCreate and maintain AGENTS.md / CLAUDE.md snippet indexes that route tasks to the correct dotnet-skills skills and agents (including compressed Vercel-style indexes).
| 1 | # Maintaining Skill Index Snippets (AGENTS.md / CLAUDE.md) |
| 2 | |
| 3 | ## When to Use This Skill |
| 4 | |
| 5 | Use this skill when: |
| 6 | - Adding, removing, or renaming any skills or agents in this repository |
| 7 | - Updating `.claude-plugin/plugin.json` |
| 8 | - Creating copy/paste snippets for downstream repositories (OpenCode, Claude Code, etc.) |
| 9 | - You want a compact, always-on index that improves skill utilization |
| 10 | |
| 11 | ## Goal |
| 12 | |
| 13 | Make skills and agents easy for coding assistants to use by removing the decision point. |
| 14 | |
| 15 | Instead of hoping an assistant will "remember" to invoke a skill, provide a small router snippet inside `AGENTS.md` / `CLAUDE.md` that: |
| 16 | |
| 17 | 1) Tells the assistant to prefer retrieval-led reasoning |
| 18 | 2) Provides a task->skill/agent routing index |
| 19 | 3) Defines lightweight quality gates (optional) |
| 20 | |
| 21 | ## Source of Truth |
| 22 | |
| 23 | - Registry: `.claude-plugin/plugin.json` |
| 24 | - Skills are listed as directories (each contains `SKILL.md`) |
| 25 | - Agents are listed as markdown files in `agents/` |
| 26 | - Skill IDs: the `name:` field in each `SKILL.md` frontmatter |
| 27 | - Agent IDs: the `name:` field in each agent frontmatter |
| 28 | |
| 29 | When writing snippets for downstream repos, always reference skills/agents by their IDs (frontmatter `name`), not by local filesystem paths. |
| 30 | |
| 31 | ## Minimal Snippet Template (Readable) |
| 32 | |
| 33 | Use this in target repos to route common tasks: |
| 34 | |
| 35 | ```markdown |
| 36 | # Agent Guidance: dotnet-skills |
| 37 | |
| 38 | IMPORTANT: Prefer retrieval-led reasoning over pretraining for any .NET work. |
| 39 | Workflow: skim repo patterns -> consult dotnet-skills by name -> implement smallest-change -> note conflicts. |
| 40 | |
| 41 | Routing (invoke by name) |
| 42 | - C# / code quality: modern-csharp-coding-standards, csharp-concurrency-patterns, api-design, type-design-performance |
| 43 | - ASP.NET Core / Web (incl. Aspire): aspire-service-defaults, aspire-integration-testing |
| 44 | - Data: efcore-patterns, database-performance |
| 45 | - DI / config: dependency-injection-patterns, microsoft-extensions-configuration |
| 46 | - Testing: testcontainers-integration-tests, playwright-blazor-testing, snapshot-testing |
| 47 | |
| 48 | Quality gates (use when applicable) |
| 49 | - dotnet-slopwatch: after substantial new/refactor/LLM-authored code |
| 50 | - crap-analysis: after tests added/changed in complex code |
| 51 | |
| 52 | Specialist agents |
| 53 | - dotnet-concurrency-specialist, dotnet-performance-analyst, dotnet-benchmark-designer, akka-net-specialist, docfx-specialist |
| 54 | ``` |
| 55 | |
| 56 | ## Compressed Snippet Template (Vercel-style) |
| 57 | |
| 58 | Use this when you want maximum density (small context footprint): |
| 59 | |
| 60 | ```markdown |
| 61 | [dotnet-skills]|IMPORTANT: Prefer retrieval-led reasoning over pretraining for any .NET work. |
| 62 | |flow:{skim repo patterns -> consult dotnet-skills by name -> implement smallest-change -> note conflicts} |
| 63 | |route: |
| 64 | |csharp:{modern-csharp-coding-standards,csharp-concurrency-patterns,api-design,type-design-performance} |
| 65 | |aspnetcore-web:{aspire-service-defaults,aspire-integration-testing} |
| 66 | |data:{efcore-patterns,database-performance} |
| 67 | |di-config:{dependency-injection-patterns,microsoft-extensions-configuration} |
| 68 | |testing:{testcontainers-integration-tests,playwright-blazor-testing,snapshot-testing} |
| 69 | |quality-gates:{dotnet-slopwatch(after:substantial new/refactor/LLM code),crap-analysis(after:tests added/changed in complex code)} |
| 70 | |agents:{dotnet-concurrency-specialist,dotnet-performance-analyst,dotnet-benchmark-designer,akka-net-specialist,docfx-specialist} |
| 71 | ``` |
| 72 | |
| 73 | ### Regenerating the README block |
| 74 | |
| 75 | If the README contains the markers below, the generator can update it automatically: |
| 76 | |
| 77 | ``` |
| 78 | <!-- BEGIN DOTNET-SKILLS COMPRESSED INDEX --> |
| 79 | ...compressed snippet... |
| 80 | <!-- END DOTNET-SKILLS COMPRESSED INDEX --> |
| 81 | ``` |
| 82 | |
| 83 | Run: |
| 84 | |
| 85 | ```bash |
| 86 | ./scripts/generate-skill-index-snippets.sh --update-readme |
| 87 | ``` |
| 88 | |
| 89 | ## How to Update Snippets After Skill Changes |
| 90 | |
| 91 | 1. Update `.claude-plugin/plugin.json` to include/remove skills and agents. |
| 92 | 2. Ensure each skill has correct frontmatter `name:` (used by OpenCode and others). |
| 93 | 3. Run `./scripts/validate-marketplace.sh`. |
| 94 | 4. Update your snippet routing lists: |
| 95 | - Add new skills to the right category |
| 96 | - Remove deleted skills |
| 97 | - Keep names exactly matching frontmatter IDs |
| 98 | 5. If you maintain a downstream `AGENTS.md`/`CLAUDE.md` snippet, regenerate it and re-copy into dependent repos. |
| 99 | |
| 100 | ## Recommended Categories |
| 101 | |
| 102 | These are snippet categories (not necessarily repository folder structure): |
| 103 | |
| 104 | - C# / code quality |
| 105 | - ASP.NET Core / Web (incl. Aspire) |
| 106 | - Data |
| 107 | - DI / config |
| 108 | - Testing |
| 109 | - Quality gates |
| 110 | - Specialist agents |
| 111 | |
| 112 | Keep the snippet small; it should be a router, not documentation. |