Developer Tools .NET 528 vues

Stop Fighting Your AI Agent! Use dotnet-skills Instead

B
Bright Coding
Auteur
Stop Fighting Your AI Agent! Use dotnet-skills Instead

Stop Fighting Your AI Agent! Use dotnet-skills Instead

You've been there. We all have.

You fire up Claude Code, prompt it to scaffold a new Entity Framework Core migration, and watch in horror as it generates DbContext initialization patterns from EF6 in 2014. You ask GitHub Copilot to wire up a Minimal API endpoint, and it confidently dumps a bloated Startup.cs with ConfigureServices() and Configure() methods that Microsoft deprecated years ago. You beg Codex to understand the difference between Blazor Server and Blazor WebAssembly, and it treats them like interchangeable buzzwords.

The result? Hours of cleanup. Refactoring ancient patterns. Untangling confused architectural decisions. Explaining to your AI—again—that .NET 8+ doesn't use the same hosting model as .NET Core 2.1.

Here's the dirty secret nobody talks about: your AI agent doesn't know .NET. Not really. It knows fragments of .NET. Scraped blog posts from 2019. Stack Overflow answers with conflicting versions. Documentation snapshots that may or may not reflect current best practices. It's a probabilistic parrot, not a .NET architect.

But what if you could install .NET expertise directly into your AI's brain?

Enter dotnet-skills—the open-source, community-driven skill catalog that transforms your clueless AI assistant into a modern .NET powerhouse. This isn't another chatbot wrapper or prompt engineering trick. It's a surgical implant of structured, version-aware, framework-specific knowledge that works across Claude, Copilot, Codex, Gemini, and Junie.

Stop explaining .NET to your AI. Start building.


What is dotnet-skills?

dotnet-skills is an installable .NET skill catalog and CLI tool created by ManagedCode that delivers structured, maintained expertise directly to AI coding agents. Born from the frustration of watching AI tools generate outdated .NET patterns, this project represents a fundamental shift in how we equip artificial intelligence with domain-specific knowledge.

The repository hosts 162+ meticulously crafted skills spanning the entire .NET ecosystem—from foundational C# scripting and modern language features to specialized frameworks like Orleans, Aspire, Semantic Kernel, and MAUI. Each skill is a self-contained knowledge unit with clear activation rules, usage boundaries, and implementation guidance that prevents your AI from wandering into deprecated territory.

What makes dotnet-skills genuinely revolutionary is its agent-agnostic architecture. Unlike vendor-locked solutions that only work with one platform, this catalog installs natively into Claude's skill directory, Copilot's GitHub skills folder, Gemini's configuration, Codex's home path, and Junie's workspace. The same knowledge. The same accuracy. Everywhere you code.

The project is community-driven and actively maintained, with automatic catalog releases published daily at 04:00 UTC. Skills track official Microsoft documentation and evolve with the platform—not against it. Versioning follows calendar-based releases (2026.3.15.0 format), so you always know exactly how current your AI's knowledge is.

Perhaps most importantly, dotnet-skills introduces a structured taxonomy that prevents the "one giant .NET bucket" problem. Skills are organized into focused collections—.NET Foundations, .NET Quality, Web, Aspire, Distributed, AI & Agents, Testing, Architecture, and more—so your AI activates only relevant expertise instead of hallucinating across unrelated domains.

This isn't a prompt library. It's not a RAG hack. It's a declarative knowledge system that makes AI agents genuinely competent at .NET development.


Key Features That Change Everything

Agent-Native Installation Paths

The tool detects and writes to each agent's native skill directory automatically. Claude gets ~/.claude/skills/, Copilot receives .github/skills/, Gemini uses ~/.gemini/skills/, Codex installs to $CODEX_HOME/skills/, and Junie uses ~/.junie/skills/. No manual file shuffling. No path confusion. The --auto flag even scans your existing project directories to detect which agents you're already using.

Intelligent Project Detection

Run dotnet skills recommend and watch it scan your local *.csproj files, analyze NuGet package references, detect SDK patterns, and propose exactly the skills your project needs. The --auto flag goes further—automatically installing matching skills without prompting. Add --prune and it removes stale skills when you remove packages, keeping your AI's knowledge lean and relevant.

Focused Bundles for Rapid Setup

Why install skills one-by-one when you can grab curated bundles? The quality bundle installs analyzer configuration, formatting tools, and CI gates. The orleans bundle covers grain boundaries, persistence, streams, and cluster validation. The mcaf bundle brings governance and delivery standards. Fourteen focused bundles exist, each a carefully composed skill set for common workflows.

Token-Aware Catalog Management

AI agents have context limits. dotnet-skills exports per-skill token counts via dotnet skills catalog tokens --catalog-root ., letting you optimize exactly what knowledge loads into your agent's working memory. No more wasted tokens on irrelevant frameworks.

Orchestration Agents Layer

Beyond individual skills, the repository now tracks orchestration agents—higher-level routing intelligence that classifies tasks and delegates to appropriate specialists. The dotnet-router agent classifies work into web, data, AI, build, UI, testing, and modernization lanes. The dotnet-build agent handles restore, build, pack, and CI diagnostics. The dotnet-ai agent specializes in Semantic Kernel, Microsoft Agent Framework, and MCP patterns.

Rich Interactive CLI

The bare dotnet skills command opens an interactive control center with direct skill browsing, collection navigation, bundle exploration, token analysis, and install previews before any files are written. Rich terminal tables show installed versions, update candidates, and exact install commands. It's a TUI that feels like a modern package manager.

External Upstream Integration

The project doesn't reinvent every wheel. Through vendir-based imports, it incorporates upstream skill repositories, applies local policy overrides for compatibility and categorization, and normalizes everything into the unified catalog structure. Community contributions and official Microsoft guidance coexist seamlessly.


Use Cases Where dotnet-skills Shines

Legacy Migration Nightmares

You're modernizing a .NET Framework 4.8 monolith to .NET 8. Your AI keeps suggesting WebHostBuilder patterns and Startup.cs configurations that don't exist in modern hosting. Install the runtime-upgrades and msbuild-modernization skills, and suddenly your agent understands SDK-style projects, implicit usings, minimal hosting, and the WebApplication factory pattern. The dotnet-modernization orchestration agent routes upgrade tasks through the correct skill chains instead of guessing.

Microservices with Orleans

Distributed systems are hard. Distributed systems with an AI that conflates Orleans grains with standard dependency injection are impossible. The orleans bundle installs expertise on grain boundaries, persistence providers, stream processing, reminders, placement strategies, and Aspire integration. The dotnet-orleans-specialist agent validates cluster configurations and prevents the subtle mistakes that only surface in production.

Blazor Architecture Decisions

Your team is split on Server vs. WebAssembly vs. Auto render mode. Copilot keeps generating hybrid patterns that compile but perform terribly. The blazor skill provides explicit guidance on state flow, component design, rendering behavior, and hosting choices for each model. No more confused AI responses that treat all Blazor variants as identical.

Performance Investigation

Production is slow. Your AI suggests DateTime.Now optimizations and string concatenation fixes while missing the actual bottleneck. Install build-perf-diagnostics, profiling, and microbenchmarking skills, and your agent gains structured knowledge of BenchmarkDotNet, dotnet-trace, binlog analysis, and the seven common MSBuild bottleneck categories. It learns to ask for binlogs before guessing.

AI-First Development

You're building with Semantic Kernel, Microsoft Agent Framework, or MCP protocols. The dotnet-ai agent and ai-agents collection provide routing for agent-vs-workflow choices, AgentThread patterns, tool integration, and durable agent hosting. Your AI finally understands the frameworks it's supposed to help you code in.


Step-by-Step Installation & Setup Guide

Prerequisites

  • .NET 10+ SDK installed (dotnet --version should show 10.x or higher)
  • One or more supported AI agents installed (Claude Code, GitHub Copilot CLI, Codex CLI, Gemini CLI, or Junie)
  • Git for cloning and contributing

Install the Core Tool

# Install the main skill catalog CLI
dotnet tool install --global dotnet-skills

# Verify installation
dotnet skills --version

The --version flag performs an automatic update check against NuGet, alerting you if a newer release exists. To skip this check, use dotnet skills version --no-check or set DOTNET_SKILLS_SKIP_UPDATE_CHECK=1.

Install Agent Launchers (Choose Your Preferred Shape)

# Option A: dotnet-prefixed agent commands
dotnet tool install --global dotnet-agents

# Option B: Top-level agent commands (shorter)
dotnet tool install --global agents

Both packages provide identical functionality. The dotnet-agents variant gives you dotnet agents list, while agents provides the shorter agents list form. Use whichever matches your muscle memory.

Initial Configuration and Skill Discovery

# Launch the interactive control center
dotnet skills

# View all available skills and bundles
dotnet skills list

# See focused bundle shortcuts
dotnet skills bundle list

# Scan your current project for relevant skills
dotnet skills recommend

The recommend command is read-only—it inspects local *.csproj files, detects NuGet packages and SDK signals, proposes matching skills, and prints the install command for your approval. It never modifies anything automatically.

Automatic Project-Aware Installation

# Auto-install skills based on detected packages
dotnet skills install --auto

# Auto-install with cleanup of stale skills
dotnet skills install --auto --prune

The --auto flag is where the magic happens. It detects Entity Framework Core and installs the dotnet-data routing context. It sees Aspire packages and adds the dotnet-aspire-orchestrator agent. It finds xUnit and brings in testing-xunit skills. Protected diagnostic skills and graphify-dotnet are preserved even during pruning.

Agent-Specific Installation

# Target a specific agent platform
dotnet skills install blazor --agent claude

# Install to project scope instead of global
dotnet skills install orleans --scope project

Without --agent, the tool auto-detects existing native directories (.codex/, .claude/, .github/, .gemini/, .junie/) and installs to all found platforms, falling back to .agents/skills/ only when no native folder exists.

Orchestration Agent Setup

# List available orchestration agents
dotnet agents list

# Auto-install to detected agent directories
dotnet agents install router --auto

# Or with the standalone command
agents install router --auto

The --auto flag for agents writes only to existing native agent directories. If you haven't initialized an agent yet, specify --agent or --target explicitly.

Daily Workflow Commands

# Update all installed skills to latest catalog
dotnet skills update

# Sync latest catalog definitions
dotnet skills sync

# Check where skills are installed
dotnet skills where

# Export token counts for optimization
dotnet skills catalog tokens --catalog-root .

REAL Code Examples from the Repository

Example 1: Interactive Control Center Launch

The primary entry point opens a rich terminal interface for browsing and managing skills:

# Open the interactive control center with full browsing capability
dotnet skills

When executed without arguments, this launches the interactive shell—the main control center that mirrors the public site's navigation structure. The primary catalog surface exposes Packages, Bundles, Collections, Skills, Agents, and About, then layers CLI-only lifecycle surfaces underneath: Project, Installed, Analysis, and Workspace.

Inside this interface, you navigate through Collection -> Lane -> Skill hierarchies, inspect package-entry analysis, view token hotspots for context limit optimization, explore a full tree view of dependencies, and preview exactly which files will be written before confirming installation. This isn't a simple list dump—it's a discoverable, explorable knowledge interface that prevents the cognitive overload of 162+ skills presented flat.

The interactive mode also performs automatic self-update checks on launch, so an outdated tool warns you before rendering any command tables. This ensures you're always working with current catalog definitions.


Example 2: Project-Aware Automatic Installation

The most powerful feature for daily use is automatic skill detection from project files:

# Inspect local .csproj files and auto-install matching skills
dotnet skills install --auto

# Same, but remove skills that no longer match project dependencies
dotnet skills install --auto --prune

This command performs deep project analysis: it scans all *.csproj files in the current directory, extracts NuGet package references, detects SDK identifiers (Microsoft.NET.Sdk.Web, Microsoft.NET.Sdk.BlazorWebAssembly), recognizes project properties (<IsTestProject>, <UseMaui>), and maps these signals to the skill catalog's trigger metadata.

The --prune flag adds declarative skill management—skills installed by previous --auto runs are compared against current project state, and those no longer matching are removed. This prevents skill accumulation as projects evolve. Note that protected diagnostic skills (like graphify-dotnet) are never pruned, preserving critical infrastructure.

Behind the scenes, the tool generates a dependency graph of your project's packages, cross-references against the catalog's manifest.json trigger definitions, and produces a deterministic skill set. The process is idempotent—running --auto twice with the same project state produces identical results.


Example 3: Token Analysis for Context Optimization

AI agents have finite context windows. This command helps you optimize:

# Export per-skill token counts as JSON for analysis
dotnet skills catalog tokens --catalog-root .

The output includes the tokenizer model name and precise token counts for each skill, enabling surgical knowledge loading. Instead of installing entire collections that consume thousands of tokens, you can select individual skills that maximize relevance per context unit.

This is critical for agents like Claude with 200K context windows or Codex with tighter limits. The catalog tokens command reveals which skills are heavyweight (comprehensive framework guides) versus lightweight (focused API references), letting you compose optimal knowledge payloads for specific tasks.

The --catalog-root . parameter specifies that analysis should use the local catalog checkout rather than the published release, useful when developing or previewing custom skills.


Example 4: Bundle Installation for Workflow Efficiency

For rapid environment setup, bundles install related skills atomically:

# Install the complete quality assurance bundle
dotnet skills install bundle quality

# Install the Orleans distributed systems bundle
dotnet skills install bundle orleans

# Install the MCAF governance bundle
dotnet skills install bundle mcaf

Bundles are curated skill compositions that expand into related skill sets. The quality bundle includes analyzer-config, code-analysis, complexity, format, csharpier, quality-ci, and related skills—everything needed for a comprehensive .NET quality gate.

The orleans bundle covers grain design, persistence, streams, reminders, placement, Aspire integration, and cluster validation. The mcaf bundle brings governance, delivery standards, and architectural compliance checks.

Bundle installs are transactional—either all skills in the bundle succeed, or none are applied. This prevents partial installations that could leave your agent with inconsistent knowledge. The bundle list command shows all available bundles with descriptions, while remove bundle <name> cleanly uninstalls every skill mapped to that bundle.


Example 5: Agent-Specific Skill Targeting

When working with multiple AI tools, target skills precisely:

# Install Blazor skills specifically for Claude Code
dotnet skills install blazor --agent claude

# Install Aspire skills for GitHub Copilot
dotnet skills install aspire --agent copilot

The --agent parameter routes skills to the correct filesystem location for each platform. Claude receives files in ~/.claude/skills/ (global) or .claude/skills/ (project scope). Copilot gets .github/skills/ for project installs. Gemini uses ~/.gemini/skills/, Codex respects $CODEX_HOME with ~/.codex/skills/ default, and Junie uses ~/.junie/skills/.

This matters because agent file formats differ subtly. Claude expects specific frontmatter conventions. Copilot uses GitHub's skill schema. The dotnet-skills CLI handles these translations automatically, ensuring each platform receives properly formatted knowledge without manual adaptation.

When --agent is omitted, the tool performs cascading detection: it checks for .codex/, .claude/, .github/, .gemini/, and .junie/ directories in that priority order, installs to every found native platform, and only falls back to .agents/skills/ when no agent-specific directory exists. This "install everywhere" default maximizes compatibility for polyglot AI workflows.


Advanced Usage & Best Practices

Pin Catalog Versions for Reproducibility

By default, dotnet-skills reads the newest non-draft catalog-v* release. For team environments requiring deterministic builds, use --catalog-version to pin to specific releases. The calendar-based versioning (2026.3.15.0) makes it easy to track freshness while ensuring all team members share identical AI knowledge.

Leverage Orchestration Agents for Complex Tasks

Don't just install skills—activate orchestration agents for multi-step workflows. The dotnet-router agent classifies incoming requests and delegates to dotnet-build, dotnet-data, or dotnet-ai as appropriate. This prevents the common failure mode where an AI with 50 installed skills activates the wrong 5 for a specific task.

Use --local for Project Isolation

In monorepos with multiple project types, install skills with --scope project and use dotnet skills list --local to see only project-relevant skills. This prevents Blazor knowledge from leaking into your Orleans backend service context, reducing hallucination surface area.

Monitor Token Hotspots

Regularly run dotnet skills catalog tokens --catalog-root . and audit your installed skills against actual usage. Remove unused collections. The most performant AI agent has minimal, relevant knowledge—not maximum knowledge.

Contribute Missing Skills

The catalog grows through community contribution. If your favorite library lacks coverage—perhaps a niche ORM, a specialized testing tool, or an emerging AI framework—follow the repository's CONTRIBUTING.md to add it. The external upstream system via vendir makes it easy to import and normalize external skill repositories.


Comparison with Alternatives

Feature dotnet-skills Custom Prompt Libraries RAG over Docs Vendor-Specific Skills
Agent Coverage Claude, Copilot, Codex, Gemini, Junie Manual per-agent adaptation Any (unstructured) Single vendor only
Version Awareness Calendar-based releases, explicit versioning None (stale quickly) Depends on doc freshness Varies by vendor
Project Auto-Detection *.csproj scanning with --auto None None Limited
Structured Taxonomy 25+ collections, bundles, orchestration agents Flat or ad-hoc Unstructured search Vendor-defined
Token Optimization Per-skill token export Unknown Unknown Unknown
Community Extensible Open source, PR contributions Fragmented Fragmented Closed ecosystem
Native Agent Formats Automatic translation Manual formatting N/A Native only
Orchestration Layer dotnet-router, dotnet-build, etc. agents None None Limited
Pruning & Lifecycle --auto --prune for declarative management Manual cleanup None None
Offline Capable Full local catalog Depends on hosting Depends on vector DB Often cloud-tethered

Why dotnet-skills wins: It combines the structured precision of vendor-specific solutions with the universal portability that prevents vendor lock-in. Unlike prompt libraries that rot, it has automatic update mechanisms. Unlike raw RAG over documentation, it provides activation rules and usage boundaries that prevent inappropriate skill invocation. And unlike any single vendor's offering, it works across your entire AI toolchain.


FAQ

Q: Which AI agents are supported by dotnet-skills?

A: Claude Code, GitHub Copilot, OpenAI Codex, Google Gemini, and JetBrains Junie are fully supported with native installation paths. The tool also provides a default shared root at ~/.agents/skills/ for emerging or custom agents.

Q: How often is the skill catalog updated?

A: Automatic catalog releases publish daily at 04:00 UTC via GitHub Actions, including the catalog-v* release, GitHub Pages deployment, and NuGet package updates. You can also manually sync with dotnet skills sync.

Q: Can I use dotnet-skills without internet access?

A: Yes. Once installed, the full catalog is local. The CLI works offline for all operations except version checks and catalog syncs. Set DOTNET_SKILLS_SKIP_UPDATE_CHECK=1 to suppress update notices in air-gapped environments.

Q: What's the difference between skills, bundles, and agents?

A: Skills are individual knowledge units (e.g., blazor, ef-core). Bundles are curated compositions of related skills (e.g., quality, orleans). Agents are orchestration layers that route tasks to appropriate skills based on classification.

Q: How do I contribute a new skill for my favorite library?

A: Fork the repository, create a package under catalog/<Type>/<Package>/skills/<skill-name>/ with SKILL.md and manifest.json, and submit a PR. See CONTRIBUTING.md for detailed guidelines. External upstream sources can also be imported via external-sources/vendir.yml.

Q: Will installing too many skills hurt my AI's performance?

A: Potentially. More skills consume more context tokens and increase activation ambiguity. Use dotnet skills catalog tokens to audit token counts, recommend to install only relevant skills, and --prune to remove unused ones. The orchestration agents help route correctly even with many skills installed.

Q: Can I install different skills for different projects?

A: Absolutely. Use --scope project to install skills in your project directory rather than globally. Use dotnet skills list --local to see project-specific installations. This is essential for monorepos with diverse technology stacks.


Conclusion

The future of AI-assisted development isn't about bigger models or longer context windows—it's about structured, maintainable, domain-specific knowledge that prevents your agent from hallucinating its way through complex technology stacks.

dotnet-skills represents a fundamental evolution in how we equip AI agents for professional software development. By transforming scattered, outdated, and unverified .NET knowledge into a versioned, tested, and community-curated catalog, it solves the single most painful problem in AI coding: the gap between what your agent thinks it knows and what modern .NET actually requires.

Stop wasting hours correcting EF6 patterns in .NET 8 projects. Stop explaining minimal APIs to an AI that learned from 2019 blog posts. Stop accepting architectural guidance from a system that conflates Blazor Server with WebAssembly.

Install dotnet-skills. Point your AI at modern .NET. Start building.

The repository is open source, MIT-licensed, and actively seeking contributors. Whether you maintain a popular .NET library or simply want your daily AI interactions to stop feeling like technical support, there's a place for you in this ecosystem.

👉 Get started now at github.com/managedcode/dotnet-skills

Your AI agent is only as smart as the knowledge you feed it. Time to upgrade its diet.

Commentaires 0

Aucun commentaire pour l'instant. Soyez le premier à réagir !

Laisser un commentaire