Ask an agent for an endpoint and it writes plausible handler code from memory — a stale ORM call, an ad-hoc error shape, auth improvised, a job that drops on retry. backend builds the running server behind the contract — APIs, domain logic, OLTP persistence, auth, async work, caching, security controls, integration, and the tests that prove it — retrieval-first against current docs, picking the modal default stack and saying when to deviate, and proving it runs before it calls the job done.
runs onClaude CodeCodexCursorAntigravityopencodeGrok BuildHermes
api-implementation.mdsurface-serverless-edge.mdsurface-agentic.md
3 of 15 loaded · read fully
Route before acting. Pick one job and at most one base surface, read only those references — never the whole library. When the caller is an LLM/agent, surface-agentic stacks additively on top of the base surface, because it changes the control plane, the contract's legibility, and the token model.
The router is the skill. There is no fixed pipeline to run start-to-finish — each job stands alone and enters where your request is. The animation traces one path; the sections below map the whole surface it routes across.
backend owns the running server — the implementation craft inside the decided shape: the endpoints behind the contract, the domain layer, the OLTP schema and migrations, the auth enforcement, the queues and workers, the caches and the security controls, plus the tests that prove it runs. It consumes architecture's decisions — boundaries, contract shape, NFR budgets, threat model — and builds inside them rather than re-deriving or overriding them, and it recommends the sibling skills by name rather than silently doing their work.
the running implementation & the decision record behind it
consume or contribute; own none
Implement inside the decision. When compatible upstream artifacts are supplied — a solution-architecture doc, contracts, an NFR budget, a threat model, a handoff.yaml — backend builds against them. When they don't exist (a standalone run), it says so explicitly rather than inventing a contract or threat model to fill the gap.
SKILL.md is a router, not a script. Every request selects the smallest sufficient route: one primary job — the nine below — combined with at most one base surface that reshapes how the job applies to the runtime, plus the additive agentic overlay when the caller is an LLM/agent system. Read the selected references completely; load two or three at most, never the whole pack. Nine jobs and five surfaces compose across the runtime types — from a single-endpoint two-file read to a full service pass — without ever reading all fifteen references at once.
| facet | options | rule |
|---|---|---|
| ① Primary job | api · domain-logic · persistence · auth · async & messaging · caching & performance · server-security · service-integration · backend-testing | Exactly one. Pick the single engineering job the request needs; the default entry is api-implementation. |
| ② Base surface | rest-crud (default) · serverless / edge · realtime · event-driven microservices | At most one. The runtime/system type reshapes how every job applies — it points to the job references, it doesn't redefine them. |
| ③ Agentic overlay ⭐ | surface-agentic — backend serving an LLM/agent system | Additive. Stacks on top of the base surface, never replaces it. A serverless agent backend is serverless-edge + agentic. |
Each job is one reference, read fully only when its route is selected — grounded in named canon, producing a running implementation plus the decision record behind it. This is the whole surface, not a headline slice.
| I need to… | Read | Grounded in | Produces |
|---|---|---|---|
| Build endpoints / handlers / resolvers behind a contract · pick REST/GraphQL/gRPC/tRPC · set pagination, versioning, error shape | api-implementation.md |
OpenAPI · Google AIP · MS REST guidelines · cursor pagination | Transport pick, request-lifecycle wiring, single-source schema, uniform error shape, cursor pagination, in-code versioning |
| Add / refactor business logic, a service or use-case layer, or domain models · stop rules leaking into handlers | domain-logic.md |
DDD tactical · clean / hexagonal (Cockburn) · dependency rule | Layered domain/application/infra structure, aggregates/entities/VOs, anti-anemic litmus, dependency rule |
| Design schema / indexes · choose ORM vs raw SQL · write a migration · get transactions / isolation right · size a pool · kill N+1 | persistence.md |
Postgres-for-everything · Drizzle / Prisma · isolation levels · pooling | Schema + index + expand/contract migration, isolation decision, pooling matched to runtime, DB-license flag |
| Add login / sessions · protect a route · add OAuth / SSO / "sign in with X" · store passwords · decide who-can-do-what | auth.md |
OAuth2 / OIDC + PKCE (RFC 9700) · Argon2id · Better-Auth · Zanzibar (OpenFGA / SpiceDB) | Session-vs-JWT decision, OAuth2/OIDC+PKCE flow, Argon2id config, RBAC/ABAC/ReBAC model + library pick |
| Background jobs, queues, workers, event-driven services, pub/sub, CDC, outbox, saga, idempotency, or durable workflows | async-and-messaging.md |
transactional outbox · saga · at-least-once + idempotent consumers · Temporal / Hatchet | Broker/queue pick, idempotency-key path, transactional outbox, saga + compensations, delivery stance, durable-execution decision |
| Add a cache and invalidate it · implement rate limiting · diagnose a slow endpoint / query | caching-and-performance.md |
cache-aside / staleness tolerance · distributed token bucket · measure-first tuning | Cache strategy by staleness/loss tolerance, invalidation mechanism, distributed-correct token bucket, measured bottleneck + fix |
| Secure the API · add security headers · fix CORS · prevent injection · store secrets · add CSRF / mTLS — implement a threat model's controls | server-security.md |
OWASP Top 10:2021 · ASVS · parameterized queries · secret hygiene | Uniform OWASP controls table (control→impl→verify) with a self-audit count, mapped to Top 10:2021 / ASVS |
| Call a third-party API · receive / deliver webhooks · add a gRPC / HTTP client · tune a circuit breaker · integrate payment / AI / email | service-integration.md |
retry + jitter · circuit breaker · idempotent webhooks in/out · signature verify | Resilient client wrapper (retry reused from async + circuit breaker), verified idempotent webhooks in and out |
| Write / run / fix backend tests, or "prove this works" — unit / integration (testcontainers) / producer-contract + a runnable loop | backend-testing.md |
testcontainers · producer-contract (Pact) · test pyramid · real dependencies | Layered test suite, real-dependency integration tests, contract-producer check, ✓/✗ verification report |
Full router table & invariants: SKILL.md.
The skill speaks the current modal default per language fluently — so the fast path is fast — but every recommendation is a concrete pick + what NOT to build + the trade-off, weighted by reversibility. Adoption numbers are engagement, not gospel; the fundamentals below are anchored regardless of what is trending. Highlighted chips are the modal defaults.
One base surface, at most, reshapes the job for the runtime type — the same persistence job is bounded differently on a long-running server than on a scale-to-zero edge function. The agentic overlay is additive — it stacks on top of whichever base you picked — and is the first-class differentiator, expanded below.
Generic server-building is well covered; the agent-native backend is the 2026 throughline. Every major backend tool now ships an agent interface, and the argument that backends should be agent-legible — typed contracts, legible errors, markdown, token-efficient responses — is the differentiator versus every single-purpose backend skill. When the caller is an agent, the surface stacks additively: it changes the control plane, not just a component.
# the base surface stays; agentic stacks on top base_surface: serverless-edge # rest-crud | serverless | realtime | event-driven control_plane: durable execution # Temporal / Hatchet — resume, don't retry-from-zero tool_surface: MCP + typed tool endpoints contract: agent-legible # typed I/O, legible errors, token-efficient retrieval: RAG plumbing # backend serves it; ai owns the core tokens: agent-scoped, short-lived idempotency: every tool call keyed # retries are a given, not an edge case
Six rules govern every route, whichever references it loads — the behavioral spine, condensed.
backend's deliverable is a running implementation plus the decision record behind it. A full pass emits up to five kinds of artifact — plus the fillable checklists that ship in the pack. Each records the decision and options considered, the trade-off accepted, facts/decisions/assumptions distinguished, and — for any framework/ORM/DB code — that current docs were checked for the target version. It closes on the prove-it-works loop, not an assertion.
A 12-factor service scaffold — the implementation, not a plan — wired to the chosen runtime and store.
The contract backend built to, reviewed against a uniform checklist — the interface frontend codes against.
Expand/contract migration with the rollout order — applied and verified, not just written.
Argon2id params, cookie flags, OAuth-PKCE, and the OWASP controls table — uniform, with a self-audit count.
The keyed-request path and the transactional outbox — at-least-once made safe for jobs and webhooks.
The layered suite plus the ✓/✗ report and CI YAML — the proof it runs, distinct from quality's gate.
backend consumes architecture's artifacts upstream — contracts, NFR budgets, threat model,
ADRs — and, when downstream build/verify work is expected, emits a compact handoff.yaml
beside the running code: a routing index into the services, contracts-as-built, tests, and
telemetry hooks, never a copy of them. Standalone by default; the companion appears only when a
consumer will actually read it.
skill: backend status: complete objective: "" # only required field artifacts_created: [service, contract, migrations, tests, telemetry-hooks] decisions: · assumptions: · constraints: verification: lint/migrate/test/hit ✓ security_border: controls impl'd vs quality-verified recommended_next: operate · quality · frontend · data · ai
The running services with telemetry hooks to deploy and monitor, and backend's own tests plus the security-control border for the independent load-test, scan, and release gate.
The contract-as-implemented to code the client against, the OLTP shape that feeds pipelines, and the tool/MCP endpoints plus RAG plumbing that serve the agent core.
Seam discipline. The running code and its tests are the real deliverables; if a consumer needs more than the index gives, the artifact itself is incomplete — the yaml never grows to compensate. When a threat model was consumed, the border between backend-implemented controls and quality-verified controls is stated explicitly. Never silently invoke a build skill; name it in recommended_next.
Install once. It's a plain SKILL.md router — no flags, no config, no scripts — so it
activates on natural-language phrasing ("build the endpoint", "add auth", "write a migration", "set
up a job queue", "harden the API", "expose an MCP endpoint") rather than a fixed command.
The same install runs on any Agent Skills
host. Codex installs to ${CODEX_HOME:-$HOME/.codex}/skills and triggers with
$backend; agents remains a separate cross-agent installation target.
| host | install target | command |
|---|---|---|
| Claude Code | ~/.claude/skills | ./install.sh claude |
| Codex | ${CODEX_HOME:-$HOME/.codex}/skills | ./install.sh codex |
| Cross-agent path | ~/.agents/skills | ./install.sh agents |
| Cursor CLI | ~/.cursor/skills | ./install.sh cursor |
| Antigravity (IDE + agy) | ~/.gemini/…/skills | ./install.sh antigravity |
| opencode | ~/.config/opencode/skills | ./install.sh opencode |
| Grok Build | ~/.grok/skills | ./install.sh grok |
| Hermes | ~/.hermes/skills | ./install.sh hermes |
Prefer npx skills add gabros20/backend-skill -g -y when you have Node — it maps supported clients itself.
More docs: docs/installation.md · docs/usage.md · docs/recipes.md.