Scaffolds production-ready microservice templates across multiple stacks (ASP.NET Core, Node, Python, Java/Kotlin, Go) with health checks, OpenTelemetry, structured logging, validated config, graceful shutdown, Docker, and messaging stubs.
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.
Scaffold a new service with the production essentials wired from day one - health checks, telemetry, structured logs, validated config, graceful shutdown, Docker, and a messaging stub - so a new service starts at "production-ready", not "Hello World".
For a new service, take the name, responsibility, and stack. For an existing platform, match the house template: point at the repo (path or GitHub URL) and read an existing service first (entry point, shared libraries/packages, Dockerfile, CI, deployment manifests) so the new one is consistent.
| Manifest | Stack | Default building blocks |
|---|---|---|
*.csproj | ASP.NET Core | Health checks, OpenTelemetry .NET, Serilog, Options + ValidateOnStart, MassTransit or a broker client |
package.json | Node / TypeScript | Fastify (or the project's Express/NestJS), pino, @opentelemetry/sdk-node + auto-instrumentations, zod-validated env, kafkajs / amqplib / nats |
pyproject.toml / requirements*.txt | Python | FastAPI + uvicorn, structlog, OpenTelemetry FastAPI instrumentation, pydantic-settings, aiokafka / aio-pika / FastStream |
pom.xml / build.gradle(.kts) | Java / Kotlin | Spring Boot Actuator probes, Micrometer + OTLP (or the OTel Java agent), structured JSON logging (Logback), @ConfigurationProperties + @Validated, Spring Kafka / Spring AMQP |
go.mod | Go | net/http or chi, log/slog JSON handler, OpenTelemetry Go + otelhttp, env config (caarlos0/env or envconfig), nats.go / franz-go / Watermill |
In a greenfield monorepo, ask which stack if it's not obvious; don't pick one silently.
service.name / version / environment as resource attributes, inbound HTTP and outbound clients instrumented..dockerignore.var builder = WebApplication.CreateBuilder(args);
builder.Services.AddOptions<ServiceOptions>().Bind(builder.Configuration.GetSection("Service")).ValidateDataAnnotations().ValidateOnStart();
builder.Services.AddHealthChecks().AddNpgSql(conn, tags: ["ready"]); // AspNetCore.HealthChecks.NpgSql
builder.Host.UseSerilog((ctx, lc) => lc.ReadFrom.Configuration(ctx.Configuration).WriteTo.Console(new RenderedCompactJsonFormatter()));
builder.Services.AddOpenTelemetry()
.ConfigureResource(r => r.AddService("orders-service"))
.WithTracing(t => t.AddAspNetCoreInstrumentation().AddHttpClientInstrumentation().AddOtlpExporter())
.WithMetrics(m => m.AddAspNetCoreInstrumentation().AddRuntimeInstrumentation().AddOtlpExporter());
var app = builder.Build();
app.MapHealthChecks("/health/live", new() { Predicate = _ => false });
app.MapHealthChecks("/health/ready", new() { Predicate = c => c.Tags.Contains("ready") });
app.Run();
Plus: a multi-stage Dockerfile, appsettings template, a messaging consumer/producer stub (MassTransit, NATS, or the raw broker client), and a README. ASP.NET Core handles SIGTERM via the host; set HostOptions.ShutdownTimeout to fit the grace period. In an Aspire-based platform, reuse the shared ServiceDefaults project instead of repeating this wiring.
OrdersService/
├── Program.cs
├── Endpoints/ ├── Domain/ ├── Infrastructure/
├── Dockerfile ├── appsettings.json
└── OrdersService.csproj
src/instrumentation.ts starts NodeSDK from @opentelemetry/sdk-node with getNodeAutoInstrumentations() and an OTLP exporter; load it before the app (node --import ./dist/instrumentation.js dist/main.js, or --require for CommonJS).src/config.ts parses process.env with a zod schema and exits on failure.logger: true / pino options), GET /health/live and GET /health/ready routes; readiness pings DB and broker.SIGTERM/SIGINT call await app.close(), stop consumers, close pools, then exit.node:<lts>-slim build stage, npm ci --omit=dev runtime stage, USER node./health/live and /health/ready; settings via a pydantic-settings BaseSettings class (fails on startup when invalid).opentelemetry-instrumentation-fastapi (+ httpx/SQLAlchemy instrumentations) with OTLP exporter, or run under opentelemetry-instrument.@asynccontextmanager passed as lifespan=) opens and closes DB pools and starts/stops consumers; uvicorn handles SIGTERM.uv), non-root user, uvicorn app.main:app --host 0.0.0.0.# application.yml
management:
endpoint.health.probes.enabled: true # /actuator/health/liveness and /readiness
endpoints.web.exposure.include: health,info,prometheus
tracing.sampling.probability: 1.0
otlp.tracing.endpoint: ${OTLP_TRACES_ENDPOINT}
server.shutdown: graceful
spring.lifecycle.timeout-per-shutdown-phase: 20s
@ConfigurationProperties(prefix = "orders") record + @Validated with Bean Validation.logging.structured.format.console) on recent versions, otherwise logstash-logback-encoder.@KafkaListener / Spring AMQP @RabbitListener stub with a dead-letter setup.bootBuildImage if the platform uses them.func main() {
ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
defer stop()
cfg := mustLoadConfig() // env -> struct, validated
logger := slog.New(slog.NewJSONHandler(os.Stdout, nil))
shutdownOTel := mustInitOTel(ctx, "orders-service") // OTLP trace + metric providers
defer shutdownOTel(context.Background())
mux := http.NewServeMux()
mux.HandleFunc("GET /health/live", func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusOK) })
mux.HandleFunc("GET /health/ready", readiness(db, broker))
srv := &http.Server{Addr: cfg.Addr, Handler: otelhttp.NewHandler(mux, "http"), ReadHeaderTimeout: 5 * time.Second}
go func() {
if err := srv.ListenAndServe(); err != nil && !errors.Is(err, http.ErrServerClosed) {
logger.Error("server failed", "err", err); stop()
}
}()
<-ctx.Done()
shutdownCtx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
defer cancel()
_ = srv.Shutdown(shutdownCtx) // drain in-flight requests
}
Dockerfile: golang build stage with CGO_ENABLED=0, distroless or scratch (+ CA certs) runtime, non-root user.
## Detected
<stack, house template matched (or chosen defaults), broker>
## Files
<tree + full content: entry point, config, health, telemetry, logging, messaging stub, Dockerfile, .dockerignore, README>
## Config table
| Variable | Required | Default | Purpose |
## Run locally
<commands, incl. docker build/run and where telemetry goes>
"Scaffold an orders microservice with NATS messaging", "give me a service template matching our existing services", "new .NET service with health checks, OTel, Serilog, Docker", "Fastify service template with pino and OpenTelemetry", "FastAPI service skeleton with structlog and Kafka consumer", "Spring Boot service with Actuator probes and OTLP", "Go service with slog, graceful shutdown, and NATS". Pair with dockerfile-generator, healthchecks-setup, structured-logging-setup, opentelemetry-setup, and typed-config-generator for deeper config.
What SKILL.md sets; muted values are Claude Code's defaults
45 skills in this plugin
/api-endpoint-scaffolderScaffold HTTP API endpoints in any stack - ASP.NET Core Minimal APIs or controllers, Express, Fastify, NestJS, FastAPI, Django REST Framework, Spring Boot controllers, Go net/http, chi, Gin - one feature per endpoint (REPR style) with request validation, typed responses, route grouping, auth, and OpenAPI metadata. Use this skill whenever the user wants to add an endpoint or route, convert controllers to minimal APIs, structure routes or routers, set up endpoint groups, TypedResults, route handlers, request DTOs/schemas (zod, Pydantic, Bean Validation, binding tags), or asks "how do I add an endpoint / structure my API routes". Always use this skill for endpoint scaffolding; it generates a complete, validated endpoint that matches the project's conventions./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./ai-dev-toolkit:microservice-template-generatorfrom AI for Developers Toolkit
npx claudepluginhub stefanthecode/ai-for-developers --plugin ai-dev-toolkitOther plugins' skills for the same job