Community生产力与协作github.com

replica-deploy 生产部署技能

将应用克隆版部署到用户自己的域名上:包含预检门控(测试通过、功能对等、品牌清理、上架检查、法律页面)、生产数据库和环境变量、主机、域名和邮件DNS记录、Stripe生产模式、OAuth重定向、监控以及移动端构建(TestFlight和Play)。当用户说“部署”、“发布”、“上线”、“连接我的域名”、“进入生产”、“发布应用”或执行 /replica-launch 后使用。

replica-deploy 生产部署技能 是什么?

该技能旨在将应用克隆版本一键部署到用户的生产环境,确保安全、稳健且完全品牌化。它从 `replica/` 目录读取配置,并逐步执行:首先运行全面的预检检查(测试、功能对等、品牌清理、生产构建),通过后创建独立的生产数据库、设置环境变量、配置 Stripe 生产模式、更新 OAuth 重定向 URI 和邮件 DNS 记录(SPF、DKIM、DMARC)。然后配置主机(默认 Vercel,也支持 Netlify、Cloudflare Pages、Fly 或 Render)、设置用户购买的域名和 DNS 记录,并启动监控、错误跟踪和分析。如果存在移动端应用,还支持使用 Expo 或原生工具构建并提交到 TestFlight 和 Play Console。最终输出完整的 `deploy.md` 清单,用户需手动执行账户相关步骤(如购买域名、输入支付信息等),确保用户始终掌控生产上线。

兼容平台~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/silasroliver-hue/replica-skill-cursor/tree/HEAD/.cursor/skills/replica-deploy

Installed? Explore more 生产力与协作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

replica-deploy

读取 replica/ 中的所有内容。写入 replica/deploy.md(即本文件夹中 preflight.md 内清单的填写版本)。

规则

  • 未经用户同意,绝不发布到生产环境。 显示预检结果并询问。
  • 用户购买并登录。 智能体绝不购买域名、输入卡号、键入密码或粘贴生产密钥。智能体写出确切的 DNS 记录、环境变量名称和命令;用户执行账户相关步骤。
  • 品牌未完成前绝不发布。 清理必须彻底,无例外。

步骤 1:预检

运行每一项检查,并将结果粘贴到 deploy.md:

npx playwright test                                                                  # replica-test
python3 .cursor/skills/replica-diff/parity.py replica/features.csv                   # 必须完成的对等功能
python3 .cursor/skills/replica-brand/sweep.py . --config replica/brand.json          # exit 0:通过
python3 .cursor/skills/replica-launch/listing.py replica/launch/listing.json         # 如果需要提交至商店
npm run build                                                                        # 生产构建通过

(路径假设包位于项目根目录的 .cursor/skills/ 下。如果将文件夹复制到了其他位置,请将 python3 命令指向相应路径。)

另外手动检查:不存在未关闭的 S1 或 S2 漏洞,隐私政策和条款页面已上线(列出所有数据处理方),如果在欧盟或英国使用非必要 Cookie 则需要 Cookie 横幅,账户删除功能正常工作,favicon、标题和 OG 图片均为你的品牌。

任何检查失败都会停止部署。说明是哪个检查以及失败原因。

步骤 2:生产服务

  • 为数据库创建一个独立的生产项目(绝不用开发环境项目),启用备份,迁移由部署流程运行,而非手动操作。
  • 在主机中设置生产环境变量,与 .env.example 一致。仅在此处使用生产密钥。
  • Stripe:切换到生产模式,重新创建产品和价格,添加生产 webhook 端点及其签名密钥,测试一次真实购买并退款。
  • OAuth:将生产域名添加到每个提供商的 redirect URI 和授权来源中。需验证的 Google 范围必须获得批准,否则只有测试用户可以登录。
  • 邮件:与提供商验证发送域名。

步骤 3:主机和域名

默认:Next.js 使用 Vercel(否则使用 Netlify、Cloudflare Pages、Fly 或 Render)。连接仓库,使 main 分支自动部署,拉取请求获得预览 URL。

用户在任意注册商处购买域名后:

记录类型名称值
A@主机的 apex IP(Vercel:域名设置中显示)
CNAMEwww主机的目标地址(Vercel:cname.vercel-dns.com)
TXT@ 或子域名主机的验证值(如果需要)

来自邮件提供商的邮件 DNS:SPF(TXT 记录)、DKIM(CNAME 或 TXT 记录),以及以 v=DMARC1; p=none; rua=mailto:you@yourdomain 开头的 DMARC 记录,待报告清洁后收紧为 quarantine。缺少这些记录,确认邮件将进入垃圾邮件箱。

选择一个规范主机(apex 或 www)并将另一个重定向。上述主机自动支持 HTTPS;请检查确认。

步骤 4:监控

错误追踪(Sentry 或内置的主机监控)、对首页和核心流程 API 进行正常运行时间检查、日志保留、分析工具(隐私友好的分析工具可避免 Cookie 横幅),以及向用户邮箱或手机发送警报。然后亲自在线上站点执行核心流程,并请用户在手机上执行。

步骤 5:移动端(如果有应用)

Expo:运行 eas build 然后 eas submit 提交至 TestFlight 和 Play 内部测试。原生应用:在 Xcode 中归档并上传至 App Store Connect;使用 Gradle bundle 上传至 Play Console。用户拥有开发者账户(Apple 每年 99 美元,Google 一次性 25 美元)。先进行 Beta 测试,然后结合 replica-launch 的上架信息进行审核。

输出

replica/deploy.md,包含每项检查及其结果、线上 URL、设置的 DNS 记录以及第一周需要监控的内容。现在,克隆版本已成为带有你名字的应用。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

silasroliver-hue/replica-skill-cursor

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

silasroliver-hue/replica-skill-cursor

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

silasroliver-hue/replica-skill-cursor

>- Names and rebrands an app clone so it is the user's own: name candidates with the trademark, domain, store and handle checks to run, a new palette checked for contrast, a logo brief, a voice guide, and a sweep tool that finds anything of the original left in the codebase. Use when the user says "name my app", "rebrand the clone", "make it mine", "pick a name and colours", "logo brief", "brand voice", "check for leftovers", or after /replica-entrepreneur. Always runs before /replica-launch.

silasroliver-hue/replica-skill-cursor

>- Rebuilds an app screen by screen from the recon map: app shell first, then the core flow as a vertical slice, then every screen with all its states, ticking off the feature matrix as it goes. Writes every line fresh, never the original's code, assets or copy. Use when the user says "build the clone", "build screen S07", "start building", "rebuild this screen", "implement the booking page", or after /replica-design.

相关技能