GravionLabs/elysion / .agents/skills/dotnet-create-solution
dotnet-create-solution
VerifiedScaffold a .NET solution with src/test layout, Central Package Management, Directory.Build.props and .editorconfig for libraries or apps. Use when starting a .NET solution.
Scaffold a new .NET solution with the standard project structure. Paths to scripts/ and templates/ are relative to this skill's directory.
Stack
dotnetSDK,.slnxsolution format, NuGet via Central Package Management (Directory.Packages.props)pwshfor the scaffold script
Steps
-
Ask first: solution name; Library (NuGet package, multi-target
net10.0;net9.0;net8.0) or Application (singlenet10.0); project template (classlib / webapi / worker / console / grpc); additional NuGet packages -
Run the scaffold script:
pwsh scripts/New-Solution.ps1 -SolutionName <Name> -ProjectType <template> -OutputType <library|app> [-UpdatePackages]It creates the directory structure and
.slnx, generates source and test projects, strips redundant properties from the.csprojfiles, copies all templates (including the matching CI workflow), optionally updatesDirectory.Packages.propsto the latest versions, and runsdotnet build. -
Add any additional packages to
Directory.Packages.propsand reference them withoutVersionin the.csproj -
Run
dotnet buildto verify
Parameters: -SolutionName (required), -ProjectType (classlib/console/webapi/worker/grpc), -OutputType (library/app), -UpdatePackages (switch), -OutputDirectory
Templates
| File | Purpose |
|---|---|
Directory.Build.props | Shared MSBuild: LangVersion=Latest, GenerateDocumentationFile, NoWarn; multi-target for libraries, single <TargetFramework> for apps |
Directory.Packages.props | CPM stub with the NUnit, NUnit.Analyzers, NSubstitute, Shouldly and coverlet test packages plus Microsoft.SourceLink.GitHub |
src/Directory.Build.props | Imports root props, sets OutputPath |
test/Directory.Build.props | Imports root, IsPackable=false, test PackageReferences without versions, global Using NUnit.Framework |
.editorconfig | From project-setup (templates/dotnet.editorconfig; its warning when not installed): C# style: file-scoped namespaces, primary constructors, _camelCase fields, analyzer severities |
.github/workflows/ci-library.yml | NuGet library CI via the GravionLabs/ci reusable workflow (build, test, pack, publish) |
.github/workflows/ci-app.yml | Application CI: dotnet build + dotnet test with test results reporter |
Constraints
.slnxformat only; avoid legacy.sln- All package versions live in
Directory.Packages.props, never in individual.csprojfiles - Generated
.csprojfiles must not repeat properties already inDirectory.Build.props - Libraries multi-target; applications use a single target framework
- The solution must build cleanly before the task is complete
- Workflows reference
GravionLabs/ciat the major tag@v<major>(today@v1), never@mainor a commit SHA; third-party actions stay SHA-pinned where the repository requires it
Report: summary, files created, verify command (dotnet build).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |