一键导入
dotnet-project-init
Discovers .NET solution context — projects, frameworks, test runners, EF contexts, architecture style, and package management.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Discovers .NET solution context — projects, frameworks, test runners, EF contexts, architecture style, and package management.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
JWT bearer auth, ASP.NET Identity, OIDC, and policy-based authorization patterns for ASP.NET Core APIs.
HybridCache (.NET 9+), output caching, cache-aside pattern, and IMemoryCache — registration, usage, invalidation, and key strategy.
Protocol for detecting and replicating existing project conventions before generating new code — naming, folder structure, DI registration, test framework, DTOs, and error handling.
Domain-Driven Design patterns for .NET — aggregates, value objects, strongly-typed IDs, domain events, repositories, and layer rules.
Result pattern, ProblemDetails (RFC 7807), global exception boundaries, and typed error records for .NET APIs.
Serilog structured logging for ASP.NET Core — setup, message templates, LogContext enrichment, request logging middleware, and log level guidelines.
| name | dotnet-project-init |
| description | Discovers .NET solution context — projects, frameworks, test runners, EF contexts, architecture style, and package management. |
This skill discovers everything about a .NET solution needed for DotnetPilot to operate effectively.
*.slnx (modern) or *.sln (legacy) in current directoryFor each project in the solution:
dotnet list <project.csproj> reference # project references
dotnet list <project.csproj> package # NuGet packages
Parse .csproj for:
<TargetFramework> → net8.0, net9.0, net10.0, etc.<OutputType> → Exe, Library<Sdk> → Microsoft.NET.Sdk.Web (web), Microsoft.NET.Sdk (classlib)<IsPackable> → library intended for NuGet distribution<RootNamespace> → namespace convention| Indicator | Detection |
|---|---|
| Test runner | xunit → xunit package; NUnit → NUnit package; MSTest → MSTest.TestAdapter |
| Mocking | Moq, NSubstitute, FakeItEasy in test project packages |
| Assertions | FluentAssertions, Shouldly in test project packages |
| ORM | Microsoft.EntityFrameworkCore → EF Core; Dapper → Dapper |
| Validation | FluentValidation or DataAnnotations (check for [Required] attributes) |
| CQRS | MediatR package presence |
| Mapping | AutoMapper or Mapster package presence |
| API style | [ApiController] attribute → controllers; MapGet/MapPost → minimal API |
Analyze project reference graph:
Clean Architecture:
Vertical Slices:
Flat:
Search for classes inheriting DbContext:
class *DbContext : DbContext
class *Context : DbContext
For each context, identify:
Use* call or package: Npgsql, SqlServer, Sqlite)