scaffold
Skill750 starsChanged 4 months agoMITView on GitHub
Architecture-aware feature scaffolding for .NET 10 projects. Detects the project's architecture (VSA, Clean Architecture, DDD, Modular Monolith) and generates complete feature slices with all required layers: endpoint, handler, validator, DTOs, EF configuration, and integration tests — with the completeness checklist and per-architecture code templates every generated feature must satisfy. Use when: "scaffold", "create feature", "add feature", "new endpoint", "generate", "add entity", "scaffold a module", "add module", or when customizing generation templates or defining what a complete feature slice includes.
29 other projects use a version of this.
Adopted by
Most recently taken up by
- batirko/research-and-learntheir own version, first seen Oct 5, 2026
- danmaps/gis-agent-skillstheir own version, first seen Oct 2, 2026
- microsoft/GitHub-Copilot-for-Azuretheir own version, first seen Oct 1, 2026
- coroboros/agent-skillstheir own version, first seen Sep 26, 2026
- microsoft/azure-skillstheir own version, first seen Sep 23, 2026
- wangqiqi/cursor-aitheir own version, first seen Sep 23, 2026
Used with
Projects with it also use git, refactor and 7 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
nicolasestremSkillgit
Git operations with intelligent commit messages and branch management
Also in 4 projects that use this
GitHubSkillrefactor
Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.
Also in 6 projects that use this
nicepkgSkillteam
根据任务快速组建临时 AI Agent 团队协作。自动从 .claude/agents/ 中选择最合适的成员组队。
Also in 3 projects that use this
Microsoft AzureSkilldesign
Design rules and conventions for the API Center Portal. Use when editing detail pages, card components, badges, layout, navigation, sidebars, or headers. Covers badge styling, metadata placement, page navigation patterns, and layout alignment.
Also in 6 projects that use this
an8079Skillautopilot
Also in 3 projects that use this
AnthropicSkilldebug
Structured debugging session — reproduce, isolate, diagnose, and fix. Trigger with an error message or stack trace, "this works in staging but not prod", "something broke after the deploy", or when behavior diverges from expected and the cause isn't obvious.
Also in 5 projects that use this
Other versions29 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 29
- microsoft/skills★ 3.1ksame name
- microsoft/azure-skills★ 1.5ksame name
- SethGammon/Citadel★ 922same name
- microsoft/GitHub-Copilot-for-Azure★ 253same name
- genkovich/sdd★ 170same name
- Rune-kit/rune★ 88same name
- simota/agent-skills★ 87same name
- BULDEE/ai-craftsman-superpowers★ 35same name
- danmaps/gis-agent-skills★ 29same name
- pcatattacks/solopreneur-plugin★ 15same name
19 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository52 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/rules/agents.mdAGENTS.md
- .codex/AGENTS.mdAGENTS.md
- .opencode/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/dotnet-rules.mdCursor rule
- api-versioningSkill
- arch-checkSkill
- architecture-advisorSkill
- aspireSkill
- authenticationSkill
- build-fixSkill
- cachingSkill
- checkpointSkill
- ci-cdSkill
- clean-architectureSkill
- code-reviewSkill
- configurationSkill
- container-publishSkill
- convention-learnerSkill
- dddSkill
- dependency-injectionSkill
- de-sloppifySkill
- dockerSkill
- dotnet-initSkill
- ef-coreSkill
- error-handlingSkill
- health-checkSkill
- httpclient-factorySkill
- instinct-systemSkill
- loggingSkill
- messagingSkill
- migrateSkill
- minimal-apiSkill
- modern-csharpSkill
- openapiSkill
- opentelemetrySkill
- outdatedSkill
- planSkill
- project-setupSkill
- project-structureSkill
- resilienceSkill
- scalarSkill
- security-scanSkill
- serilogSkill
- specSkill
- tddSkill
- testingSkill
- verifySkill
- vertical-sliceSkill
- workflow-masterySkill
- wrap-upSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 25 edited versions we read keep these.
3
Distinctive
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
- Very specific: line 46
Use the architecture-advisor skill to determine the project's architecture:
- Distinctive: line 48
If architecture is ambiguous, ask the user rather than guessing
- Very specific: line 60
Use the convention-learner skill and MCP tools to check:
- Very specific: line 64
Test project structure and naming (*Tests, *IntegrationTests)
- Distinctive: line 84
Every scaffolded feature MUST include ALL nine items.
- Distinctive: line 109
If the build or tests fail, fix and re-run before presenting results.
“Common” is measured: kept by at least 6 in 10 of the 25 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/scaffold — Architecture-Aware Feature Scaffolding
What
Generates a complete feature with all required files based on the project's architecture. Never generates half a feature — every scaffold includes the endpoint, handler, validation, DTOs, EF configuration, and at least one integration test as a single unit, written in modern C# 14 (primary constructors, collection expressions, records, sealed handlers, TypedResults).
Supported architectures (file placement maps and code shape templates live in
references/architecture-patterns.md):
- Vertical Slice Architecture (VSA) — single-file features in
Features/ - Clean Architecture (CA) — files split across Domain, Application, Infrastructure, Api
- DDD + Clean Architecture — aggregate roots, value objects, domain events, plus CA layers
- Modular Monolith — self-contained modules with their own DbContext and integration events
When
- "Scaffold a [feature name]", "create an endpoint for", "add a feature"
- "Generate CRUD for", "add entity", "new module", "scaffold a module"
- Starting a new feature after
/planhas produced an approved plan - Customizing generation templates or defining what a complete slice includes
- Any time the user wants a complete, working feature skeleton
How
Step 1: Detect Architecture
Use the architecture-advisor skill to determine the project's architecture:
- Examine folder structure, project references, and existing patterns
- If architecture is ambiguous, ask the user rather than guessing
- Load the matching architecture skill (vertical-slice, clean-architecture, ddd)
Step 2: Clarify Scope
Confirm with the user before generating (skip anything the plan already answers):
- Feature/entity name and operations needed — full CRUD or a subset?
- Key fields and invariants for any new entity
- Module placement (Modular Monolith only) — existing module or new one?
Step 3: Learn Conventions
Use the convention-learner skill and MCP tools to check:
- Naming patterns (
*Handler,*Service,*Endpoint,*Command,*Query) - Folder structure, file organization, access modifiers, sealed conventions
- Existing validation approach (FluentValidation, data annotations, manual)
- Test project structure and naming (
*Tests,*IntegrationTests)
Match what exists. Do not impose new conventions on an established codebase.
Step 4: Generate All Layers
Generate every file the architecture requires, following the templates in
references/architecture-patterns.md:
- VSA — read the VSA section: single-file feature + endpoint group + EF config + tests
- Clean Architecture — read the CA section: Mediator command/handler in Application, endpoint in Api
- DDD — read the DDD section: aggregate with invariants and domain events, thin handler
- Modular Monolith — read the Modular Monolith section: module DbContext, DI registration, integration events
The reference also covers the shared shapes every architecture reuses
(endpoint group, validator, entity + IEntityTypeConfiguration<T> pair,
test fixture) and the anti-patterns to avoid.
Step 5: Completeness Checklist (MANDATORY)
Every scaffolded feature MUST include ALL nine items. Do not skip any:
- Endpoint —
IEndpointGroupfile with a route group; never wired in Program.cs - Handler —
sealed, primary constructor, one per operation - Validator — FluentValidation rules with meaning (ranges, required, max lengths), wired via
.AddEndpointFilter<ValidationFilter<T>>()on mutating endpoints - DTOs — records shaped for the consumer, never 1:1 entity mirrors
- EF configuration —
IEntityTypeConfiguration<T>; no data annotations on entities - Integration tests —
WebApplicationFactory+ Testcontainers, DI replacement viaservices.RemoveAll<DbContextOptions<T>>() - OpenAPI metadata —
.WithName(),.WithSummary(),.Produces<T>(),.ProducesValidationProblem(),.ProducesProblem(404) - CancellationToken — on every async method and passed to every async call
- Result pattern — handlers return
Result<T>; endpoints map success → TypedResults, failure →ToProblemDetails()
Also verify supporting infrastructure — scaffold it if missing: list endpoints
get bounded pagination (page/pageSize, max 50), Program.cs has
app.UseExceptionHandler(), and appsettings.json has a connection string.
Step 6: Verify
Prove the scaffold works before reporting done:
dotnet build --no-restore
dotnet test --no-build --filter "FullyQualifiedName~{FeatureName}"If the build or tests fail, fix and re-run before presenting results.
Example
User: /scaffold a Product Catalog feature with CRUD operations
Claude: Detected architecture: Vertical Slice Architecture
Created files:
src/Features/Products/CreateProduct.cs -- Command + handler + validator
src/Features/Products/GetProduct.cs -- Query by ID + handler
src/Features/Products/ListProducts.cs -- Paginated list + handler
src/Features/Products/UpdateProduct.cs -- Command + handler + validator
src/Features/Products/DeleteProduct.cs -- Command + handler
src/Features/Products/ProductEndpoints.cs -- IEndpointGroup, OpenAPI metadata
src/Features/Products/ProductConfig.cs -- EF Core configuration
tests/Features/Products/CreateProductTests.cs
tests/Features/Products/GetProductTests.cs
tests/Features/Products/ListProductsTests.cs
Checklist: 9/9 | Build: PASS | Tests: PASS
All files follow your existing conventions (sealed handlers,
primary constructors, TypedResults return types).Related
dotnet-init— Initialize the project and CLAUDE.md before scaffolding featuresvertical-slice— The VSA patterns the VSA scaffold followsclean-architecture— Layering rules behind the CA scaffoldddd— Aggregate and domain-event patterns behind the DDD scaffoldproject-structure— Where files belong in each architecture
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.

