scaffold
БесплатноБез исполняемых скриптовНе проверенArchitecture-aware scaffolding (/scaffold) for .NET 10: generates a Features/<VerbPhrase>/ slice (IEndpoint, IHandler, validator, integration tests) or a new…
от codewithmukesh★ 858 звёзд на GitHubОб этом скилле
/scaffold: Architecture-Aware Feature Scaffolding
What
Generates a complete feature, or a new module, with every file it needs. It never generates half a feature: the endpoint, handler, request, validator, response, EF configuration and integration tests come as one unit, in modern C# 14 (primary constructors, collection expressions, records, sealed internal classes, TypedResults).
The default shape is modular slices (ADR-008, modular-slices skill). Other architectures are supported when the codebase already uses them. File placement maps and code templates live in references/architecture-patterns.md:
- Modular slices (default):
src/Modules/<Module>/<Module>/Features/<VerbPhrase>/, one class per file - Single-project VSA: the same slice files in
Features/, without modules - Clean Architecture: files across Domain, Application, Infrastructure, Api
- DDD: aggregate methods and domain events, with a thin handler
When
- "Scaffold a [feature]", "create an endpoint for", "add a feature"
- "Generate CRUD for", "add entity", "new module", "scaffold a module"
- Starting a new feature after
/spechas produced an approved plan - Customizing generation templates or defining what a complete slice includes
How
Step 1: Detect the architecture
src/Modules/<Name>/<Name>and<Name>.Contractsprojects,IModuleclasses: modular slices- A single API project with
Features/folders and no modules: single-project VSA - Domain / Application / Infrastructure / Api projects: Clean Architecture (plus DDD if aggregates raise domain events)
- An empty or new solution: modular slices, unless the
architecture-advisorrecommended something else
If it is ambiguous, ask rather than guess. Load the matching skill (modular-slices, or architecture-advisor for single-project VSA, Clean Architecture, DDD).
Step 2: Clarify scope
Confirm before generating (skip what the plan already answers):
- Operations needed, named as verb phrases (
PlaceOrder,CancelOrder,ListOrders) - Key fields and invariants for any new entity
- Which module owns it, or whether it needs a new module (decide by who owns the data)
- The permission each endpoint needs, and whether the data is tenant-owned
- Events other modules need from this change, if any
Step 3: Learn conventions
Use the instinct-system skill and Roslyn MCP tools (find_symbol, get_file_outline) on one existing feature folder:
- Naming (
*Endpoint,*Handler,*Request,*RequestValidator,*Response) - How handlers report errors (
Problems.*codes, or an existingResult<T>) - Permission constants and test helper style (
{Module}Api.cs)
Match what exists. Do not bring the default conventions into a codebase that uses different ones.
Step 4: Generate
A feature (default): in Features/<VerbPhrase>/ create
<VerbPhrase>Endpoint.cs:internal sealed, implementsIEndpoint, relative route,.RequirePermission(...),.WithName(),.WithSummary(), injects the handler<VerbPhrase>Handler.cs:internal sealed, implementsIHandler, primary constructor with the moduleDbContextandTimeProvider,HandleAsyncreturning aResults<...>union<VerbPhrase>Request.csand<Noun>Response.cs:public sealed record(shared responses go inFeatures/Common/)<VerbPhrase>RequestValidator.cs:internal sealed, rules with meaningtests/<Module>.Tests/Features/<VerbPhrase>/<VerbPhrase>Tests.cs
A new module: create <Module> and <Module>.Contracts projects, <Module>Module : IModule, <Module>Permissions, <Module>DbContext : ModuleDbContext, add builder.AddModule<<Module>Module>() to the Api, Worker and Migrator hosts, add the projects to the .slnx, add a test project, and create the first migration.
If the Modularity building blocks are missing, scaffold them first from skills/modular-slices/references/building-blocks.md.
Step 5: Completeness checklist (mandatory)
Every scaffolded feature must satisfy all of these:
- Endpoint: one
IEndpointper feature, discovered automatically; nothing added toProgram.csor the module class - Permission:
.RequirePermission(...)or an explicit.AllowAnonymous()on every endpoint - Handler:
internal sealed, implementsIHandler, returns aTypedResultsunion; no mediator, no repository - Errors:
Problems.NotFound()/Conflict(code, ...)/RuleBroken(code, ...)with<module>.<reason>codes; never bare strings - Validator: FluentValidation with real rules, run by the shared endpoint filter
- Contracts: request/response records
public; everything elseinternal; anything other modules need goes in<Module>.Contracts - Data: entities paired with
IEntityTypeConfiguration<T>; reads useAsNoTracking()and projections; lists are paged (page size capped at 50) - Events: cross-module side effects published with
Установить scaffold в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл scaffold?
Architecture-aware scaffolding (/scaffold) for .NET 10: generates a Features/<VerbPhrase>/ slice (IEndpoint, IHandler, validator, integration tests) or a new module (implementation + Contracts, ModuleDbContext), matching existing conventions. Use for "scaffold", "add feature", "new endpoint", "add entity", "new module". Do NOT use for deciding architecture (use modular-slices or architecture-advisor) or project setup (use dotnet-init).
Как установить скилл scaffold?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл scaffold запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic