跳到正文
Skillpedia
通用编程7.1k · #13575

replica-architect

它能做什么

这个技能为一个复制现有应用功能的新应用规划技术设计,使用之前制作的功能地图。适合希望获得实用方案、使用托管服务并拥有清晰构建顺序的开发者。

适用场景

  • ✓当你手上有某个应用的功能地图,需要为你的版本选择技术栈时。
  • ✓当你希望根据数据模型规划数据库结构和 API 路由时。
  • ✓当你希望在构建完整应用之前,先把工作安排为一个小型可工作切片时。

技能链接

https://github.com/Jakeschincariol/replica-skill/blob/main/replica-architect/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/Jakeschincariol/replica-skill/blob/main/replica-architect/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我有一个想要重建的应用的功能地图。你能为它规划技术栈、数据库结构和 API 吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会读取现有的功能地图,选择简单、可托管的工具,并为每个工具给出一句理由;然后把数据模型转化为带有索引和访问规则的 SQL 表。接着,它会按流程列出路由并安排构建顺序。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

replica-architect

Reads replica/recon.md and replica/features.csv. Writes replica/architecture.md (template: architecture.md in this folder).

If there is no recon map, stop and run /replica-recon first. Planning a clone from memory of what an app does is how you miss half of it.

Step 1: the stack

Use what the user already knows if they have a stack. Otherwise the default, because every part is managed, documented and cheap at zero users:

layer default swap for
web app Next.js (App Router) + TypeScript Remix, SvelteKit, Rails
styling Tailwind, tokens from replica-design CSS modules
mobile Expo (React Native) SwiftUI, Kotlin
database Postgres on Supabase or Neon PlanetScale, SQLite (Turso)
ORM Drizzle or Prisma raw SQL
auth Supabase Auth or Auth.js Clerk
payments Stripe Checkout + Billing Lemon Squeezy, Paddle
email Resend or Postmark SES
jobs Vercel Cron, Inngest or Trigger.dev a worker on Fly
files Supabase Storage or Cloudflare R2 S3
hosting Vercel Netlify, Fly, Render

Write each choice with one line of why. One database. No microservices. The clone does not need the original's architecture, it needs the original's features.

Step 2: the schema

Turn the inferred data model into SQL. For every table:

  • id uuid primary key default gen_random_uuid(), created_at, updated_at
  • an owner column (user_id or org_id) on everything a user owns
  • foreign keys with an on delete rule decided, not defaulted
  • indexes on every foreign key and every column you filter or sort by
  • enums or check constraints for status fields
  • times as timestamptz, always, stored in UTC
  • money as integer cents plus a currency column
  • access rules: Postgres row level security on Supabase, or one authorisation check per query in the data layer. Write which.

Example, for a booking app:

create table bookings (
  id uuid primary key default gen_random_uuid(),
  event_type_id uuid not null references event_types(id) on delete cascade,
  host_id uuid not null references users(id) on delete cascade,
  start_at timestamptz not null,
  end_at timestamptz not null,
  guest_name text not null,
  guest_email text not null,
  guest_timezone text not null,
  status text not null default 'confirmed'
    check (status in ('confirmed','cancelled','rescheduled')),
  answers jsonb not null default '{}',
  created_at timestamptz not null default now(),
  constraint no_zero_length check (end_at > start_at)
);
create index on bookings (host_id, start_at);

Then the hard constraints the recon found. Two guests booking the same slot is a database problem (an exclusion constraint or a unique index), not a UI problem.

Step 3: the API

One table per flow from the recon map. For every route or server action:

method path | what it does | who can call it | input | output | flow

Plus webhooks in (Stripe, calendar providers) and out, and background jobs (reminders, sync, cleanup) with their schedule.

Only official, public APIs with the user's own keys. Never the original app's private endpoints, even if they are visible in a browser.

Step 4: the parts that bite

Write a line on each that applies: time zones and daylight saving, idempotency (webhooks arrive twice), race conditions, rate limits, file size limits, search, realtime, offline, email deliverability, multi-tenancy, GDPR deletion.

Step 5: build order

  1. Vertical slice. The core loop end to end, ugly: sign up, do the one thing, see the result. Proves the stack.
  2. Must-haves from features.csv, by area.
  3. Should-haves, then could-haves.
  4. The fixes replica-entrepreneur finds, once it has run.

Each milestone lists its screens (S-IDs), tables and routes.

Output

replica/architecture.md, the SQL in replica/schema.sql or as the first migration, and a summary: stack in one line, table count, route count, the three riskiest parts, and the next step: /replica-design.

常见问题

我需要先有侦察地图吗?

需要。如果没有功能地图,该技能会停止,因为凭记忆规划会遗漏功能。

它默认使用什么技术栈?

它默认使用 Next.js、Postgres、Stripe 和 Vercel 等工具,你可以替换任何一个。

它会复制原应用的架构吗?

不会。该技能说明,复制品需要的是功能,而不是原应用的内部架构。

详情

作者的原始描述

Plans the stack, database schema and API for an app clone, from the recon map replica-recon wrote. Picks boring, managed tech, turns the inferred data model into real SQL with indexes and access rules, lists every route by flow, and orders the build as a thin vertical slice first. Use when the user says "plan the clone", "what stack should I use", "design the database", "write the schema", "plan the API", "architecture for my version of X", or after /replica-recon finishes.

repo: Jakeschincariol/replica-skill

热度

GitHub 星标
7.1k
排名
#13575
许可证
MIT
更新时间
2026/10/3

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能