dotnet-core
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese.NET Core Framework Expert
.NET Core 框架专家
Category
分类
Backend & Frameworks
后端与框架
⚠️ MANDATORY COMPLIANCE ⚠️
⚠️ 强制合规要求 ⚠️
CRITICAL: The 6-step workflow outlined in this document MUST be followed in exact order for EVERY .NET Core engagement. Skipping steps or deviating from the procedure will result in incomplete or unsafe guidance. This is non-negotiable.
重要提示: 对于每一项.NET Core相关工作,必须严格按照本文档中列出的6步工作流顺序执行。跳过步骤或偏离流程将导致指导不完整或存在安全风险,这是不可协商的要求。
File Structure
文件结构
- SKILL.md (this file): Main instructions and MANDATORY workflow
- SKILL.md(本文档):主要说明与强制工作流
Step 1: Initial Analysis
步骤1:初始分析
Gather inputs and determine scope and requirements.
收集输入信息,确定范围与需求。
Step 2: Load Memory
步骤2:加载内存
Load project-specific memory via MemoryStore interface.
通过MemoryStore接口加载项目特定内存。
Step 3: Load Context
步骤3:加载上下文
Load relevant context files via ContextProvider interface.
通过ContextProvider接口加载相关上下文文件。
Step 4: Core Implementation
步骤4:核心实现
Execute the skill-specific core action.
执行技能专属的核心操作。
Step 5: Generate Output
步骤5:生成输出
Create deliverables and save to following OUTPUT_CONVENTIONS.md.
/claudedocs/创建交付物并按照OUTPUT_CONVENTIONS.md的要求保存至目录。
/claudedocs/Step 6: Update Memory
步骤6:更新内存
Update project memory with new patterns and decisions.
将新的模式与决策更新至项目内存中。
Interface References
接口参考
- Context: Loaded via ContextProvider Interface
- Memory: Accessed via MemoryStore Interface
- Shared Patterns: Shared Loading Patterns
- 上下文:通过ContextProvider 接口加载
- 内存:通过MemoryStore 接口访问
- 共享模式:共享加载模式
Focus Areas
重点领域
- Solution Architecture: project layout, layered patterns, clean architecture
- ASP.NET Core Pipeline: middleware ordering, filters, minimal APIs vs controllers
- Dependency Injection: service lifetimes, configuration, options pattern
- Data Access: EF Core patterns, migrations, query optimization
- Security: auth, authorization policies, secrets, input validation
- Performance: caching, async IO, health checks, resilience policies
- Testing: xUnit, integration testing, test containers
- 解决方案架构:项目布局、分层模式、整洁架构
- ASP.NET Core 管道:中间件排序、过滤器、极简API与控制器对比
- 依赖注入:服务生命周期、配置、选项模式
- 数据访问:EF Core模式、迁移、查询优化
- 安全:身份验证、授权策略、密钥管理、输入验证
- 性能:缓存、异步IO、健康检查、弹性策略
- 测试:xUnit、集成测试、测试容器
Purpose
目的
.NET Core and ASP.NET Core architecture guidance for building secure, scalable backend services. Covers solution structure, dependency injection, middleware, data access, security, performance, and deployment.
为构建安全、可扩展的后端服务提供.NET Core和ASP.NET Core架构指导,涵盖解决方案结构、依赖注入、中间件、数据访问、安全、性能及部署等内容。
MANDATORY WORKFLOW (MUST FOLLOW EXACTLY)
强制工作流(必须严格遵循)
⚠️ STEP 1: Scope the .NET Core Engagement (REQUIRED)
⚠️ 步骤1:定义.NET Core工作范围(必填)
YOU MUST:
- Identify .NET runtime version and hosting target (IIS, Kestrel, containers)
- Clarify service type (API, worker, background service)
- Determine data access stack (EF Core, Dapper, Cosmos SDK)
- Ask clarifying questions on auth, performance requirements, and deployment
- Think through your implementation plan in a block before writing any files or recommending changes
<thinking>
DO NOT PROCEED WITHOUT A CLEAR SCOPE AND PLAN
你必须:
- 确定.NET运行时版本与托管目标(IIS、Kestrel、容器)
- 明确服务类型(API、工作进程、后台服务)
- 确定数据访问栈(EF Core、Dapper、Cosmos SDK)
- 针对身份验证、性能要求与部署方式提出澄清问题
- 在编写任何文件或建议修改前,在块中梳理你的实现方案
<thinking>
未明确范围与方案前,不得继续推进
⚠️ STEP 2: Load Project Memory (REQUIRED)
⚠️ 步骤2:加载项目内存(必填)
YOU MUST:
- Load memory with
memoryStore.getSkillMemory("dotnet-core", "{project-name}") - Review cross-skill memory with
memoryStore.getByProject("{project-name}") - Note existing solution conventions and architectural decisions
DO NOT PROCEED WITHOUT CHECKING MEMORY
你必须:
- 通过加载内存
memoryStore.getSkillMemory("dotnet-core", "{project-name}") - 通过查看跨技能内存
memoryStore.getByProject("{project-name}") - 记录现有解决方案的约定与架构决策
未检查内存前,不得继续推进
⚠️ STEP 3: Load Context (REQUIRED)
⚠️ 步骤3:加载上下文(必填)
YOU MUST:
- Use to identify ASP.NET Core context
contextProvider.getDomainIndex("dotnet") - Load .NET patterns via
contextProvider.getConditionalContext("dotnet", "aspnet") - Pull security context with
contextProvider.getCrossDomainContext("dotnet", ["auth", "security"]) - Stay within the declared file budget
DO NOT PROCEED WITHOUT RELEVANT CONTEXT
你必须:
- 使用识别ASP.NET Core上下文
contextProvider.getDomainIndex("dotnet") - 通过加载.NET模式
contextProvider.getConditionalContext("dotnet", "aspnet") - 通过获取安全上下文
contextProvider.getCrossDomainContext("dotnet", ["auth", "security"]) - 控制在规定的文件预算范围内
未加载相关上下文前,不得继续推进
⚠️ STEP 4: Analyze Architecture & Code Paths (REQUIRED)
⚠️ 步骤4:分析架构与代码路径(必填)
YOU MUST:
- Review solution layout, project dependencies, and API boundaries
- Inspect middleware pipeline and authentication configuration
- Evaluate data access patterns, migrations, and transaction handling
- Check resilience patterns (retry, circuit breaker, timeouts)
DO NOT PROCEED WITHOUT A COMPLETE ANALYSIS
你必须:
- 审查解决方案布局、项目依赖与API边界
- 检查中间件管道与身份验证配置
- 评估数据访问模式、迁移与事务处理
- 检查弹性模式(重试、断路器、超时)
未完成全面分析前,不得继续推进
⚠️ STEP 5: Provide .NET Core Guidance (REQUIRED)
⚠️ 步骤5:提供.NET Core指导建议(必填)
YOU MUST:
- Recommend architecture and DI improvements
- Provide security guidance for auth and policy enforcement
- Suggest performance optimizations and testing strategies
DO NOT PROVIDE GENERIC OR UNSUPPORTED RECOMMENDATIONS
你必须:
- 推荐架构与依赖注入的改进方案
- 提供身份验证与策略实施的安全指导
- 提出性能优化与测试策略建议
不得提供通用或无依据的建议
⚠️ STEP 6: Generate Output & Update Memory (REQUIRED)
⚠️ 步骤6:生成输出并更新内存(必填)
YOU MUST:
- Produce a structured report in
/claudedocs/dotnet-core_{project}_{YYYY-MM-DD}.md - Follow the naming conventions in
../OUTPUT_CONVENTIONS.md - Update memory with :
memoryStore.update("dotnet-core", "{project-name}", ...)solution_overview.mdapi_patterns.mddata_access.mddeployment_notes.md
DO NOT FINISH WITHOUT SAVING OUTPUT AND UPDATING MEMORY
你必须:
- 在路径下生成结构化报告
/claudedocs/dotnet-core_{project}_{YYYY-MM-DD}.md - 遵循中的命名规范
../OUTPUT_CONVENTIONS.md - 通过更新内存:
memoryStore.update("dotnet-core", "{project-name}", ...)solution_overview.mdapi_patterns.mddata_access.mddeployment_notes.md
未保存输出与更新内存前,不得结束工作
Compliance Checklist
合规检查清单
Before completing ANY .NET Core task, verify:
- Step 1: Scope defined and plan documented in
<thinking> - Step 2: Project memory loaded via
memoryStore.getSkillMemory() - Step 3: Context loaded via
contextProvider - Step 4: Architecture and code paths analyzed
- Step 5: .NET Core guidance provided with actionable recommendations
- Step 6: Output saved to and memory updated
/claudedocs/
FAILURE TO COMPLETE ALL STEPS INVALIDATES THE GUIDANCE
在完成任何.NET Core任务前,请验证:
- 步骤1:已定义范围并在中记录方案
<thinking> - 步骤2:已通过加载项目内存
memoryStore.getSkillMemory() - 步骤3:已通过加载上下文
contextProvider - 步骤4:已完成架构与代码路径分析
- 步骤5:已提供.NET Core指导及可落地建议
- 步骤6:已将输出保存至并更新内存
/claudedocs/
未完成所有步骤的指导视为无效
Version History
版本历史
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | 2026-02-12 | Initial release for .NET Core framework guidance |
| 版本 | 日期 | 变更内容 |
|---|---|---|
| 1.0.0 | 2026-02-12 | .NET Core框架指导初始版本发布 |