dotnet-project-init
Skill5 starsChanged 6 days agoMITView on GitHub
Discovers .NET solution context — projects, frameworks, test runners, EF contexts, architecture style, and package management.
In this repository15 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- aspnet-api-patternsSkill
- authenticationSkill
- cachingSkill
- clean-architectureSkill
- convention-learnerSkill
- dddSkill
- ef-core-patternsSkill
- error-handlingSkill
- loggingSkill
- modern-csharpSkill
- opentelemetrySkill
- resilienceSkill
- testing-dotnetSkill
- vertical-sliceSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Search for *.slnx (modern) or *.sln (legacy) in current directory
- Very specific: line 15
If multiple solutions: stop and return [HALT: which solution — <list>?] so the invoking command asks the user.
- Very specific: line 38
Central Package Management: when Directory.Packages.props exists with …
- Distinctive: line 68
No strict layer separation
- Very specific: line 75
Search for classes inheriting DbContext:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
.NET Project Initialization Skill
This skill discovers everything about a .NET solution needed for DotnetPilot to operate effectively.
Discovery Protocol
1. Solution File
- Search for
*.slnx(modern) or*.sln(legacy) in current directory - If multiple solutions: stop and return
[HALT: which solution — <list>?]so the invoking command asks the user; don't pick one - Parse project references from solution file
2. Per-Project Analysis
For each project in the solution:
dotnet list <project.csproj> reference # project references
dotnet list <project.csproj> package # NuGet packagesParse .csproj for:
<TargetFramework>→ net8.0, net9.0, net10.0, etc. Multi-targeted projects use<TargetFrameworks>(plural,;-separated) — record every entry, and pass-f <tfm>todotnet ef/dotnet testwhen a command must target one- Properties can be inherited: check
Directory.Build.propsup the directory tree forTargetFramework,Nullable,LangVersion, and so on <OutputType>→ Exe, Library<Sdk>→ Microsoft.NET.Sdk.Web (web), Microsoft.NET.Sdk (classlib)<IsPackable>→ library intended for NuGet distribution<RootNamespace>→ namespace convention
Central Package Management: when Directory.Packages.props exists with
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>, <PackageReference> items
carry no Version. Versions live in <PackageVersion> items in that file, and new packages must be
added there, not in the .csproj. dotnet list package still reports the resolved versions.
3. Framework Detection
| Indicator | Detection |
| Test runner | xUnit v2 → xunit; xUnit v3 → xunit.v3; NUnit → NUnit; MSTest → MSTest.TestAdapter or <Project Sdk="MSTest.Sdk/…"> (no package reference at all); TUnit → TUnit |
| 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 |
4. Architecture Style Detection
Analyze project reference graph:
Clean Architecture:
- Domain has 0 project references
- Application references only Domain
- Infrastructure references Domain + Application
- Api references Application + Infrastructure
Vertical Slices:
- Feature folders within a single project
- No strict layer separation
Flat:
- Single project or 2 projects (app + tests)
5. EF Core Context Discovery
Search for classes inheriting DbContext:
class *DbContext : DbContext
class *Context : DbContextFor each context, identify:
- Project location
- Database provider (from
Use*call or package:Npgsql,SqlServer,Sqlite) - Migrations assembly location
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

