create-controller

Generate ASP.NET Core Web API controllers with DTOs, CRUD operations, and OpenAPI annotations.

21|Updated May 23, 2025
One-click install
npx skills add https://github.com/jim60105/copilot-prompt --skill create-controller-jim60105
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-controller
Source: https://github.com/jim60105/copilot-prompt/tree/main/skills/create-controller
Command: npx skills add https://github.com/jim60105/copilot-prompt --skill create-controller-jim60105

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the creation of boilerplate code for API controllers in ASP.NET Core Web API projects, streamlining the development of RESTful services.

Core Features & Use Cases

  • Automated Controller Generation: Creates a new controller class with standard naming conventions.
  • Dependency Injection Setup: Automatically injects necessary services like Entity Framework Core contexts and loggers.
  • DTO-based Data Handling: Enforces the use of Data Transfer Objects (DTOs) for request and response models, promoting cleaner API design.
  • CRUD Operations: Implements standard Create, Read, Update, and Delete (CRUD) REST API methods.
  • OpenAPI Annotations: Integrates OpenAPI annotations for API documentation and discoverability.
  • Use Case: When starting a new feature that requires managing a specific entity (e.g., 'Product', 'User'), use this Skill to quickly scaffold the corresponding API controller and its endpoints.

Quick Start

Use the create-controller skill to generate a new controller for the 'Product' entity.

Frequently Asked Questions about create-controller

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold an ASP.NET Core Web API controller with CRUD operations?

This Skill generates an ASP.NET Core Web API controller with full CRUD operations, automatically setting up dependency injection for Entity Framework Core contexts and loggers to streamline RESTful service development.

What is the best way to generate DTOs and OpenAPI annotations for API controllers?

The best way to generate DTOs and OpenAPI annotations is using this Skill, which enforces Data Transfer Objects for request and response models while integrating OpenAPI annotations for API documentation and discoverability.

Does this controller scaffolding tool support Entity Framework Core 9?

Yes, this controller scaffolding tool supports Entity Framework Core 9 and System.Text.Json, requiring specific dependency injection setup and OpenAPI annotations to generate the API endpoints.

Can I automate boilerplate code creation for RESTful services in ASP.NET Core?

You can automate boilerplate code creation for RESTful services by using this Skill to quickly generate standard naming conventions, DTO-based data handling, and CRUD methods for a specified entity in ASP.NET Core.

When do I need to generate a controller with DTO-based data handling?

You need to generate a controller with DTO-based data handling when starting a new feature that requires managing a specific entity, such as 'Product' or 'User', to promote a cleaner API design.