skills/docs/api-docs/SKILL.md
Use when generating or enriching API documentation from OpenAPI specs.
npx skillsauth add faysilalshareef/dotnet-ai-kit api-docsInstall 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.
[HttpGet]
[EndpointSummary("List orders with filtering and pagination")]
[EndpointDescription("Returns a paginated list of orders. Supports search by customer name and status filtering.")]
[ProducesResponseType(typeof(Paginated<OrderSummaryResponse>), 200)]
[ProducesResponseType(typeof(ProblemDetails), 400)]
public async Task<ActionResult<Paginated<OrderSummaryResponse>>> GetAll(
[Description("Page number (1-based)")] [FromQuery] int page = 1,
[Description("Items per page (max 100)")] [FromQuery] int pageSize = 20,
[Description("Search by customer name")] [FromQuery] string? search = null)
options.AddDocumentTransformer((document, context, ct) =>
{
document.Info = new OpenApiInfo
{
Title = "{Company} {Domain} API",
Version = "v1",
Description = """
REST API for the {Domain} service.
## Authentication
All endpoints require a Bearer JWT token.
## Pagination
List endpoints return `Paginated<T>` with `items`, `totalCount`, `page`, `pageSize`.
## Error Handling
Errors return RFC 9457 ProblemDetails.
""",
};
return Task.CompletedTask;
});
# {Domain} API Reference
## Authentication
All endpoints require a Bearer JWT token in the Authorization header.
## Endpoints
### Orders
#### List Orders
`GET /api/v1/orders`
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | int | No | Page number (default: 1) |
| pageSize | int | No | Items per page (default: 20, max: 100) |
| search | string | No | Search by customer name |
**Response** `200 OK`
```json
{
"items": [{ "id": "...", "customerName": "...", "total": 100.00 }],
"totalCount": 42,
"page": 1,
"pageSize": 20
}
POST /api/v1/orders
Request Body
{
"customerName": "string",
"total": 100.00,
"items": [{ "productId": "guid", "quantity": 1, "unitPrice": 50.00 }]
}
Response 201 Created
### Scanning for Missing Docs
```bash
# Find endpoints missing summaries
grep -rn "HttpGet\|HttpPost\|HttpPut\|HttpDelete" --include="*.cs" src/ | \
while read line; do
file=$(echo $line | cut -d: -f1)
grep -q "EndpointSummary\|Summary\|WithSummary" "$file" || echo "Missing docs: $line"
done
# Find controllers missing ProducesResponseType
grep -rn "\[Http" --include="*.cs" src/Controllers/ | \
while read line; do
file=$(echo $line | cut -d: -f1)
grep -q "ProducesResponseType" "$file" || echo "Missing response types: $line"
done
| Anti-Pattern | Correct Approach | |---|---| | No endpoint descriptions | Add EndpointSummary and Description | | Missing response type annotations | Add ProducesResponseType for each status | | No error response documentation | Document ProblemDetails responses | | Outdated API reference | Generate from OpenAPI spec, not manually |
# Find OpenAPI configuration
grep -r "AddOpenApi\|MapOpenApi" --include="*.cs" src/
# Find endpoint documentation
grep -r "EndpointSummary\|WithSummary\|ProducesResponseType" --include="*.cs" src/
# Find existing API docs
find . -name "*api*" -path "*/docs/*" -name "*.md"
data-ai
Use when about to claim work is complete, fixed, passing, or ready — before committing, creating PRs, or moving to the next task. Requires running verification commands and confirming output before making any success claims.
development
Use when encountering any bug, test failure, build error, or unexpected behavior — before proposing fixes or making changes.
development
Use when checkpointing, wrapping up, or handing off an AI-assisted development session.
development
Use when following the Specification-Driven Development lifecycle from plan through ship.