build-backend
Skill0 starsChanged 13 days agoMITView on GitHub
Implement backend APIs and services to production standard (status codes, RFC 9457 errors, pagination, versioning, idempotency keys, validation, authz, transactions, timeouts and retries, background jobs, tests). Use when adding or changing endpoints, handlers, services, webhooks, queue consumers or jobs. Not for schema or migration work (use `build-database`) or security review (use `secure-code-review`).
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Pdiamondz1/hma_project_foundationtheir own version, first seen Oct 9, 2026
- Phelan164/codex-howtotheir own version, first seen Aug 17, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- Phelan164/codex-howto★ 15same name
- Pdiamondz1/hma_project_foundation★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository33 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- global/CLAUDE.mdCLAUDE.md
- build-commitsSkill
- build-containersSkill
- build-databaseSkill
- build-design-systemSkill
- build-frontendSkill
- build-iacSkill
- build-project-setupSkill
- core-documentationSkill
- core-prompt-engineeringSkill
- core-token-efficiencySkill
- create-marketing-copySkill
- create-seo-contentSkill
- operate-incidentSkill
- operate-observabilitySkill
- plan-architectureSkill
- plan-campaignSkill
- plan-codebase-analysisSkill
- plan-test-strategySkill
- plan-threat-modelSkill
- review-pull-requestSkill
- review-seoSkill
- review-ui-uxSkill
- secure-code-reviewSkill
- secure-repo-governanceSkill
- secure-supply-chainSkill
- ship-ci-cdSkill
- ship-github-actionsSkill
- ship-readinessSkill
- ship-releaseSkill
- test-performanceSkill
- test-validationSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 19
Config via environment: read and validate all config at startup, fail fast on missing required values, no secrets in code, defaults safe …
- Distinctive: line 39
Never trust client-supplied IDs for ownership, roles, prices or tenant.
- Distinctive: line 41
Every outbound call has a timeout (connect and total).
- Distinctive: line 42
Do not hold a DB transaction open across HTTP calls, queue publishes or user input.
- Very specific: line 47
Read references/stack-notes.md when working in Node/TypeScript, Python, Go, Java/Spring or .NET and the framework's idiom is unclear.
- Distinctive: line 50
Ask before: breaking an API contract, adding a dependency, changing auth/authz middleware, changing rate limits or CORS, enabling a new …
- Distinctive: line 51
Never commit secrets or real customer data in fixtures.
- Distinctive: line 52
Do not disable validation, auth or TLS verification to make a test pass.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Backend Development
Ship server-side changes that fit the existing codebase, keep the API contract stable, and fail safely.
Procedure
- Trace the existing path for a similar endpoint or job: route -> middleware (auth, validation, rate limit) -> handler -> service -> repository/client -> response mapping. Copy its structure, DI, error types, logging and test style. If none exists, use
plan-codebase-analysisfirst. - Define the contract before code: method and path, request schema, response schema, status codes, error codes, auth requirement, idempotency, pagination. If an OpenAPI/proto/GraphQL schema is the source of truth, change it first and regenerate. Read
references/api-design.mdwhen designing or changing an HTTP API. - Classify the change: additive (new field, new endpoint) or breaking (removed/renamed field, type change, new required input, changed status code or semantics, tighter validation). Breaking changes need a new version or an expand/contract rollout and the user's approval.
- Validate at the boundary with the project's schema library: types, ranges, lengths, formats, enums, unknown-field policy. Parse into typed domain objects once; inner layers trust them. Return 400/422 with field-level details.
- Authenticate in middleware, authorise at the resource. Check that the caller may perform this action on this specific object (ownership, tenant, role) in the service or query, not only by route. Not found and forbidden for another tenant's object both return 404 to avoid leaking existence (follow project convention if it differs).
- Implement business logic in the service layer, free of transport types. Wrap multi-write operations in one transaction; keep network calls out of open transactions.
- Make side effects safe: idempotency keys for non-idempotent POSTs that clients may retry (payments, orders); unique constraints as the last line of defence; outbox pattern for "save and publish". Read
references/resilience.mdwhen calling other services, adding retries, webhooks, queues or background jobs. - Handle errors deliberately: map domain errors to status codes in one place; never leak stack traces, SQL, or internal hostnames; log the full error server-side with a request/correlation ID.
- Config via environment: read and validate all config at startup, fail fast on missing required values, no secrets in code, defaults safe for production.
- Observability: structured logs with request ID, user/tenant ID (not personal data), operation and outcome; metrics for rate, errors, duration on new endpoints; propagate trace context to downstream calls (see
operate-observability). - Test: success, validation failure, unauthenticated (401), unauthorised (403/404), not found, conflict/idempotent replay, and dependency failure (timeout, 5xx). Prefer integration tests through the HTTP layer with a real DB (containers) for persistence logic; unit-test pure domain logic.
- Run targeted tests, lint, typecheck; then report contract changes and affected consumers.
Rules
- Status codes (detail in
references/api-design.md):Situation Code Created 201 + LocationAccepted for async processing 202 + status URL Success, no body 204 Malformed or schema-invalid input 400 (or 422 if the project uses it for semantic validation) No/invalid credentials 401 + WWW-AuthenticateAuthenticated but not allowed 403 (404 for cross-tenant objects) State conflict, duplicate, version mismatch 409 (412 for failed If-Match)Rate limited 429 + Retry-AfterOur bug 500; dependency down/timeout 502/503/504 - Error bodies use one format across the API; default to RFC 9457
application/problem+json(type,title,status,detail,instance, plus anerrorsarray for fields) unless the project has its own. - Lists are always paginated with a server-enforced max page size; prefer cursor pagination for large or changing data; sort order must be deterministic (tie-break on ID).
- Never trust client-supplied IDs for ownership, roles, prices or tenant; derive from the session and the database.
- Mass assignment: map allowed fields explicitly; never bind request bodies directly onto ORM entities.
- Every outbound call has a timeout (connect and total). Retry only idempotent operations, with exponential backoff and jitter, max ~3 attempts, and only on retryable errors (timeouts, 429, 502-504).
- Do not hold a DB transaction open across HTTP calls, queue publishes or user input.
- Money as integer minor units or decimal type, never float. Timestamps stored and sent in UTC ISO 8601 with offset.
- Background jobs must be idempotent, have a timeout, bounded retries and a dead-letter/failed state that someone sees. Never do long work in the request thread; return 202.
- Logs: no passwords, tokens, full card numbers, secrets or full request bodies with personal data.
- New dependency only when the standard library or an existing dependency cannot reasonably do it; ask first.
- Read
references/stack-notes.mdwhen working in Node/TypeScript, Python, Go, Java/Spring or .NET and the framework's idiom is unclear.
Safety gates
- Ask before: breaking an API contract, adding a dependency, changing auth/authz middleware, changing rate limits or CORS, enabling a new public endpoint, or running anything against shared or production environments.
- Never commit secrets or real customer data in fixtures; use generated data.
- Do not disable validation, auth or TLS verification to make a test pass.
Output
## Change
<endpoint/job and behaviour in one or two lines>
## Contract
| Method + path | Request | Responses | Auth | Breaking? |
|---|---|---|---|---|
## Implementation notes
- Validation: ...
- Authorisation: <rule and where enforced>
- Transactions / idempotency: ...
- Outbound calls: <timeout, retry policy>
## Tests
<cases added; commands run and results>
## Consumers affected / rollout
<clients, docs, versioning, feature flag, migration order>Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

