scaffold-new-service

Bootstrap new microservices with Hexagonal Architecture, RFC 9457 errors, and rootless Dockerfiles.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/vesviet/agent-skills --skill scaffold-new-service-vesviet
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: scaffold-new-service
Source: https://github.com/vesviet/agent-skills/tree/main/core/skills/backend/scaffold-new-service
Command: npx skills add https://github.com/vesviet/agent-skills --skill scaffold-new-service-vesviet

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Starting a new backend service often means ad-hoc folder structures, missing error handling, and containers that fail sandbox or security policies. This Skill scaffolds a new service or bounded component from repo-local conventions so architecture, observability, and container hardening exist from the first commit. ## Core Features & Use Cases - Hexagonal Architecture layout: Generates decoupled layers (api/, cmd/, internal/biz/, internal/service/, internal/data/) with port interfaces and compile-time dependency injection. - Schema-first contracts: Bootstraps from OpenAPI 3.1, Protobuf, or AsyncAPI specifications with generated typed models and server stubs. - Production guardrails from commit 1: Wires centralized RFC 9457 error middleware, /health/live and /health/ready probes, OpenTelemetry tracing, and a multi-stage rootless Dockerfile compatible with --read-only and --network=none sandboxes. - Use Case: When asked to create a new order-processing worker, the Skill generates the full directory layout, error catalog, health probes, and distroless nonroot container, then verifies the build and tests inside an air-gapped sandbox. ## Quick Start Use the scaffold-new-service skill to bootstrap a new microservice from my OpenAPI contract with hexagonal layers, health probes, and a rootless Dockerfile.

Frequently Asked Questions about scaffold-new-service

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

FAQPage Schema
How do I scaffold a new microservice with hexagonal architecture?▼

Define the bounded context and an OpenAPI 3.1 or Protobuf contract first, then generate the layered layout: api/ for contracts, cmd/ for entrypoints, internal/biz/ for domain logic and ports, internal/service/ for handlers, and internal/data/ for persistence adapters.

What is schema-first contract development for backend services?▼

Schema-first development authors an immutable OpenAPI 3.1, AsyncAPI, or Protobuf specification before writing code, then generates typed models and server stubs from that contract. This keeps the interface stable and validated from the initial commit.

How do I implement RFC 9457 problem details error handling?▼

Create a domain error catalog and a global middleware that maps errors to application/problem+json responses with type, title, status, detail, and trace_id fields. Sanitize all 5xx responses so internal messages and stack traces never leak to clients.

Can a Dockerfile run as a non-root user with a read-only filesystem?▼

Yes. Use a multi-stage build ending in a distroless nonroot image with USER nonroot, and mount writable paths like /tmp as tmpfs. The container then boots with --read-only and supports --network=none sandbox testing.

When should I not use this service scaffolding approach?▼

Avoid it for solo refactors or changes to existing services where no new deployable unit is created. It is designed for greenfield services, workers, and bounded components, not for modifying established codebases.