create-datadriven-aspnetcore
Generate or scaffold ASP.NET Core code — Razor Pages, Blazor components, MVC controllers, views, and Minimal API endpoints — without using ASP.NET Core CLI scaffolding/code-generation tools
Install / Use
npx skills add dotnet/skills --skill create-datadriven-aspnetcoreInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Data & AnalyticsSupported Platforms
Our assessment of create-datadriven-aspnetcore
create-datadriven-aspnetcore scores 87/100 on our quality scale, 121st of 231 Data & Analytics skills we index.
Its SKILL.md is 12 KB long, well organised into 18 sections with 6 code examples: a thorough specification that gives an agent plenty to work with.
With 5,471 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 2 days ago, so create-datadriven-aspnetcore is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
create-datadriven-aspnetcore compared with similar skills
All 4 of these similar skills score higher than create-datadriven-aspnetcore; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| create-datadriven-aspnetcore (this skill)by dotnet | 87 | 5.5k | 2d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 85.6k | 11d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 73.9k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 83.9k | today | MCP Server |
| LocalAIby mudler | 100 | 49.3k | today | MCP Server |
Frequently asked questions
- How do I install create-datadriven-aspnetcore?
- Run
npx skills add dotnet/skills --skill create-datadriven-aspnetcore. The install tabs above show the steps for each supported agent. - Which AI agents does create-datadriven-aspnetcore work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is create-datadriven-aspnetcore safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is create-datadriven-aspnetcore still maintained?
- The repository was last updated 2 days ago, so create-datadriven-aspnetcore is actively maintained.
Skill content
View source on GitHubname: create-datadriven-aspnetcore description: Generate or scaffold ASP.NET Core code — Razor Pages, Blazor components, MVC controllers, views, and Minimal API endpoints — without using ASP.NET Core CLI scaffolding/code-generation tools. Use when (1) adding CRUD pages, views, or API endpoints backed by Entity Framework (EF Core) and a database, (2) generating code to create, read, update, and delete data using a DbContext, (3) scaffolding UI components that match the project's existing CSS framework and coding patterns, or (4) creating data-driven forms, tables, and navigation for a model class. Do not use for non-ASP.NET projects or when CLI-based scaffolding is preferred.
Generate or Scaffold ASP.NET Core Code
Generate ASP.NET Core scaffolded code — controllers, views, Razor Pages, Blazor components, Minimal API endpoints. The generated code matches the project's existing CSS framework, layout conventions, and coding patterns. No CLI-based scaffolding/code-generation tools are used; standard dotnet CLI commands for build, restore, and migrations are still expected.
When to Use
- Adding CRUD pages, views, or components for a model in an ASP.NET Core project
- Scaffolding API controllers or Minimal API endpoints with Entity Framework Core
- Generating Razor Pages, MVC views, or Blazor components backed by a DbContext
When Not to Use
- The project is not an ASP.NET Core project
- You need to scaffold non-web artifacts (class libraries, console apps, etc.)
Inputs
| Input | Required | Description |
|-------|----------|-------------|
| Scaffolding request | Yes | Natural-language description of what to scaffold (see format below) |
| Project file path | Yes | Full path to the target .csproj file |
| Solution root path | Recommended | Path to the solution root for multi-project solutions |
Scaffolding Request Format
The scaffolding request should be a natural-language description of what to scaffold. The request must include the target project path and enough detail for the agent to generate the correct code. Examples:
Razor Pages with EF:
Scaffold Razor Pages with CRUD for the `<ModelName>` model (from `<Namespace>`) in project `<path-to-csproj>`.
Create a new DbContext `<DbContextName>` using <database-provider>.
Also scaffold CRUD for any entity that `<ModelName>` depends on via required foreign keys, so parent entities can be created first.
Blazor CRUD components:
Scaffold Blazor CRUD components for the `<ModelName>` model (from `<Namespace>`) in project `<path-to-csproj>`.
Create a new DbContext `<DbContextName>` using <database-provider>.
Minimal API endpoints:
Scaffold Minimal API endpoints for the `<ModelName>` model (from `<Namespace>`) in project `<path-to-csproj>`.
Name the endpoints class `<EndpointsClassName>`.
Create a new DbContext `<DbContextName>` using <database-provider>.
Enable OpenAPI support.
MVC Controller with views:
Scaffold an MVC controller with views and Entity Framework for the `<ModelName>` model (from `<Namespace>`) in project `<path-to-csproj>`.
Name the controller `<ControllerName>`.
Use existing DbContext `<DbContextName>`.
Generate views.
Empty items (no EF):
Scaffold an empty Razor Page named `<PageName>` in project `<path-to-csproj>`.
Workflow
Step 1: Understand the Scaffolding Request
Parse the scaffolding request to identify:
- Scaffolder type: Razor Pages, Blazor components, MVC controller, Minimal API, empty page/view/component
- Model class and its namespace
- DbContext: new or existing, database provider (SQLite, SQL Server, etc.)
- Named items: controller name, endpoints class name, page name, view name, area name
- Options: OpenAPI, async actions, partial view, custom layout
- FK scope: whether to also scaffold CRUD for parent entities referenced by required foreign keys
Execution Checklists
Complete the applicable checklist in order. Do not stop after creating only the requested child resource when a required foreign key makes a parent resource necessary.
All EF scaffolders
- Inspect the project file,
Program.cs, target model, validation attributes, navigation properties, and foreign keys before editing. - Reuse the requested existing
DbContext; otherwise create the requested context. Add only the required provider package and register it withAddDbContextusing the requested provider and connection string. You will need to add Microsoft.EntityFrameworkCore.Design (PrivateAssets="all") when migrations are needed and it's missing. - Generate complete CRUD for the requested entity and every required parent entity: list, details, create, edit, and delete.
- Use the EF migration lifecycle: create a migration and apply it. Never call
EnsureCreatedor seed the database inProgram.cs. - Restore, build, and test the generated project. Fix errors before reporting completion.
MVC, Razor Pages, and Blazor
- Inspect the existing layout, CSS, and representative UI before generating markup.
- Generate the complete child and required-parent UI flows, including a navigation path to each resource so users can create a parent before creating a child.
- Match the existing UI framework and conventions; preserve existing render-mode configuration for Blazor.
Minimal APIs
- Use a route group for each resource and map
GET(list and by ID),POST,PUT, andDELETEendpoints for both child and required-parent resources. - Add OpenAPI metadata to every endpoint: unique name, tags, description, success/error response metadata, and
WithOpenApiwhen OpenAPI is enabled. - Create an executable
.httpfile with every CRUD request. Create parent records first, capture or clearly reuse their returned IDs in child requests, and run the requests in dependency order.
Step 2: Discover UI Style (non-API scaffolders only)
Skip this step for API controllers and Minimal API endpoints.
- Inspect the project's layout file (
_Layout.cshtml,MainLayout.razor, or equivalent) - Inspect the main CSS file (
site.css,app.css, Tailwind config, etc.) - Inspect 1–2 existing pages, views, or components in the project
All generated files MUST match the existing UI framework, CSS classes, and conventions. If Bootstrap is used, generate Bootstrap markup. If Tailwind is used, generate Tailwind markup.
Step 3: Apply Blazor-Specific Rules (Blazor scaffolders only)
Skip this step for non-Blazor scaffolders.
[SupplyParameterFromForm]properties MUST use= new()(notnull!) — preventsEditFormcrash on initial GETProgram.csmust chain.AddInteractiveServerComponents()onAddRazorComponents()and.AddInteractiveServerRenderMode()onMapRazorComponents<App>(). only add interactive server services/render mode when the generated components actually use @rendermode InteractiveServer (or the project already does).- Do not replace existing chained render mode calls (e.g.,
.AddInteractiveWebAssemblyRenderMode())
Step 4: Generate Code
Generate all code files manually. Follow these constraints:
- DO NOT use any scaffolding CLI tools
- DO NOT add packages beyond those required for the scaffolded functionality (e.g., do not add
RuntimeCompilation, or other convenience packages) - Match the coding style of existing files in the project (naming conventions, indentation, namespace patterns)
Enrich API Endpoints with OpenAPI Metadata (API scaffolders only)
When generating Minimal API or MVC API endpoints with OpenAPI support enabled, add rich metadata to every endpoint so the OpenAPI document is descriptive and useful:
.WithName("GetTodoItems")— unique operation ID for each endpoint.WithTags("TodoItems")— group endpoints by resource.WithDescription("Returns all todo items")— human-readable summary.Produces<List<TodoItem>>(StatusCodes.Status200OK)— document success response type.Produces(StatusCodes.Status404NotFound)— document error responses.ProducesValidationProblem()— for endpoints that validate input.WithOpenApi()— opt the endpoint into OpenAPI generation (if not already globally enabled)
Example for a Minimal API GET endpoint:
group.MapGet("/", async (TodoDbContext db) =>
await db.TodoItems.ToListAsync())
.WithName("GetAllTodoItems")
.WithTags("TodoItems")
.WithDescription("Returns all todo items")
.Produces<List<TodoItem>>(StatusCodes.Status200OK);
Step 5: Set Up Entity Framework (if applicable)
Skip this step if the scaffolding request does not involve Entity Framework.
- DO NOT seed the database in
Program.cs— always use migrations - For
dotnet ef: preferdotnet tool restorefrom a local tool manifest. Only install globally if no manifest exists - Inspect the model for navigation properties and foreign keys. Ensure CRUD endpoints/pages exist for referenced entities
- For API scaffolders: the
.httpfile MUST create parent entities before child entities. Use FK values consistent with creation order
Step 6: Generate .http File (API scaffolders only)
Skip this step for non-API scaffolders.
- Create a
.httpfile named{ModelName}.httpin the project directory. If a file with that name exists, append a numeric suffix (Product2.http,Product3.http) until unique - Include sample requests for every CRUD endpoint scaffolded, including endpoints for parent/dependent entities
- Every request must target the correct URL path matching an actual mapped endpoint
- Request labels must accurately describe the action (e.g., "Create a category" must POST to the categories endpoint)
- Order requests by dependency: create parent entities before child entities
- When possible, capture IDs from parent creation responses using your HTTP client's variable/templating features and reuse them as foreign key values in child-entity POST payloads
- If your client cannot capture response values, add comments indicating which FK IDs must be updated after running the parent creation requests; do not leave unrealistic placeholder or assumed FK values that do not correspond to actual parent records when executing the requests
Step 7: Verify
- Run
dotnet restore && dotnet buildfrom the project directory - If Entity Framework is used and this is the first verification:
- Run
dotnet ef migrations add InitialCreate - Run
dotnet ef database update - You will need to change "InitialCreate" to something else if you run this more than once, as EF Core requires unique migration names.
- Run
- If API scaffolder:
- Inspect
Properties/launchSettings.json— if a profile namedhttpsexists, usedotnet run --launch-profile https - Execute EVERY
.httprequest one at a time in dependency order - Report method, URL, and status code for each request
- Stop and fix if any request returns non-2xx
- Inspect
- Fix all errors until a clean build succeeds
Validation
- [ ] All generated files match the project's existing CSS framework and conventions
- [ ]
dotnet buildsucceeds with zero errors - [ ] EF migrations apply cleanly (if applicable)
- [ ] All
.httprequests return 2xx status codes (if API scaffolder) - [ ] No forbidden packages were added (
RuntimeCompilation, etc.) - [ ] No CLI scaffolding tools were invoked
- [ ] Blazor
[SupplyParameterFromForm]properties use= new()(if Blazor scaffolder)
Common Pitfalls
| Pitfall | Solution |
|---------|----------|
| Generated UI doesn't match project's CSS framework | Always inspect layout and CSS files before generating code (Step 2) |
| Blazor EditForm crashes on initial GET | Use = new() not null! for [SupplyParameterFromForm] properties |
| EF migration fails due to missing parent entity CRUD | Scaffold CRUD for FK-dependent entities when request mentions foreign keys |
| .http file has wrong FK values | Order requests by dependency; use values consistent with creation
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
85.6kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
73.9kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Scrapling
83.9k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
LocalAI
49.3kLocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
