skills/create-controller/SKILL.md
Create an API controller for a given entity in an ASP.NET Core Web API project. Use when the user wants to scaffold a new controller, create REST API endpoints, or set up CRUD operations with Entity Framework Core and OpenAPI annotations.
npx skillsauth add jim60105/copilot-prompt create-controllerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create a controller for a given entity in an ASP.NET Core Web API project.
Create an empty controller with the naming rule: {EntityName}Controller
Set up DI and inject Entity Framework context and ILogger<T>.
Do not use Entity Class for model binding. Create DTO classes for each CRUD operation instead.
Add CRUD REST API methods with required OpenAPI-related annotations.
Add OperationId to each action method. Example:
// Before
[HttpGet]
// After
[HttpGet(Name = "GetCourses")]
Give each OperationId a meaningful name.
Apply [ProducesResponseType] attribute to each action reflecting API behavior.
Edit coursemanagement.http for testing:
@HostAddress variable definition.HostAddress variable.Run dotnet build to verify everything compiles.
Add Swashbuckle.AspNetCore.SwaggerUI package:
dotnet add package Swashbuckle.AspNetCore.SwaggerUI
Add the following code to Program.cs:
app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/openapi/v1.json", "OpenAPI V1");
});
Run dotnet run to verify the application starts successfully.
development
Diátaxis Documentation Expert. An expert technical writer specializing in creating high-quality software documentation, guided by the principles and structure of the Diátaxis technical documentation authoring framework.
testing
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.
tools
Comprehensive guide for building, configuring, customizing, and deploying Docsify documentation sites. Use when the user wants to (1) initialize a new Docsify site, (2) add or organize Markdown pages, sidebars, navbars, or cover pages, (3) configure `window.$docsify` options, (4) customize themes / CSS variables / fonts, (5) install built-in or third-party Docsify plugins (search, GA, emoji, zoom, copy-code, comments, pagination, tabs, etc.), (6) write a custom Docsify plugin using lifecycle hooks, (7) use Docsify Markdown helpers (callouts, link attributes, image attributes, heading IDs, task lists, embed files with `:include`), (8) deploy to GitHub Pages, GitLab Pages, Netlify, Vercel, Firebase, Docker, Nginx, etc., (9) enable PWA / offline mode, virtual routes, or Vue compatibility, or (10) upgrade a Docsify site from v4 to v5. Triggers on mentions of "docsify", "_sidebar.md", "_navbar.md", "_coverpage.md", "$docsify", or `docsify-cli`.
testing
Writing guidelines for producing high-quality Traditional Chinese (zh-TW) content. Use when writing any kind of content. Including blog posts, notes, technical articles, technical writing, chitchat, social media posts, etc., even when you are just sending a text message. Also use when reviewing or editing existing Chinese content for tone, style, and terminology compliance.