agentleFS
zdanovichnickzdanovichnick/dotnet-pilot/skills/dotnet-project-init/SKILL.md

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.

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
  1. Very specific:

    Search for *.slnx (modern) or *.sln (legacy) in current directory

    line 14
  2. Very specific:

    If multiple solutions: stop and return [HALT: which solution — <list>?] so the invoking command asks the user.

    line 15
  3. Very specific:

    Central Package Management: when Directory.Packages.props exists with …

    line 38
  4. Distinctive:

    No strict layer separation

    line 68
  5. Very specific:

    Search for classes inheriting DbContext:

    line 75

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

.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 packages

Parse .csproj for:

  • <TargetFramework> → net8.0, net9.0, net10.0, etc. Multi-targeted projects use <TargetFrameworks> (plural, ;-separated) — record every entry, and pass -f <tfm> to dotnet ef / dotnet test when a command must target one
  • Properties can be inherited: check Directory.Build.props up the directory tree for TargetFramework, 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

IndicatorDetection
Test runnerxUnit v2 → xunit; xUnit v3 → xunit.v3; NUnit → NUnit; MSTest → MSTest.TestAdapter or <Project Sdk="MSTest.Sdk/…"> (no package reference at all); TUnit → TUnit
MockingMoq, NSubstitute, FakeItEasy in test project packages
AssertionsFluentAssertions, Shouldly in test project packages
ORMMicrosoft.EntityFrameworkCore → EF Core; Dapper → Dapper
ValidationFluentValidation or DataAnnotations (check for [Required] attributes)
CQRSMediatR package presence
MappingAutoMapper 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 : DbContext

For each context, identify:

  • Project location
  • Database provider (from Use* call or package: Npgsql, SqlServer, Sqlite)
  • Migrations assembly location

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.