Skip to main content
skill CX Codex

replica-backend — Claude Code skill: backend for an app clone

Builds the backend of an app clone: auth, database migrations and access rules, Stripe payments, email and background jobs. Reads replica/architecture.md and keeps a checklist in replica/backend.md.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Jakeschincariol/replica-skill --skill replica-backend -a claude-code
Open on GitHub

What replica-backend does

The skill works from the map left by recon: it reads replica/architecture.md, writes migrations and server code, and keeps replica/backend.md up to date with the checklist ticked. Auth covers email sign up with verification, password reset, magic link if the original has one, and OAuth through your own Google or Apple developer apps. Sessions use http-only secure cookies, and roles with teams come with a single function that answers whether this user can do this to this record.

Payments run through Stripe Checkout and the Customer Portal; card forms are not built. Webhooks verify the signature, store the event id, and every handler is idempotent because Stripe retries. Subscription status lives in your database, updated by webhooks. Cancelling takes one click, and hard-to-cancel billing is a top complaint about most apps and illegal in many places.

You create the accounts and keys. The skill never signs up for services and never types a password or a live key: you set up the Stripe, Supabase, Resend or Google Cloud project, values go into .env.local, and the skill writes .env.example listing every variable name with no values. Until deploy, everything stays on Stripe test keys and test cards. Watch the calendar: Google scopes like Calendar need Google's OAuth verification before public launch, which takes weeks, so start it early.

What it helps with

  • ship email sign up with verification and password reset
  • write migrations and per-table access rules
  • wire Stripe Checkout and handle subscription webhooks
  • send transactional email from your own domain
  • run background jobs with retries and a dead-letter log

Example prompts for the agent

  • add login to my clone
  • connect Stripe and set up subscriptions
  • set up emails and background jobs

How to install replica-backend

1Skills CLI (Vercel)

npx skills add Jakeschincariol/replica-skill --skill replica-backend -a claude-code

2Manually: put the files in place

~/.claude/skills/replica-backend/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/replica-backend/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about replica-backend

How do I install replica-backend in Claude?

Run npx skills add Jakeschincariol/replica-skill --skill replica-backend -a claude-code. The skill lands in ~/.claude/skills/replica-backend/SKILL.md.

What does replica-backend do?

It builds the server side of an app clone: auth, migrations and access rules, Stripe payments, email, background jobs and integrations through official APIs. It also keeps a security checklist in replica/backend.md.

Which keys does it need?

Your own. You create the Stripe, Supabase, Resend or Google Cloud project and put values in .env.local; the skill writes .env.example with every variable name and no values, and stays on Stripe test keys until deploy.

Source text

SKILL.md · MIT
---
name: replica-backend
description: >-
  Builds the backend of an app clone: auth, database migrations and access
  rules, payments with Stripe, email, background jobs and third-party
  integrations through official APIs only, plus a security checklist. Use when
  the user says "add login", "set up auth", "wire up the database", "add
  payments", "connect Stripe", "add Google Calendar", "send emails",
  "backend for my clone", or when /replica-build is running on fake data.
---

# replica-backend

Reads `replica/architecture.md`. Writes migrations and server code, and keeps
`replica/backend.md` (checklist below) up to date.

## The rules

- **Official, public APIs only, with the user's own keys.** Never call the
  original app's private endpoints, never reuse its OAuth client, never proxy
  through it.
- **The user creates accounts and keys.** Claude never signs up for services,
  never types a password, card or live key. The user creates the Stripe,
  Supabase, Resend or Google Cloud project and puts keys in `.env.local`.
  Claude writes `.env.example` with every variable name and no values.
- **Test mode first.** Stripe test keys and test cards until replica-deploy.

## Auth

- Email sign up with verification, password reset, magic link if the original
  has it. OAuth (Google, Apple) with the user's own developer apps.
- Sessions: http-only secure cookies. Sign out everywhere.
- Roles and teams if the recon map has them: owner, admin, member, with one
  function that answers "can this user do this to this record".
- Account deletion that actually deletes. Apple requires it for apps with
  sign up.

## Database

- Migrations from `architecture.md`, checked in, run by a script.
- Access rules on every table: row level security policies on Supabase, or
  the authorisation function called in every query. Test it: a second user
  must get nothing back.
- Seed script with realistic fake data (no real people).
- Backups on (the host's daily backups count, check they are enabled).

## Payments

- Stripe Checkout for sign up to a plan, the Customer Portal for changes and
  cancelling. Do not build card forms.
- Webhooks: verify the signature, store the event id, make every handler
  idempotent (Stripe retries). Handle `checkout.session.completed`,
  `customer.subscription.updated`, `customer.subscription.deleted`,
  `invoice.payment_failed`.
- Subscription status lives in your database, updated by webhooks, read by
  your app. Never trust the client.
- Cancelling is one click. Hard-to-cancel billing is a top complaint about
  most apps, and in many places it is illegal.

## Email and jobs

- Transactional email through Resend or Postmark from your own domain.
  Templates written fresh.
- Jobs for anything time-based (reminders, digests, sync, cleanup) with
  retries and a dead-letter log. Times in UTC, shown in the user's zone.

## Integrations

For each integration in the feature matrix: the official API, the OAuth
scopes needed (fewest possible), the provider's review process, rate limits.
Google scopes like Calendar need Google's OAuth verification before public
launch, which takes weeks. Start it early and write that in `backend.md`.

## Security checklist

- [ ] secrets only in env vars, `.env*` in `.gitignore`, nothing in client bundles
- [ ] input validated on the server (zod or similar) on every route
- [ ] authorisation checked on every read and write, tested with a second user
- [ ] rate limits on auth, sign up, and anything that sends email or SMS
- [ ] webhooks verify signatures
- [ ] uploads: size and type limits, served from a separate domain or bucket
- [ ] no user data in URLs or logs
- [ ] dependencies audited (`npm audit`)
- [ ] privacy policy lists every processor (Stripe, Resend, host, analytics)

## Output

Working auth, database, payments in test mode, email and the integrations,
`.env.example`, `replica/backend.md` with the checklist ticked, feature
matrix rows updated. Next: `/replica-test`.

© Jakeschincariol · MIT · Jakeschincariol/replica-skill

Similar skills

Everything for Backend and APIs →

From the same set10

replica-test Tests every flow in an app clone, builds a test plan, runs end-to-end checks, and records reproducible bugs with evidence. CX Codex +1 633installs replica-design Rebuild an app clone’s design system from screenshots as tokens, styles and component specs. Use it when you need to match interface structure and component behaviour. CX Codex +1 630installs replica-diff Measures an app clone against the original by calculating feature parity scores from a matrix and diffing UI layouts without penalizing rebrands. CX Codex +1 625installs replica-build Rebuilds an app screen by screen from the recon map: shell first, then the core flow, then every screen with all its states. Useful when you need to reproduce a product in your own code. CX Codex +1 622installs replica-launch Creates launch materials for an app clone: a landing page, pricing, store copy and a launch plan. Use it after you have positioning and brand research. CX Codex +1 619installs replica-architect Plans the stack, database schema and API routes for an app clone, working from the recon map replica-recon produced. Useful once recon is done and you need a build plan. CX Codex +1 618installs replica-brand Names app clones, sets up contrast-checked palettes, writes logo briefs, and sweeps original brand remnants from code. CX Codex +1 617installs replica-deploy Prepares an app clone for release on your own domain with preflight checks, production setup and DNS guidance. Use it before going live. CX Codex +1 616installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor