Scaffolds HTTP API endpoints across multiple frameworks (ASP.NET Core, Express, Fastify, NestJS, FastAPI, DRF, Spring Boot, Go) following REPR pattern with validation, typed responses, and OpenAPI metadata.
Ships in AI for Developers Toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Generate clean HTTP endpoints - one feature per endpoint (REPR: Request-Endpoint-Response), validated at the edge, with explicit response types, grouped routes, auth, and OpenAPI metadata - in the idiom of the project's framework.
Works on a target: a file, folder, project/repo, or GitHub URL (git clone --depth 1 <url> /tmp/repo). Always read one existing endpoint first and match its style (folder layout, naming, how it dispatches to business logic, how it validates and returns errors).
| Manifest | Look for | Framework | Find existing endpoints |
|---|---|---|---|
*.csproj | Microsoft.NET.Sdk.Web, Carter, FastEndpoints | ASP.NET Core Minimal APIs / controllers | grep -rn "MapGet|MapPost|MapGroup|ICarterModule|: ControllerBase" --include=*.cs |
package.json | express, fastify, @nestjs/core | Express / Fastify / NestJS | grep -rn "router\.\(get|post\)|app\.\(get|post\)|@Controller(" --include=*.ts |
pyproject.toml, requirements*.txt | fastapi, djangorestframework | FastAPI / DRF | grep -rn "APIRouter|@router\.|APIView|ViewSet" --include=*.py |
pom.xml, build.gradle(.kts) | spring-boot-starter-web / -webflux | Spring Boot | grep -rn "@RestController|@RequestMapping" src |
go.mod | go-chi/chi, gin-gonic/gin, none | chi / Gin / net/http | grep -rn "HandleFunc|r\.Route|\.POST(|\.Group(" --include=*.go |
CreateOrder, GetOrderById), not a 2,000-line controller.201 Created + Location for creates, 204 for no-content, 404 for missing, 409 for conflicts, 400/422 for validation.public static class CreateOrderEndpoint
{
public static RouteGroupBuilder MapCreateOrder(this RouteGroupBuilder group)
{
group.MapPost("/", Handle)
.WithName("CreateOrder")
.WithSummary("Creates an order")
.Produces<OrderResponse>(StatusCodes.Status201Created)
.ProducesValidationProblem();
return group;
}
public record Request(Guid CustomerId, List<OrderLine> Lines);
public record OrderResponse(Guid Id);
private static async Task<Results<Created<OrderResponse>, ValidationProblem>> Handle(
Request req, IValidator<Request> validator, ISender sender, CancellationToken ct)
{
var v = await validator.ValidateAsync(req, ct);
if (!v.IsValid) return TypedResults.ValidationProblem(v.ToDictionary());
var id = await sender.Send(new CreateOrderCommand(req.CustomerId, req.Lines), ct);
return TypedResults.Created($"/orders/{id}", new OrderResponse(id));
}
}
// Program.cs - route grouping
var orders = app.MapGroup("/orders").WithTags("Orders").RequireAuthorization();
orders.MapCreateOrder();
orders.MapGetOrderById();
TypedResults over Results - compile-time response types and accurate OpenAPI.MapGroup, Carter modules, FastEndpoints, or controllers. If the project uses controllers and didn't ask to migrate, add a controller action instead.MapGroup + endpoint filters already do.Express (router + zod):
const CreateOrder = z.object({ customerId: z.string().uuid(), lines: z.array(Line).min(1) });
export const ordersRouter = Router().use(requireAuth);
ordersRouter.post("/", async (req, res, next) => {
const parsed = CreateOrder.safeParse(req.body);
if (!parsed.success) return res.status(400).json({ title: "Validation failed", errors: parsed.error.flatten() });
try {
const id = await orders.create(parsed.data);
res.status(201).location(`/orders/${id}`).json({ id });
} catch (e) { next(e); }
});
app.use("/orders", ordersRouter);
Fastify - declare schema: { body, response: { 201: ... } } on the route (JSON Schema, TypeBox, or a zod type provider) so validation and serialization come from the schema; group with app.register(ordersRoutes, { prefix: "/orders" }).
NestJS - @Controller("orders") + @Post() with a DTO validated by class-validator and a global ValidationPipe({ whitelist: true }); guards for auth; @nestjs/swagger decorators for OpenAPI. Delegate to a service (or CommandBus if @nestjs/cqrs is in use).
FastAPI:
router = APIRouter(prefix="/orders", tags=["orders"], dependencies=[Depends(require_user)])
class CreateOrderRequest(BaseModel):
customer_id: UUID
lines: list[OrderLine] = Field(min_length=1)
class OrderResponse(BaseModel):
id: UUID
@router.post("", response_model=OrderResponse, status_code=status.HTTP_201_CREATED)
async def create_order(req: CreateOrderRequest, response: Response,
svc: OrderService = Depends(get_order_service)) -> OrderResponse:
order_id = await svc.create(req.customer_id, req.lines)
response.headers["Location"] = f"/orders/{order_id}"
return OrderResponse(id=order_id)
Pydantic validates the body (422 on failure). Include the router with app.include_router(router).
Django REST Framework - a Serializer for input/output, a focused APIView or ViewSet action, permission_classes for auth, register via a Router; use drf-spectacular for OpenAPI if the project already does.
@RestController
@RequestMapping("/orders")
class CreateOrderController {
private final OrderService orders;
CreateOrderController(OrderService orders) { this.orders = orders; }
@PostMapping
ResponseEntity<OrderResponse> create(@Valid @RequestBody CreateOrderRequest req) {
UUID id = orders.create(req.customerId(), req.lines());
return ResponseEntity.created(URI.create("/orders/" + id)).body(new OrderResponse(id));
}
}
record CreateOrderRequest(@NotNull UUID customerId, @NotEmpty List<@Valid OrderLine> lines) {}
record OrderResponse(UUID id) {}
Jakarta Bean Validation on the record; map errors to ProblemDetail in one @RestControllerAdvice (or enable Boot's built-in problem details). Auth via Spring Security rules on the path prefix; springdoc-openapi for docs. One controller per feature or a small cohesive controller - match the project.
net/http (Go 1.22+ method patterns), chi, or Gin - match what go.mod has:
type createOrderRequest struct {
CustomerID string `json:"customerId"`
Lines []orderLine `json:"lines"`
}
func (h *OrderHandler) Create(w http.ResponseWriter, r *http.Request) {
var req createOrderRequest
if err := json.NewDecoder(r.Body).Decode(&req); err != nil || len(req.Lines) == 0 {
writeProblem(w, http.StatusBadRequest, "invalid request body")
return
}
id, err := h.svc.Create(r.Context(), req.CustomerID, req.Lines)
if err != nil { writeError(w, err); return }
w.Header().Set("Location", "/orders/"+id)
writeJSON(w, http.StatusCreated, map[string]string{"id": id})
}
// net/http: mux.HandleFunc("POST /orders", h.Create)
// chi: r.Route("/orders", func(r chi.Router) { r.Use(auth); r.Post("/", h.Create) })
Gin - g := r.Group("/orders", auth); g.POST("", h.Create), request struct with binding:"required" tags and c.ShouldBindJSON(&req). Use go-playground/validator if the project already does. Always pass r.Context() down.
## Detected
<stack + framework + the existing endpoint style it matched>
## Files
<each new/changed file with full code: request/response types, handler, route registration>
## Wiring
<where it's registered (group/router/module) and any DI/config change>
## Notes
<validation rules assumed, auth applied, anything to verify>
"Add an endpoint for creating X", "convert this controller to minimal APIs", "group these routes under /orders with auth", "add a FastAPI router for invoices", "scaffold a Spring controller for refunds", "add a chi route for GET /orders/{id}". Pairs with cqrs-setup (dispatch to handlers), result-pattern-scaffolder (map errors to HTTP in one place), and authorization-setup.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Express, Fastify, NestJS, Fastapi, Django REST Framework, Spring Boot, Go
api-scaffolding, endpoint-generation, rest-api, reppr-pattern
/ai-dev-toolkit:api-endpoint-scaffolderfrom AI for Developers Toolkit
npx claudepluginhub stefanthecode/ai-for-developers --plugin ai-dev-toolkit45 skills in this plugin
/architecture-test-generatorGenerate architecture tests / fitness functions that fail the build when architectural rules are violated - layer dependencies, module boundaries, cycles, naming, and visibility conventions - in any stack: NetArchTest or ArchUnitNET (.NET), ArchUnit or Konsist (Java/Kotlin), dependency-cruiser or eslint-plugin-boundaries (TypeScript/JavaScript), import-linter (Python), go-arch-lint or depguard (Go). Use this skill whenever the user wants architecture tests, to enforce layering or the dependency rule, dependency rules as tests, import rules, forbidden imports, no circular dependencies, naming conventions, fitness functions, or asks "how do I stop people breaking the architecture / enforce my layers / keep modules from importing each other". Always use this skill for architecture-test requests; it generates rules matching the project's real structure./async-await-auditorAudit async and concurrent code in any language for correctness and performance bugs - C#/.NET (async/await, Task), JavaScript/TypeScript (Promises, async/await), Python (asyncio), Java/Kotlin (CompletableFuture, virtual threads, coroutines), Go (goroutines, channels, context), Rust (tokio/async). Use this skill whenever the user shares async or concurrent code, or asks about deadlocks, hangs, blocking calls, .Result/.Wait(), async void, ConfigureAwait, floating or unhandled promises, await in a loop vs Promise.all, blocking the event loop, forgotten await, asyncio.gather/TaskGroup, CompletableFuture.join, virtual thread pinning, goroutine leaks, context cancellation, WaitGroup/errgroup, holding a lock across .await, fire-and-forget tasks, cancellation tokens, or "why does my async code hang". Always use this skill for async/concurrency reviews instead of answering from memory; it applies a fixed checklist and rewrites the code.Other plugins' skills for the same job