dotnet-doc-controller
Skill1 starsChanged 7 months agoMITView on GitHub
Generates comprehensive API documentation for a .NET REST controller. Use when the user wants to document API endpoints, generate controller docs, or create API reference documentation.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- emaginebr/AvaBotword for word, first seen Apr 8, 2026
Other versions1 project uses a version of this.
Word for word · 1
- emaginebr/AvaBot★ 2100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository39 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- readme-generatorSkill
- add-react-i18nSkill
- band-album-campaignSkill
- band-music-reflectionSkill
- band-streaming-launchSkill
- ckm:banner-designSkill
- ckm:brandSkill
- deploy-prodSkill
- ckm:designSkill
- ckm:design-systemSkill
- docker-compose-configSkill
- doc-managerSkill
- dotnet-architectureSkill
- dotnet-envSkill
- dotnet-fluent-validationSkill
- dotnet-graphqlSkill
- dotnet-multi-tenantSkill
- dotnet-test-apiSkill
- dotnet-testSkill
- frontend-designSkill
- gitversionSkill
- maui-architectureSkill
- mermaid-chartSkill
- nauth-guideSkill
- nnews-guideSkill
- react-alertSkill
- react-architectureSkill
- react-archSkill
- react-modalSkill
- readme-generatorSkill
- ckm:slidesSkill
- social-media-assetsSkill
- social-media-schedulingSkill
- social-post-authoringSkill
- ckm:ui-stylingSkill
- ui-ux-pro-maxSkill
- wsl-dockerSkill
- ztools-guideSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 8 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Find the Controller: Search for the controller file in the project.
- Distinctive: line 19
Read the Controller: Read the entire controller file to understand all endpoints, HTTP methods, route patterns, authorization requirements, …
- Very specific: line 28
IMPORTANT: Search in ALL projects in the solution, including NuGet package sources if DTOs are in external packages.
- Distinctive: line 33
Generate the Documentation: Create a markdown file following the exact format and rules below.
- Very specific: line 154
Complete JSON objects: Every JSON response example MUST include ALL properties of the object, fully populated with realistic example values.
- Distinctive: line 156
Enums as JSON: Every enum used in any response or request object MUST be documented in the "Enums" section with its numeric values mapped …
- Distinctive: line 158
All HTTP methods: Document EVERY endpoint in the controller.
- Distinctive: line 162
Realistic examples: Use realistic, contextual example values (not "string", "0", "true").
- Distinctive: line 164
Nested objects: If a response contains nested objects, show them fully expanded in the JSON example.
- Very specific: line 166
File naming: Use UPPER_SNAKE_CASE for the file name: docs/<NAME>_API_DOCUMENTATION.md
- Distinctive: line 168
Only include sections that apply: If an endpoint has no query parameters, don't include the "Query Parameters" section.
- Very specific: line 170
Anonymous objects: If the controller returns Ok(new { token, user }), document the anonymous object shape based on what properties are …
- Distinctive: line 248
After creating the file, inform the user:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Generate API Documentation for a .NET Controller
You are a documentation generator for .NET REST API Controllers. Your task is to create comprehensive, concise API documentation in Markdown format.
Input
The user will provide a controller name or file path as argument: $ARGUMENTS
Instructions
- Find the Controller: Search for the controller file in the project. If
$ARGUMENTSis a file path, read it directly. If it's a controller name (e.g.,User,UserController), search for the matching file in**/Controllers/**Controller.cs. - Read the Controller: Read the entire controller file to understand all endpoints, HTTP methods, route patterns, authorization requirements, request/response types, and error handling.
Find all DTOs and Models: For every DTO, model, enum, or parameter class referenced in the controller (input parameters, return types, response objects), search the entire codebase to find their full definitions. This includes:
- Request body DTOs (e.g.,
[FromBody] SomeDto param) - Response types (e.g.,
ActionResult<SomeDto>) - Nested objects within DTOs (if a DTO has a property of another type, find that type too)
- Any enums used in any of the above objects
- Anonymous objects returned via
Ok(new { ... })
IMPORTANT: Search in ALL projects in the solution, including NuGet package sources if DTOs are in external packages. Use
dotnetcommands or search the NuGet cache if necessary. Check:- Local project files (
**/*.cs) - NuGet package cache (
~/.nuget/packages/) - Decompiled sources if needed
- Request body DTOs (e.g.,
- Generate the Documentation: Create a markdown file following the exact format and rules below.
- Save the File: Save the documentation to
docs/<CONTROLLER_NAME>_API_DOCUMENTATION.mdwhere<CONTROLLER_NAME>is in UPPER_SNAKE_CASE (e.g.,User→USER,UserRole→USER_ROLE). Create thedocs/directory if it doesn't exist.
Documentation Format Rules
The generated markdown MUST follow this exact structure:
# <ControllerName> API Documentation
> Base URL: `/<route-prefix>`
## Authentication
<Describe the authentication scheme used - Bearer token, API key, etc. Mention which endpoints require auth and which are public.>
## Objects
### <ObjectName>
<Brief one-line description of the object.>
\`\`\`json
{
"property1": "string value",
"property2": 123,
"property3": true,
"nestedObject": {
"nestedProp1": "value",
"nestedProp2": 0
},
"arrayProp": []
}
\`\`\`
| Property | Type | Description |
|----------|------|-------------|
| property1 | string | Description |
| property2 | int | Description |
### Enums
#### <EnumName>
\`\`\`json
{
"0": "Value1",
"1": "Value2",
"2": "Value3"
}
\`\`\`
---
## Endpoints
### 1. <Endpoint Name>
<One-line description of what the endpoint does.>
**Endpoint:** `<HTTP_METHOD> /<route>`
**Authentication:** Required / Not Required
**Path Parameters:**
- `paramName` (type, required) - Description
**Query Parameters:**
- `paramName` (type, optional) - Description
**Request Headers:**
- `Header-Name` (type, required/optional) - Description
**Request Body:**
\`\`\`json
{
"field1": "value",
"field2": 123
}
\`\`\`
**Request Example:**
\`\`\`http
<HTTP_METHOD> /<full-route>
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/json
<body if applicable>
\`\`\`
**Response Success (200):**
\`\`\`json
{
"complete": "json response with all fields populated with example values"
}
\`\`\`
**Response Error (400):**
\`\`\`json
"Validation error message"
\`\`\`
**Response Error (401):**
\`\`\`json
"Not Authorized"
\`\`\`
**Response Error (404):**
\`\`\`json
"Not found message"
\`\`\`
**Response Error (500):**
\`\`\`json
"Error message details"
\`\`\`Critical Rules
- Complete JSON objects: Every JSON response example MUST include ALL properties of the object, fully populated with realistic example values. Never use
...or// more fields. Show the COMPLETE object. - Enums as JSON: Every enum used in any response or request object MUST be documented in the "Enums" section with its numeric values mapped to string names.
- All HTTP methods: Document EVERY endpoint in the controller. Cover GET, POST, PUT, DELETE, PATCH - whatever exists.
- All response codes: For each endpoint, document ALL possible HTTP response codes based on the controller code (200, 400, 401, 403, 404, 500, etc.). Only include response codes that actually exist in the code.
- Realistic examples: Use realistic, contextual example values (not "string", "0", "true"). For a user name use "John Doe", for an email use "john.doe@example.com", etc.
- Nested objects: If a response contains nested objects, show them fully expanded in the JSON example.
- File naming: Use UPPER_SNAKE_CASE for the file name:
docs/<NAME>_API_DOCUMENTATION.md - Only include sections that apply: If an endpoint has no query parameters, don't include the "Query Parameters" section. If no request body, don't include "Request Body". Keep it concise.
- Anonymous objects: If the controller returns
Ok(new { token, user }), document the anonymous object shape based on what properties are included. - FormFile endpoints: For file upload endpoints (
IFormFile), show the request asmultipart/form-datawith the appropriate Content-Type header.
Example Output for Different HTTP Methods
GET Example (with path param):
**Endpoint:** `GET /user/getById/{userId}`
**Request Example:**
\`\`\`http
GET /user/getById/42
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
\`\`\`POST Example (with JSON body):
**Endpoint:** `POST /user/insert`
**Request Example:**
\`\`\`http
POST /user/insert
Content-Type: application/json
{
"name": "John Doe",
"email": "john.doe@example.com"
}
\`\`\`PUT Example (with JSON body):
**Endpoint:** `PUT /role/update`
**Request Example:**
\`\`\`http
PUT /role/update
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/json
{
"roleId": 1,
"name": "Admin",
"slug": "admin"
}
\`\`\`DELETE Example (with path param):
**Endpoint:** `DELETE /role/delete/{roleId}`
**Request Example:**
\`\`\`http
DELETE /role/delete/5
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
\`\`\`POST with File Upload Example:
**Endpoint:** `POST /user/uploadImageUser`
**Request Example:**
\`\`\`http
POST /user/uploadImageUser
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: multipart/form-data; boundary=----FormBoundary
------FormBoundary
Content-Disposition: form-data; name="file"; filename="photo.jpg"
Content-Type: image/jpeg
<binary file data>
------FormBoundary--
\`\`\`After Generating
After creating the file, inform the user:
- The file path where documentation was saved
- The number of endpoints documented
- Any DTOs or enums that could not be fully resolved (if applicable)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

