agentleFS
Daniyal025Daniyal025/building-production-software/skills/production-backend-and-data/SKILL.md

production-backend-and-data

Skill2 starsChanged 25 days agoMITView on GitHub

Use when designing a database schema or migration, adding API routes or write paths, handling auth, permissions or secrets, money, units or dates, caching, locks or connection pools, background jobs, queues or event consumers, scrapers or ETL, versioning an API, or fixing slow endpoints.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never pad: Don't add generic process items (lockfiles, hooks, scanners, CI) unless the task is about project setup or delivery.

    line 22

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Production Backend and Data

Overview

Part of the building-production-software plugin: production rules for backend and data, each backed by a real case from a production system or an industry source. Core principle: the system must never look more correct than it is.

Tiers

TierNameApplies to
T1Every projectPrototypes, spikes, internal tools, demos. Cheap rules that prevent the worst failures. Apply all of them.
T2ProductionReal users or real data, more than one developer, or anything you must keep running. Apply T1 + T2.
T3High-stakesMoney, regulated or personal data, multiple teams/services, or an AI that can change data. Apply T1 + T2 + T3.

How to use

  1. Set the tier (T1 every project · T2 production · T3 high-stakes). Pick the tier first. Apply every item at or below it. Adding a higher-tier item to a lower-tier project needs a stated reason — otherwise it is speculative work (YAGNI). When in doubt between two tiers, take the lower one and write down what would move you up.
  2. Solve the task first, from your own expertise. Work out the domain-specific design, the failure modes of this system and what the user actually asked for, in the length and format they asked for. The rules here do not replace that thinking.
  3. Then gap-check. Open the reference checklist for each area the task touches and look for items at or below the tier that you missed and that change this task's outcome. Add those by replacing your weakest point — don't grow the answer past what was asked.
  4. Never pad. Don't add generic process items (lockfiles, hooks, scanners, CI) unless the task is about project setup or delivery. Don't paste the checklist or report it item by item unless the user asks for a review or audit.

References

AreaFile
Database and migrations — designing a schema, writing or reviewing a migration, adding a table, column, index or constraint, setting up roles, restoring a dumpreferences/database.md
Backend and concurrency — writing API routes, business logic, caching, background jobs or schedulers; handling money, rates, dates or units; anything with locks, pools, retries or concurrent usersreferences/backend-and-concurrency.md
Security — adding authentication or authorisation, exposing a service publicly, handling secrets, setting up proxies, tunnels or webhooks, copying production datareferences/security.md
Events, queues and background work — building message consumers or producers, queues, webhooks handlers, outbox/event publishing, retries, dead-letter queues or async workflowsreferences/events-and-queues.md
Data ingestion and scrapers — building scrapers, PDF/HTML/CSV parsers, ETL jobs, webhooks consumers or any pipeline that reads external datareferences/data-ingestion.md
Performance and scale — a page or endpoint is slow, adding caching, pagination or background processing, preparing for more users or data, load testing, or setting performance budgetsreferences/performance-and-scale.md
API evolution and change management — changing a public or internal API, event schema or database contract used by other teams or clients, versioning, deprecating, or rolling out risky changes with feature flagsreferences/api-evolution.md

Templates

Working, tested starting points in templates/ (adapt names and paths):

  • templates/migrate.py
  • templates/supersede.sql
  • templates/test_route_auth.py

Self-tests: templates/tests/ (needs a throwaway Postgres in DATABASE_URL).

For project kickoff, trade-offs, stack equivalents and the habits behind most review findings, see the building-production-software skill.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.