dotnet

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

.NET Router Skill

.NET 路由技能

Trigger On

触发场景

  • the user asks for general
    .NET
    help without naming a narrower framework or tool
  • implementing, debugging, reviewing, or refactoring C# or
    .NET
    code in a repo with multiple app models or frameworks
  • deciding which
    .NET
    skill should own a task before editing code
  • tasks that combine platform work with testing, quality, architecture, setup, or migration decisions
  • 用户请求通用
    .NET
    帮助,但未指明更细分的框架或工具
  • 在包含多种应用模型或框架的代码仓库中实现、调试、评审或重构C#或
    .NET
    代码
  • 在编辑代码前确定应由哪个
    .NET
    技能处理对应任务
  • 涉及平台开发与测试、质量、架构、搭建或迁移决策相结合的任务

Workflow

工作流程

  1. Detect the real stack first:
    • target frameworks and SDK version
    • LangVersion
    • project SDKs and workload hints
    • hosting model and app entry points
    • test framework and runner
    • analyzers, formatters, coverage, and CI quality gates
  2. Route to the narrowest platform skill as soon as the stack is known:
    • Web:
      dotnet-aspnet-core
      ,
      dotnet-minimal-apis
      ,
      dotnet-web-api
      ,
      dotnet-blazor
      ,
      dotnet-signalr
      ,
      dotnet-grpc
    • Cloud and hosting:
      dotnet-aspire
      ,
      dotnet-azure-functions
      ,
      dotnet-worker-services
    • Desktop and client:
      dotnet-maui
      ,
      dotnet-wpf
      ,
      dotnet-winforms
      ,
      dotnet-winui
    • Data and distributed:
      dotnet-entity-framework-core
      ,
      dotnet-entity-framework6
      ,
      dotnet-orleans
    • AI and agentic:
      dotnet-semantic-kernel
      ,
      dotnet-microsoft-extensions-ai
      ,
      dotnet-microsoft-agent-framework
      ,
      dotnet-mlnet
      ,
      dotnet-mixed-reality
    • Legacy:
      dotnet-legacy-aspnet
      ,
      dotnet-wcf
      ,
      dotnet-workflow-foundation
  3. Route cross-cutting work to the companion skill instead of keeping it inside generic
    .NET
    advice:
    • project bootstrap or repo shape:
      dotnet-project-setup
      ,
      dotnet-architecture
    • frontend asset analysis in mixed
      .NET
      plus Node repos:
      dotnet-eslint
      ,
      dotnet-stylelint
      ,
      dotnet-htmlhint
      ,
      dotnet-webhint
      ,
      dotnet-biome
      ,
      dotnet-sonarjs
      ,
      dotnet-metalint
      ,
      dotnet-chous
    • code review:
      dotnet-code-review
    • language features:
      dotnet-modern-csharp
    • testing:
      dotnet-tunit
      ,
      dotnet-xunit
      ,
      dotnet-mstest
    • format, analyzers, coverage, and CI:
      dotnet-format
      ,
      dotnet-code-analysis
      ,
      dotnet-quality-ci
      ,
      dotnet-coverlet
      ,
      dotnet-reportgenerator
    • maintainability and architecture rules:
      dotnet-complexity
      ,
      dotnet-netarchtest
      ,
      dotnet-archunitnet
  4. If more than one specialized skill applies, prefer the one closest to the user-visible behavior first, then pull in the quality or tooling skill second.
  5. Do not stop at this skill once a narrower match exists. This skill should classify and hand off, not become a generic dumping ground.
  6. After code changes, validate with the repository's actual build, test, and quality workflow instead of generic
    .NET
    commands.
  1. 首先检测真实技术栈:
    • 目标框架和SDK版本
    • LangVersion
    • 项目SDK和工作负载提示
    • 托管模型和应用入口点
    • 测试框架和运行器
    • 分析器、格式化工具、覆盖率工具和CI质量门禁
  2. 一旦确定技术栈,立即路由到最细分的平台技能:
    • 网页端:
      dotnet-aspnet-core
      ,
      dotnet-minimal-apis
      ,
      dotnet-web-api
      ,
      dotnet-blazor
      ,
      dotnet-signalr
      ,
      dotnet-grpc
    • 云与托管:
      dotnet-aspire
      ,
      dotnet-azure-functions
      ,
      dotnet-worker-services
    • 桌面与客户端:
      dotnet-maui
      ,
      dotnet-wpf
      ,
      dotnet-winforms
      ,
      dotnet-winui
    • 数据与分布式:
      dotnet-entity-framework-core
      ,
      dotnet-entity-framework6
      ,
      dotnet-orleans
    • AI与智能体:
      dotnet-semantic-kernel
      ,
      dotnet-microsoft-extensions-ai
      ,
      dotnet-microsoft-agent-framework
      ,
      dotnet-mlnet
      ,
      dotnet-mixed-reality
    • 遗留系统:
      dotnet-legacy-aspnet
      ,
      dotnet-wcf
      ,
      dotnet-workflow-foundation
  3. 将横切工作路由到配套技能,而非提供通用
    .NET
    建议:
    • 项目启动或仓库架构:
      dotnet-project-setup
      ,
      dotnet-architecture
    • .NET与Node混合仓库中的前端资产分析:
      dotnet-eslint
      ,
      dotnet-stylelint
      ,
      dotnet-htmlhint
      ,
      dotnet-webhint
      ,
      dotnet-biome
      ,
      dotnet-sonarjs
      ,
      dotnet-metalint
      ,
      dotnet-chous
    • 代码评审:
      dotnet-code-review
    • 语言特性:
      dotnet-modern-csharp
    • 测试:
      dotnet-tunit
      ,
      dotnet-xunit
      ,
      dotnet-mstest
    • 格式化、分析器、覆盖率和CI:
      dotnet-format
      ,
      dotnet-code-analysis
      ,
      dotnet-quality-ci
      ,
      dotnet-coverlet
      ,
      dotnet-reportgenerator
    • 可维护性和架构规则:
      dotnet-complexity
      ,
      dotnet-netarchtest
      ,
      dotnet-archunitnet
  4. 如果有多个专业技能适用,优先选择最贴近用户可见行为的技能,其次引入质量或工具类技能
  5. 一旦存在更匹配的细分技能,不要停留在当前技能层面。本技能仅用于分类和转交任务,不能作为通用内容的收纳处
  6. 代码变更后,使用代码仓库实际的构建、测试和质量工作流进行验证,而非使用通用
    .NET
    命令

Routing Heuristics

路由规则

  • If the repo contains
    Microsoft.NET.Sdk.Web
    , start from a web skill, not generic
    .NET
    .
  • If the repo contains Blazor, Razor Components, or
    .razor
    pages, prefer
    dotnet-blazor
    .
  • If the repo contains
    package.json
    , frontend lint configs, or browser-facing asset pipelines inside the
    .NET
    solution, prefer the dedicated frontend analysis skills instead of generic
    .NET
    .
  • If the repo contains Orleans grains or silo hosting, prefer
    dotnet-orleans
    .
  • If the repo is mostly analyzers, CI, or coverage work, prefer the quality skill directly.
  • If the user asks about “which skill should I use?”, answer with the narrowest matching skill and explain why in one short sentence.
  • If no narrower skill matches, keep the work here and stay explicit about the missing specialization.
  • 如果仓库包含
    Microsoft.NET.Sdk.Web
    ,从网页端技能开始处理,而非通用
    .NET
  • 如果仓库包含Blazor、Razor组件或
    .razor
    页面,优先选择
    dotnet-blazor
  • 如果.NET解决方案中包含
    package.json
    、前端lint配置或面向浏览器的资产流水线,优先选择专用的前端分析技能,而非通用
    .NET
  • 如果仓库包含Orleans grains或silo托管,优先选择
    dotnet-orleans
  • 如果仓库主要涉及分析器、CI或覆盖率相关工作,直接优先选择质量类技能
  • 如果用户询问“我应该使用哪个技能?”,给出最匹配的细分技能,并用一句话解释原因
  • 如果没有匹配的细分技能,将任务保留在当前技能下,并明确说明缺少对应的细分技能

Deliver

交付内容

  • the correct specialized skill choice for the task
  • repo-compatible code or documentation changes that stay aligned with the detected stack
  • validation evidence that matches the real project runner and quality toolchain
  • 适用于任务的正确专业技能选择
  • 与检测到的技术栈一致、兼容仓库的代码或文档变更
  • 与实际项目运行器和质量工具链匹配的验证证据

Validate

验证项

  • the chosen downstream skill actually exists in the catalog
  • platform assumptions match project SDKs, packages, and workloads
  • generic guidance has been replaced by framework-specific guidance whenever possible
  • runner-specific commands are not mixed incorrectly
  • language or runtime features are only used when the repo supports them
  • 选择的下游技能确实存在于技能目录中
  • 平台假设与项目SDK、包和工作负载匹配
  • 尽可能用框架特定指南替换通用指南
  • 不会错误混用特定运行器的命令
  • 仅在仓库支持时使用对应语言或运行时特性

Documentation

文档

References

参考资料

  • references/routing.md
    - Decision tree for routing tasks to specialized .NET skills, including app model classification and cross-cutting concern handling.
  • references/detection.md
    - Project detection patterns for identifying SDK types, target frameworks, workloads, language versions, and app models.
  • references/routing.md
    - 将任务路由到专业.NET技能的决策树,包括应用模型分类和横切关注点处理
  • references/detection.md
    - 用于识别SDK类型、目标框架、工作负载、语言版本和应用模型的项目检测模式