project-structure · wshaddix — Claude Code skill: .NET solution layout
A skill that hands your coding agent a fixed layout for .NET solutions: where projects live, how shared build settings and package versions are wired.
npx skills add wshaddix/dotnet-skills --skill project-structure -a claude-codeWhat project-structure does
The skill spells out how a .NET repo should be arranged. Source code goes under src/, tests under tests/, one project per concern such as Core, Infrastructure and API, the solution file sits at the root, and shared build configuration lives there too. Your agent follows those rules instead of inventing its own.
A chunk of it covers solution file formats. The .slnx format is XML, so it reads cleanly and produces far fewer merge conflicts, but it needs .NET 9+ SDK or Visual Studio 17.13+. You can move an existing .sln over with dotnet sln MySolution.sln migrate. Keeping both files around in one repo is asking for trouble.
The rest is shared configuration: Directory.Build.props for language settings and SourceLink, Directory.Build.targets for analyzers, and Directory.Packages.props for central package management. Nested Directory.Build.props files do not pull in the outer one on their own, so you import it by hand. If package versions are already scattered across your .csproj files, expect to move to central management in steps.
What it helps with
- lay out a fresh .NET repo with
src/andtests/ - migrate a solution from
.slnto.slnx - move shared build settings into
Directory.Build.props - collect NuGet versions in
Directory.Packages.props - wire up SourceLink for debugging and symbols
Example prompts for the agent
- Set up this .NET repo using the layout from the skill:
src/,tests/, solution file at the root - Configure central package management with
Directory.Packages.props - Migrate the solution to
.slnxand make sure the old.slnfile is gone
How to install project-structure
1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill project-structure -a claude-code2Manually: put the files in place
~/.claude/skills/project-structure/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/project-structure/
1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill project-structure -a codex2Manually: put the files in place
.agents/skills/project-structure/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill project-structure -a cursor2Manually: put the files in place
.cursor/skills/project-structure/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install wshaddix/dotnet-skills project-structure2Manually: put the files in place
.github/skills/project-structure/SKILL.md1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill project-structure -a gemini-cli2Platform CLI
gemini skills install https://github.com/wshaddix/dotnet-skills --path skills/project-structureManually: put the files in place
.devin/skills/project-structure/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill project-structure -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about project-structure
How do I install project-structure in Claude Code?
Run npx skills add wshaddix/dotnet-skills --skill project-structure -a claude-code. The skill lands in ~/.claude/skills/project-structure/SKILL.md.
What does project-structure do?
It gives the agent rules for organizing a .NET solution: folder layout, project references, shared build properties, central package versions and SourceLink.
Which .NET versions support the .slnx format?
.slnx needs .NET 9+ SDK or Visual Studio 17.13+. On .NET 10 dotnet new sln creates it by default; on .NET 9 you pass --format slnx.
Similar skills
All skills for Backend and APIs →project-structure by other authors comes first.