dotnet-project-scaffold
Skill0 starsChanged 3 months agoMITView on GitHub
Interview the user about a new .NET project, propose a solution/project/folder layout with rationale, and create it with the dotnet CLI once approved. Use this whenever someone is starting a .NET project from scratch or from an empty directory — including phrasings like "zaczynam nowy projekt w .NET", "jak rozłożyć ten projekt", "zaproponuj strukturę", "jakie projekty w solucji", "scaffold this", "set up the solution", or when they paste a task/exercise brief and need somewhere to put the code. Also use it when someone is on a timed technical task or take-home exercise in C# and needs the skeleton standing fast. Trigger even if they don't say the word "structure" — an empty repo plus a described .NET task is enough.
In this repository3 other files it gives its agents.
- dotnet-api-templateSkill
- grillingSkill
- quiz-meSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Run this first, every time.
- Very specific: line 25
Check that Microsoft.AspNetCore.App appears in --list-runtimes before proposing a web project.
- Distinctive: line 29
Ask these together in one pass, not one at a time.
- Distinctive: line 33
Does it need to persist anything?: If yes: real database, SQLite, or in-memory is fine?
- Distinctive: line 57
Keep the proposal short. Something like:
- Very specific: line 74
Run the commands from references/layouts.md.
- Distinctive: line 78
Verify it builds and the empty test project runs: before writing real code. A scaffold that doesn't build is worse than no scaffold.
- Very specific: line 80
Read references/conventions.md for what goes in which folder, the Program.cs ordering traps, and gotchas that are painful to discover …
- Distinctive: line 84
Don't disappear into building the whole thing.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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 scaffold
The first twenty minutes of a timed task are the cheapest to lose and the easiest to get back. This skill spends five of them deliberately — asking a few questions, proposing a layout the user can push back on, then creating it — so the remaining time goes into the code that gets graded.
The layout is not decoration. A reviewer opening the repo reads the project list before reading a single line of C#, and a good layout answers three questions before they ask: what is the pure logic here, what is the host, and what proves it works.
Step 0 — Check the toolchain before anything else
Run this first, every time. A broken or shadowed SDK install costs more time than any layout decision, and it fails in confusing ways later.
dotnet --version && dotnet --list-sdksIf dotnet --version reports "No .NET SDKs were found" while dotnet --list-runtimes shows runtimes, there are two installs and the runtime-only one is winning on PATH. Look in ~/.dotnet/, /usr/local/share/dotnet/, and C:\Program Files\dotnet\. Use the full path to the complete install for every command in this session and tell the user which one you picked and why — do not silently work around it.
Two details worth knowing before you generate anything:
- On .NET 10,
dotnet new slnproduces.slnx(XML), not.sln. Don't "fix" this. - Check that
Microsoft.AspNetCore.Appappears in--list-runtimesbefore proposing a web project. A runtime-only install often lacks it and the API will build but not start.
Step 1 — Interview
Ask these together in one pass, not one at a time. The user is on a clock; a five-question interrogation with round trips defeats the purpose. If the conversation already answers a question, don't ask it — state the assumption instead and move on.
- What is the task, in one sentence? (Everything else follows from this.)
- How long do you have? Under three hours changes the answer materially — see the sizing rule below.
- Does it need to persist anything? If yes: real database, SQLite, or in-memory is fine?
- Is there a network or protocol layer — a socket, a binary format, a device, a file format to parse? This is the single biggest fork in the layout.
- Do you need something to feed it? A simulator, a fixture generator, a seed script.
If the user hands you a task brief, read it and answer as many of these yourself as you can, then confirm your reading rather than asking from scratch. Getting the brief and replying with five questions they already answered reads as not having read it.
Step 2 — Size the solution honestly
More projects is not better. Each one costs a reference to wire, a build to wait for, and a place for a reviewer to get lost. The rule that holds up:
A separate project needs a reason that is not "separation of concerns." Good reasons: it must run standalone (a simulator, a CLI), it must be testable without the host (pure parsing or domain logic), it ships separately. Everything else is a folder.
| Time budget | Sensible ceiling |
| Under 2 hours | 2 projects: host + tests |
| 2–4 hours | 3–4 projects: pure library + host + tests, plus a simulator if the task feeds itself |
| Over a day | Split further only when a real boundary appears |
The one split that nearly always pays for itself when there's a protocol or non-trivial domain logic: a class library with no dependencies at all. Not on ASP.NET, not on EF Core, not on the socket. That library is where the hard logic lives, and being able to test it with a byte array and no host standing is what makes the tests fast and the reviewer relax.
Step 3 — Propose, don't impose
Show the layout as a tree with a one-line reason per project, then ask for a yes. Read references/layouts.md for four worked variants and their exact command sequences — pick the closest and adapt rather than inventing from nothing.
Keep the proposal short. Something like:
FleetEye.slnx
├── src/
│ ├── FleetEye.Protocol/ ← parsing, zero dependencies, testable standalone
│ ├── FleetEye.Api/ ← host: HTTP + background ingest + persistence
│ └── FleetEye.Simulator/ ← feeds the host, runs on its own
└── tests/
├── FleetEye.Protocol.Tests/
└── FleetEye.Api.Tests/State what you're not creating and why ("no separate Domain project — at this size it's a folder"). Naming an omission deliberately is what distinguishes a decision from an oversight, and it gives the user something concrete to overrule.
Step 4 — Create it
Run the commands from references/layouts.md. Then, before handing back:
- Pin the SDK with a
global.jsonwhen the machine has more than one — it prevents a different SDK being picked later. - Write the README now, not at the end. Three headings: what this is, how to run it, assumptions and open questions. On a timed task the assumptions section is worth more than an extra feature, because it converts every gap into a visible decision instead of an apparent omission. Fill it in as you go.
- Verify it builds and the empty test project runs before writing real code. A scaffold that doesn't build is worse than no scaffold.
Read references/conventions.md for what goes in which folder, the Program.cs ordering traps, and gotchas that are painful to discover mid-task.
Working with the user afterwards
Don't disappear into building the whole thing. Once the skeleton stands, hand it back and let the user choose what to write first — they know which part they're weakest on, and that's usually where the time should go.
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.

