generate-api-doc

Generates XML comments and Swagger attributes for ASP.NET Core controllers and endpoints.

Updated Mar 1, 2026
One-click install
npx skills add https://github.com/CloudyWing/ai-dotfiles --skill generate-api-doc-cloudywing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generate-api-doc
Source: https://github.com/CloudyWing/ai-dotfiles/tree/main/skills/generate-api-doc
Command: npx skills add https://github.com/CloudyWing/ai-dotfiles --skill generate-api-doc-cloudywing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides automated completion of missing XML documentation and Swagger response attributes so OpenAPI output for ASP.NET Core Controllers and Minimal APIs is comprehensive and consistent.

Core Features & Use Cases

  • Scans Controller classes and Minimal API endpoint definitions to detect public actions, existing XML comments, and existing Swagger attributes to avoid duplication.
  • Generates XML <summary>, <param>, and <returns> comments following csharp-docs conventions and inserts ProducesResponseType attributes based on return types, HTTP methods, and authorization attributes.
  • Use Case: Run against a project to fill missing API documentation and attributes so Swagger UI and generated OpenAPI specs display accurate summaries and response schemas.

Quick Start

Run the skill by invoking /generate-api-doc with a controller file path or class name to scan and update that file.

Frequently Asked Questions about generate-api-doc

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

FAQPage Schema
How do I generate Swagger response attributes and XML documentation for ASP.NET Core controllers?

You can generate Swagger response attributes and XML documentation by scanning ASP.NET Core controllers or Minimal APIs to automatically insert ProducesResponseType attributes and XML summary comments based on detected return types and HTTP methods.

Can I automatically add OpenAPI documentation to Minimal API endpoints?

Yes, Minimal API endpoints can be automatically documented by scanning single files or full projects to detect public actions and insert missing XML comments and Swagger attributes without modifying business logic.

How do I fill missing XML comments in C# without duplicating existing Swagger attributes?

To fill missing XML comments without duplicating existing Swagger attributes, you can scan C# controller classes to detect existing documentation and generate only the missing XML summaries and ProducesResponseType attributes.

Does generating API documentation modify the business logic of ASP.NET Core controllers?

Generating API documentation does not modify business logic; it only detects public actions, routes, and return types to write XML summaries and Swagger response attributes alongside your existing code.

What is the best way to complete OpenAPI specs for ASP.NET Core projects?

The best way to complete OpenAPI specs is to run a full-project scan that detects missing XML documentation and automatically applies comprehensive Swagger attributes to ensure accurate OpenAPI output and Swagger UI display.