Skip to content

Guide · Agent skill

How to use the ASP.NET Minimal API with OpenAPI agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The aspnet-minimal-api-openapi skill is a set of guidelines that tells an AI agent how to build ASP.NET Minimal API endpoints in C# and document them with the built-in OpenAPI support in .NET 9. It is aimed at C# developers working on small or medium web APIs who want consistent, well-documented endpoint code. After reading this guide you will know what the skill changes, how to install it, how to ask for it in plain language, and what to check in the output.

ASP.NET Minimal API with OpenAPIgithub/awesome-copilot · MIT

Quick start

  1. 1Check prerequisites. Confirm you have the .NET 9 SDK or later and an ASP.NET Core project that uses Minimal APIs.
  2. 2Download the skill. Download the ZIP from this page.
  3. 3Unzip into a skills folder. Unzip into ~/.claude/skills/ for personal use, or into your project's .claude/skills/ folder.
  4. 4Or upload in the Claude apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the skill.
  5. 5Ask in plain language. Request Minimal API endpoints or OpenAPI documentation in your C# project, mentioning MapGroup, TypedResults or OpenAPI if relevant.
  6. 6Review and build. Build the project and check the generated OpenAPI document shows the summaries and operation IDs you asked for.

What does the skill make the agent do?

Once the skill is installed, the agent follows a set of best-practice rules whenever you ask it to create Minimal API endpoints. The guidance covers three areas: how endpoints are organised, how request and response types are written, and how the API is documented.

The skill is guidance only. It does not run anything itself, so the agent writes or edits code based on these rules and you still build and test the project yourself.

  • Organise endpoints with the MapGroup() extension and, for larger APIs, separate endpoint classes or a feature-based folder structure.
  • Define explicit request and response DTOs or record types with validation attributes such as [Required].
  • Return TypedResults and Results<T1, T2> so each endpoint has clear, strongly typed responses.
  • Document the API with the built-in OpenAPI support in .NET 9, including summaries, descriptions, operation IDs set with WithName, and document or schema transformers.
  • Use [Description()] on properties and parameters and set proper content types.

Who should use it, and who should not?

The skill suits C# developers building small or medium web APIs on .NET 9 or later, and teams that want consistent, well-documented Minimal API code. It also fits developers who want OpenAPI documentation added to existing Minimal API endpoints.

It is not a good match for projects that use MVC controllers or older .NET versions. The guidance targets Minimal APIs and .NET 9 OpenAPI features, so the agent may need to adapt the advice. Non-developers without a .NET project will not get much value, because the skill assumes an existing C# codebase to write into.

What do you need before installing?

You need the .NET 9 SDK or later and an ASP.NET Core project that uses Minimal APIs. The skill assumes there is already a C# codebase for the agent to write into.

  • .NET 9 SDK or later
  • An ASP.NET Core project using Minimal APIs
  • The skill package includes one file, SKILL.md

How do you install the skill?

Download the ZIP from this page and unzip it. You can install the skill in one of two ways.

For a personal install that works across your projects, unzip it into ~/.claude/skills/. To limit it to one project, unzip it into that project's .claude/skills/ folder.

In the Claude apps you can instead upload the skill under Settings → Capabilities → Skills.

  • Personal: unzip into ~/.claude/skills/
  • Project only: unzip into the project's .claude/skills/ folder
  • Claude apps: Settings → Capabilities → Skills, then upload

How do you trigger the skill with natural requests?

You do not need a special command. Ask the agent in plain language to build or document Minimal API endpoints in your C# project, and the skill guidance applies. Mention OpenAPI, Swagger, typed results or endpoint grouping if you want the agent to lean into those areas.

Give the agent the context it needs: the resource, the operations and the fields. The more specific the request, the more useful the output.

  • Create a Minimal API endpoint group for orders with GET, POST and DELETE, and document it with OpenAPI.
  • Add OpenAPI summaries, descriptions and operation IDs to my existing Minimal API endpoints.
  • Refactor my Minimal API routes to use MapGroup and return TypedResults.
  • Add validation attributes to my request models and show the 400 responses in the OpenAPI document.

What does good output look like?

Expect the agent to group related routes with MapGroup(), define request and response types as records or classes with validation attributes, return TypedResults, and add WithName and summary metadata to each endpoint. Check that the code compiles against your .NET 9 project and that the generated OpenAPI document shows the summaries and operation IDs you expect.

Because the skill covers error responses through ProblemDetailsService and StatusCodePages, review how errors are returned and confirm they match what your clients expect.

  • Check the project builds on the .NET 9 SDK or later.
  • Confirm operation IDs and summaries appear in the OpenAPI document.
  • Review validation rules against your real business requirements.

Is it safe to use?

The skill does not run scripts and does not use the network. It is a SKILL.md guidance file. Because it only shapes how the agent writes code, the main risk is the code the agent produces, so review changes as you would any pull request.

  • Runs scripts: no
  • Uses network: no

Tips for better results

Keep your project's existing conventions in mind and tell the agent about them, since the skill gives general best practice rather than your house style. Ask for one feature at a time so the diff stays reviewable.

  • State whether you use a feature-based folder structure or separate endpoint classes.
  • Ask for document transformers if you need servers, tags or security schemes in the output.
  • Ask for schema transformers when you need to customise individual OpenAPI schemas.

What people use it for

  • Creating a grouped set of CRUD endpoints for a resource such as orders, with typed request and response records.
  • Adding OpenAPI summaries, descriptions and WithName operation IDs to existing Minimal API endpoints.
  • Refactoring routes to use MapGroup and TypedResults with Results<T1, T2> return types.
  • Adding validation attributes and [Description()] annotations so the API documentation is clearer for consumers.

Frequently asked questions

How do I install the aspnet-minimal-api-openapi skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into your project's .claude/skills/ folder for one project. You can also upload it in the Claude apps under Settings → Capabilities → Skills.

What do I need to use this skill?

You need the .NET 9 SDK or later and an ASP.NET Core project that uses Minimal APIs. The skill assumes an existing C# codebase for the agent to write into.

Is the aspnet-minimal-api-openapi skill free?

The skill is published under the MIT licence on the github/awesome-copilot repository. This page does not list any price, so check the repository for licence terms.

Does the skill run code or access the internet?

No. The skill does not run scripts and does not use the network. It is guidance in a SKILL.md file that shapes how the agent writes code.

Can I use it with MVC controllers?

It is not a good fit. The guidance targets Minimal APIs and .NET 9 OpenAPI features, so for MVC controllers the agent may need to adapt the advice.

Does it work with older .NET versions?

The skill targets .NET 9 OpenAPI features and requires the .NET 9 SDK or later. For older .NET versions the agent may need to adapt the advice, so check the output against your project.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you are a C# developer building small or medium Minimal API projects on .NET 9 or later and want an agent to produce consistently structured, well-documented endpoints. Pick something else if your project uses MVC controllers or older .NET versions, or if you need an agent that runs and tests code for you, since this skill only provides guidance.

Download the skill