production-readiness
Skill0 starsChanged 3 months agoMITView on GitHub
Production-grade build blueprint for full-stack web apps — closes the gap between what fast AI-assisted builds treat as "done" and what shipping to real users requires. Covers APIs and trust boundaries, database/storage, auth and permissions, secrets, payments, security, background jobs and email, hosting and CI/CD, performance and scaling, testing, observability, backups/recovery, frontend basics, and cost/legal guardrails including AI/LLM API cost and abuse protection. Use proactively whenever the user is building, reviewing, hardening, or shipping a web app — especially one built fast with AI tools (Lovable, Bolt, Cursor, v0, Replit, Windsurf, Claude Code, and similar) — or says "is this production ready," "what am I missing before launch," "vibe-coded," "add auth/payments," "how do I deploy this," "harden this before real users," "my app is falling over," or "audit my app." Default is passive reference scaled to the app's stage; on audit-style requests, run the evidence-based Audit Mode.
- Reads credentials
16 other projects use a version of this.
Adopted by
Most recently taken up by
- fmind/dottheir own version, first seen Oct 5, 2026
- gilsmt/skillstheir own version, first seen Oct 4, 2026
- kleosr/bridletheir own version, first seen Sep 29, 2026
- caiaffa/claude-code-ultimate-engineering-systemtheir own version, first seen Sep 14, 2026
- KbWen/agentic-ostheir own version, first seen Sep 10, 2026
- KbWen/agent-virtual-officetheir own version, first seen Aug 16, 2026
Used with
Projects with it also use database-design, incident-response and 6 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
CloudAI-XSkilldatabase-design
Designs database schemas, indexing strategies, query optimization, and migration patterns for SQL and NoSQL databases. Use when designing tables, optimizing queries, fixing N+1 problems, planning migrations, or when asked about database performance, normalization, ORMs, or data modeling.
Also in 3 projects that use this
AnthropicSkillincident-response
Run an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs severity assessment, a status update mid-incident, or when writing a blameless postmortem after resolution.
Also in 3 projects that use this
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 3 projects that use this
OpenAISkilldispatching-parallel-agents
Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
Also in 3 projects that use this
OpenAISkillusing-git-worktrees
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback
Also in 3 projects that use this
- +3 more from openai
Other versions16 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 16
- KbWen/agentic-os★ 206same name
- magnus919/agent-skills★ 109same name
- KbWen/agent-virtual-office★ 35same name
- suhailkakar/the-skills★ 26same name
- caiaffa/claude-code-ultimate-engineering-system★ 17same name
- wpank/ai★ 11same name
- fmind/dot★ 10same name
- Vimalk0703/shipworthy★ 6same name
- dekoza/oh-my-slop★ 4same name
- gilsmt/skills★ 2same name
6 more not listed
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.
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 15 edited versions we read keep these.
2
Distinctive
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
- Distinctive: line 13
Passive reference — default: When the user is building or reviewing a specific piece (adding auth, wiring payments, picking a host), …
- Distinctive: line 60
Read replicas don't need to exist on day one, but the schema shouldn't actively block them later.
“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Production Readiness
Companion to production-agent-design. That skill closes the gap between "I got an agent to work" and "I shipped a stable one." This one closes the gap between "I got an app to run" and "I shipped one real users can hit without it falling over, leaking data, or bankrupting me on API bills."
How to use this skill
Passive reference — default. When the user is building or reviewing a specific piece (adding auth, wiring payments, picking a host), surface only the relevant section(s). Don't dump all thirteen.
Match rigor to stage. Ask (or infer) where the app is: idea / prototype / private beta / live with users / at scale. A prototype doesn't need a load balancer or a stated recovery objective — never lecture a pre-launch app about scale-tier items. Critical security items (secrets, server-side auth, injection defenses) apply from private beta onward; scale items (CDN, replicas, load balancing) apply only when traffic warrants. The checklist in references/CHECKLIST.md tags each item with its stage.
Audit Mode — active workflow. Triggered by "audit my app," "is this production ready," "what am I missing before launch," or similar. See the Audit Mode section below. The defining rule: verify with evidence, don't interview. If the codebase is accessible, inspect it — the builder often doesn't know the answers to audit questions, and "found sk_live_ hardcoded in api/stripe.js:40" is worth ten questionnaire answers.
The gap, made concrete
| Layer | What "done" looks like to a novice | What production actually requires |
| Architecture & APIs | Frontend calls backend, done | Explicit contracts, server-side validation at every trust boundary, idempotent webhooks |
| Database & storage | "I have a database" | Versioned migrations, indexes, connection pooling, object storage for files |
| Auth & permissions | "I added a login button" | Server-side authorization on every action, secure token handling, real role model |
| Secrets & config | API keys pasted into the code | No secrets in git or the client bundle, distinct creds per environment |
| Payments & billing | "Stripe checkout works" | Idempotent webhooks as source of truth, full subscription lifecycle, tested refund path |
| Security | "I have auth, so I'm secure" | Least privilege, injection defenses, dependency scanning, rate-limited auth endpoints |
| Jobs & email | Everything runs in the request handler | Queued background work with retries; transactional email that actually delivers |
| Hosting & CI/CD | "I clicked deploy" | Environments + promotion path, CI gating merges, automated deploys, tested rollback |
| Performance & scale | "It's fast when I test it" | Rate limiting, deliberate caching, CDN, no single-instance assumptions |
| Testing & QA | "I clicked through it myself" | Automated tests on critical paths, CI-enforced, staging that predicts prod |
| Observability | "I'll check the console" | Centralized logs, error tracking with alerting, uptime checks, an incident plan |
| Availability & recovery | "My data's in the database" | Tested (not just scheduled) backups, stated recovery objectives, graceful degradation |
| Frontend | "The happy path renders" | Error boundaries, loading/empty states, basic accessibility, SEO on public pages |
| Cost & compliance | Not thought about until it's a problem | Budget alerts (especially LLM APIs), real privacy policy/ToS, an answer for "delete my data" |
1. Application Architecture & API Design
- Separate presentation, business logic, and data access — API routes aren't a dumping ground for logic that should be testable and reusable.
- API contracts are explicit and versioned (even just shared TS types or a lightweight OpenAPI spec) so frontend and backend don't silently drift.
- Third-party integrations and webhooks are untrusted, unreliable inputs by default: verify signatures, make handlers idempotent, design for out-of-order delivery.
- Server-side validation at every trust boundary, regardless of what the client already checks — client validation is UX, not security.
- The backend never trusts client-supplied "facts" it can verify itself — prices, permissions, ownership are recomputed server-side, not taken as given.
- Errors are structured and typed, never a raw stack trace leaking to the client.
Evidence: grep API routes for validation on request bodies; check webhook handlers for signature verification; look for prices or role flags read from the client payload.
2. Database & Storage
- Schema migrations are version-controlled and reversible — no hand-editing prod schema in a GUI.
- Indexes exist on anything queried at scale; the app that's fine at 100 rows and falls over at 100k is an indexing problem, not a "bigger database" problem.
- Referential integrity enforced at the DB level, not just in app logic.
- File uploads live in object storage with signed URLs, never on the app server's local disk — local disk disappears on redeploy.
- Connection pooling is configured — serverless functions opening a fresh DB connection per request exhaust the connection limit fast.
- Read replicas don't need to exist on day one, but the schema shouldn't actively block them later.
Evidence: look for a migrations/ directory; check schema files for indexes and foreign keys; grep for fs.writeFile or local upload paths; check the DB client for pooling config.
3. Identity, Auth & Permissions
- Authentication (who you are) is cleanly separated from authorization (what you can do) — every protected action checks permissions server-side, never just hides a button client-side.
- Tokens/sessions use HttpOnly + Secure + SameSite cookies or equivalent — not localStorage, where any injected script can read them.
- A role/permission model exists explicitly before the app has three user types improvised by scattered if-statements.
- Multi-tenant apps isolate data by tenant/account ID at the query level, and that isolation is tested, not assumed.
- Password reset, email verification, and account recovery flows exist and are tested — which means transactional email works (see Section 7).
Evidence: grep for localStorage.setItem with token-like names; sample a few mutating API routes and confirm each checks the session's permissions, not just presence of a session; check tenant-scoped queries for the tenant ID filter.
4. Secrets & Environment Configuration
- Secrets never committed to git — enforced by a scanner or pre-commit hook, not discipline. Check git history, not just the working tree.
- Secrets never shipped to the client bundle — anything imported into frontend code is public; only explicitly public-prefixed values belong there.
- Distinct config and credentials per environment — staging pointed at the prod database is a common, expensive mistake.
- Secrets live in the host's env var system or a secrets manager, so rotation doesn't require a redeploy-and-pray.
.env.exampleis committed,.envis gitignored — a new contributor (or future you) can bootstrap without guessing.
Evidence: grep the repo and git history for sk_live, sk-, AKIA, -----BEGIN, password-like strings; check .gitignore covers .env; check frontend imports for non-public env vars.
5. Payments & Billing
- PCI scope is avoided, not managed — raw card numbers never touch your server; use the processor's hosted checkout or elements.
- Webhooks are the source of truth for payment state, not the client-side "success" redirect — a closed tab shouldn't mean a paying user never gets access.
- Webhook handlers are idempotent — processors retry delivery, so the same event twice must not double-grant, double-charge, or double-email.
- Subscription lifecycle handled end to end: upgrades, downgrades, failed renewals (dunning), cancellations, access state mid-cycle.
- Refunds, disputes, and chargebacks have a defined process before the first one happens.
- Sandbox and live keys never mixed; the full purchase flow gets a real test pass before going live.
- Tax handling (VAT/sales tax) is at least considered, not silently ignored until a jurisdiction notices.
Evidence: find the webhook handler; check for signature verification and an idempotency guard (event ID dedupe); check where access is granted — redirect handler or webhook?
6. Security & Data Access
- Least privilege on every credential — DB users, API keys, service accounts get only the access they need, not admin-on-everything.
- Injection defenses by default: parameterized queries/ORMs, output encoding on anything rendered from user input.
- Dependency scanning flags known-vulnerable packages before an attacker finds them first.
- Encryption in transit everywhere, at rest for anything sensitive.
- Rate limiting on auth endpoints specifically — login, signup, password reset — to blunt credential stuffing and enumeration.
- CORS configured intentionally, not wildcard-open because it made an error message go away.
Evidence: grep for string-interpolated SQL; run npm audit / pip-audit; check CORS config for *; look for rate-limit middleware on auth routes.
7. Background Jobs & Email
- Work that outlives a request — sending email, processing uploads, calling slow APIs, scheduled tasks — runs in a queue or job runner with retries, not inline in the handler. This is the most common "works locally, breaks on serverless" failure: the platform kills the function the moment the response returns.
- Jobs are idempotent and retried with backoff; a failed job is visible somewhere, not silently dropped.
- Scheduled work uses the platform's scheduler (cron jobs, scheduled functions), never a
setIntervalin a process that can be killed or duplicated. - Transactional email (resets, receipts, verification) goes through a real provider with SPF/DKIM configured — not SMTP from the app server, which lands in spam.
- Email sends are triggered from the backend on verified events, not from client-side code.
Evidence: grep handlers for slow inline work (email sends, long API calls) after which the response depends; check for setInterval/setTimeout used as a scheduler; look for a mail provider SDK vs. raw nodemailer SMTP.
8. Hosting, Compute & CI/CD
- Distinct dev/staging/prod environments with a promotion path — changes don't go straight from a laptop to production.
- CI runs tests and linting on every push/PR before merge is possible.
- Deploys are automated and repeatable from version control; main stays deployable; no manual drag-and-drop or SSH-and-edit.
- Rollback is a known, tested action — reverting a bad deploy is fast and doesn't require reconstructing what changed.
- Compute model understood, not assumed: serverless (cold starts, time limits, no persistent local state) vs. long-running server (own scaling/restart strategy) — the app is built for the actual model.
- Deploy is decoupled from release where it matters — a feature flag or config toggle lets risky features ship dark and roll out (or back) without a redeploy.
- Branch protection on main — no direct pushes, no force-push rewriting shared history.
Evidence: look for .github/workflows/ or CI config; check whether a test script exists in package.json and CI actually runs it; check the host config for environment separation.
9. Performance & Scale
- Rate limiting on public or expensive endpoints — one script shouldn't be able to take the app down or run up the bill. LLM-backed endpoints get per-user rate limits and usage caps — an unmetered AI endpoint is an open invitation to drain your API budget.
- The LLM provider key lives server-side only, never in client code, and streaming responses have timeouts.
- Caching applied deliberately at the right layer (CDN for static assets, app-level cache for expensive queries, HTTP cache headers) with invalidation thought through up front.
- The app never assumes a single server instance — session state, file writes, and in-memory caches that only live on "the" server break the moment there's more than one instance or a serverless redeploy.
- Database queries checked for N+1 patterns and missing indexes before they're a five-second page load.
- A load balancer (or platform equivalent) with health checks fronts anything running multiple instances.
Evidence: grep for in-memory session/state maps; check LLM API calls for a per-user limit; look for provider keys referenced in frontend code; check ORM query patterns in list views for N+1.
10. Testing & QA
- Automated tests cover critical paths — auth, payments, core user flows — because manual click-through doesn't scale and doesn't run on every change.
- CI blocks merges on failing tests; tests that exist but aren't enforced are documentation, not protection.
- A staging environment mirrors production closely enough that "works in staging" predicts "works in prod."
- Edge cases and failure states get tested deliberately — empty states, network failures, expired sessions, concurrent edits — not just the happy path.
- Regressions get a test added, not just a manual fix, or the same bug reappears next quarter.
Evidence: does a test directory exist and do the tests test anything real? Is the test command wired into CI?
11. Observability & Incident Response
- Centralized logging that survives past the current terminal session or serverless invocation.
- Error tracking captures production exceptions with enough context (stack trace, user/request ID) to debug, and alerts a human.
- Uptime/health checks on the app and its critical dependencies — "someone will notice it's down" isn't a monitoring strategy.
- Basic metrics on what matters: request latency, error rate, and the app's core business metric.
- An actual, even lightweight, "it's down, now what" plan: who gets paged, where status is communicated, what the rollback path is.
Evidence: look for an error-tracking SDK (Sentry or similar) initialized in both frontend and backend; check whether logs go anywhere durable.
12. Availability & Recovery
- Backups are automated and tested by an actual restore — a backup nobody has ever restored from is a hypothesis.
- A stated recovery point/time objective exists, even informally — how much data loss and downtime is acceptable.
- Graceful degradation when a dependency fails — a third-party API outage shouldn't take down the whole app if that feature could fail softly.
- Health checks and auto-restart for crashed processes — a crash shouldn't require a human to notice.
- Disaster recovery isn't backups alone — a full-region outage, an accidental prod DB drop, and a bad deploy each need a known response.
13. Frontend Production Basics
- Error boundaries catch render failures — one broken component shouldn't white-screen the app.
- Loading, empty, and error states exist for every data-driven view — the happy path is a third of the states users actually see.
- Basic accessibility: semantic HTML, labeled inputs, keyboard navigation, sufficient contrast. Not a full WCAG program — the floor, not the ceiling.
- Public pages have real titles, meta descriptions, and OG tags — the app will be shared in links before it's found in search.
- The client handles an expired session gracefully (redirect to login), not with a wall of failed requests.
14. Cost, Legal & Compliance Guardrails
- Budget/usage alerts on cloud and paid API spend — especially LLM APIs, where a retry loop or one abusive user can burn a month's budget in an hour. A bug shouldn't be discovered via the invoice.
- Usage monitored on what actually costs money: compute, API calls, tokens, storage, egress — not just uptime.
- A privacy policy and ToS exist and match what the app actually does with user data — including what's sent to third-party AI providers.
- Data retention and deletion handled — "delete my account" has a real, working answer.
- Awareness of applicable regulations (GDPR/CCPA and similar) scales with what data is collected — not a full compliance program on day one, but not ignored.
Audit Mode
Triggered by "audit my app," "is this production ready," "what am I missing before launch." Finish each phase before the next — don't fix things mid-audit.
| Phase | What happens | Output |
| 1. Intake | What's built, stack, stage (prototype / private beta / live / at scale), what the builder already knows is missing | Shared scope |
| 2. Repo scan | If the code is accessible: run the Evidence checks from each section against the actual codebase — grep for secrets, check for migrations and CI config, inspect webhook handlers, audit dependencies. Only fall back to questions for what can't be verified (hosting config, backup schedules, whether a restore was ever tested). | Concrete findings with file:line references |
| 3. Section pass | Walk all 14 sections; classify each Covered / Partial / Missing / N/A for this app at its stage | Per-section status |
| 4. Gap report | Group findings: Critical (ship-blocking or security-critical) / Important (before real users) / Nice-to-have (before scale). Cite evidence: "found sk_live_ in api/stripe.js:40" beats "consider checking for secrets." | Prioritized gap report |
| 5. Roadmap | Sequence fixes by risk × effort into a short ordered punch list | Actionable next steps |
The evidence-first rule exists because the builder often can't answer audit questions accurately — they don't know whether connection pooling is configured or whether tokens are in localStorage. The code knows. Ask only what the code can't tell you.
The launch checklist lives in references/CHECKLIST.md — run it before any real users touch the app. Each item is tagged with the stage at which it becomes mandatory.
How to apply this skill — examples
"I vibe-coded a SaaS tool with Lovable and want to start charging for it — what am I missing?" → Audit Mode. Intake stack/stage, scan the repo if accessible, flag Payments and Auth as near-certain gaps for a fast AI-assisted build, produce a prioritized punch list.
"How do I add authentication to my Next.js app?" → Passive reference, Section 3 only. Server-side authorization and secure token handling. Don't dump the other 13 sections.
"My app is getting real traffic and it's falling over." → Passive reference, Sections 9 and 2 — likely N+1 queries, missing indexes, or single-instance assumptions. Check the evidence patterns before guessing.
"Add a 'generate with AI' feature to my app." → Passive reference, Section 9's LLM bullets + Section 14's cost bullets: per-user rate limits, server-side key, usage caps, budget alerts.
"Audit this before I open it up to paying customers." → Full Audit Mode, all five phases, ending in the evidence-cited gap report and roadmap.
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.

