Community生產力與協作github.com

replica-deploy 正式部署

將應用程式克隆部署到使用者自己的網域上,包含預檢檢查、生產環境設定、DNS 記錄、Stripe 上線模式、監控與行動端建置。

replica-deploy 正式部署 是什麼?

這是專為 AI 代理(如 Claude Code、Cursor 等)設計的部署技能,稱為 replica-deploy。其主要功能是將一個已克隆的應用程式完整上線到使用者的自訂網域,並確保所有必要的預檢檢查通過,包括測試綠燈、功能對等、品牌重新命名、許可證清單及法律頁面。該技能支援多種平台:Vercel(預設)、Netlify、Cloudflare Pages、Fly 或 Render,並能設定生產資料庫、環境變數、Stripe 金流、OAuth 重定向、電子郵件 DNS(SPF、DKIM、DMARC)、錯誤監控(Sentry)與效能監控。行動應用部分則可建置到 TestFlight 和 Play 商店。使用時機為使用者說出「deploy it」、「ship it」、「put it live」、「connect my domain」、「go to production」、「publish the app」等指令,或是在 /replica-launch 之後。整個流程以安全為優先:使用者必須購買網域、輸入憑證,代理只負責撰寫 DNS 記錄、環境變數名稱與命令。

相容平台~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          # 退出碼 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:將生產網域新增到每個提供者的重新導向 URI 和授權來源中。需要驗證的 Google 範圍必須獲得批准,否則只有測試使用者可以登入。
  • 電子郵件:在郵件供應商處驗證寄件網域。

步驟 3:宿主與網域

預設:Vercel 用於 Next.js(否則使用 Netlify、Cloudflare Pages、Fly 或 Render)。連接儲存庫,使 main 分支部署,且拉取請求獲得預覽 URL。

使用者在任何註冊商購買網域後:

記錄名稱值
A@宿主的頂級 IP(Vercel:在網域設定中顯示)
CNAMEwww宿主的目標(Vercel:cname.vercel-dns.com)
TXT@ 或子網域宿主的驗證值(如果要求)

來自郵件供應商的電子郵件 DNS:SPF(TXT)、DKIM(CNAME 或 TXT)以及 DMARC 記錄,起始為 v=DMARC1; p=none; rua=mailto:you@yourdomain,然後在報告乾淨後收緊為 quarantine。沒有這些,你的確認郵件會進入垃圾郵件。

選擇一個主要宿主(頂級或 www)並將另一個重導向。以上宿主會自動啟用 HTTPS;請檢查。

步驟 4:監控

錯誤追蹤(Sentry 或宿主內建)、首頁及核心流程 API 的正常運行檢查、保留日誌、分析工具(隱私友善的版本可避免 Cookie 橫幅),以及向使用者的電子郵件或手機發送警報。然後自己在正式網站上執行核心流程,並請使用者在其手機上執行。

步驟 5:行動應用(如果有應用程式)

Expo:eas build 然後 eas submit 到 TestFlight 和 Play 內部測試。原生:在 Xcode 中封存,上傳到 App Store Connect;Gradle 套件上傳到 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.

相關技能