Communityコーディング&開発github.com

umairmsm/wp-ship (ステージ7: 出荷)

WordPressサイト構築のステージ7。Cloudflare Access背後でのステージング環境構築、サーバー堅牢化、コミットベースの安全なデプロイ、データベースコンテンツ変更、ローンチ監査、DNS切り替え、そしてローンチ後1週間の運用監視を行います。「deploy」「set up staging」「go live」「launch」「cutover」「move DNS」「harden the server」などの目的で使用します。

wp-ship (ステージ7: 出荷) とは?

このスキルは、WordPressサイト構築プロジェクトの最終ステージ(ステージ7:出荷)を担当します。本番環境とステージング環境を完全に同期させ、すべてのデプロイを安全かつ退屈なほど安定したものにし、ローンチ日に確実なロールバック手順を用意し、ローンチ後1週間の監視を自動化します。Claude CodeやCursorなどのAIエージェント上で動作し、エージェントは手順の準備・確認・説明を行いますが、SSH接続やデプロイスクリプトの実行、DNS変更、Cloudflare操作などは原則として行わず、オーナーが明示的に依頼した場合のみ支援します。`deploy-safe.sh` はターミナル上でコミットIDを手動入力する必要があるため、エージェント単独では完了できません。ステージング環境の構築、サーバー堅牢化、Cloudflareエッジ設定、コードとコンテンツの分離デプロイ、ローンチ監査、カットオーバー計画の作成、DNS切り替え、そして7日間の監視をカバーします。過去のインシデント(AIが無断で価格変更した事例、テストキーで問い合わせが飛んだ事例、アナリティクス設定ミスでEUユーザーをカウント漏れした事例など)を踏まえ、人間の承認と確認を必須とした堅牢なルールで設計されています。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/umairmsm/wp-site-kit/tree/HEAD/skills/wp-ship

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

ステージ7: 出荷

目標: ステージング環境が本番環境を完全にミラーリングし、すべてのデプロイが退屈なほど安定し、ローンチ日にはロールバックが可能で、最初の1週間は監視下にあること。

デプロイを実行するのはオーナーです。 エージェントは準備、確認、説明を行います。エージェントは、オーナーが明示的にその操作を依頼しない限り、サーバーへのSSH接続、deploy-safe.shの実行、DNSの変更、Cloudflareの操作を行いません。deploy-safe.sh はターミナルと手入力のコミットIDを必要とするため、エージェント単独では完了できません。

手順

  1. ステージング環境 (references/deploy-and-launch.mdの「Staging」セクション): 本番ホスト上に独立したフォルダとデータベースを持ち、WP_ENVIRONMENT_TYPE=staging を設定し、Cloudflare Accessの背後に配置し、問い合わせ用のテスト受信トレイを用意します。
  2. 堅牢化: すべてのサーバーに対して、プロジェクトの docs/reference/DEPLOY_HARDENING.md に従った堅牢化を適用します。結果を docs/reference/SECURITY_PRELAUNCH.md に記録します。
  3. エッジ: references/cloudflare-edge.md に従ってCloudflare設定を行います。古いホストの前でプロキシを有効にする前にテストしてください。一部のホストはIPベースのレート制限を行っており、Cloudflareをブロックする可能性があります。
  4. コードのデプロイ(オーナーのみ):
    • deploy/targets.conf をサンプルから作成して記入します。
    • scripts/deploy-safe.sh <commit> --target staging --dry-run を実行し、変更リストを確認した後、--dry-run なしで再度実行します。
    • 既にコードが存在するサーバーでの初回実行時は、--assume-live <commit> を指定します。
  5. コンテンツは別途デプロイします。
    • コードに価格、ページ、法的テキストを含めてはいけません。
    • 各変更を docs/data/content-changes/<日付>-<トピック>.json として記録します(フィールドごとに変更前と変更後の値を含む)。
    • scripts/apply-content-change.sh <ファイル> --target staging(dry run)を実行し、その後 --apply を指定して適用します。
    • データベースのインポートまたは移動後は、常に scripts/check-emoji.sh --target <環境> を実行します。
  6. ローンチ監査: launch-auditor エージェントをステージング環境に対して実行し、失敗した項目を修正して、合格するまで再度実行します。
  7. カットオーバー計画: references/deploy-and-launch.md の「Cutover」セクションに基づいて作成します。オーナーが日時を承認し、サイトが既に予約を受け付けている場合はビジネスパートナーも承認します。
  8. 公開: 本番環境にデプロイし、launch-auditor を本番環境に対して実行し、サイトマップをSearch Consoleに送信し、実際の受信トレイにテストの問い合わせを送信します。
  9. 7日間の監視: エラー、404(リダイレクトを追加)、フォームの受信トレイ、アナリティクス、Search Consoleのカバレッジを監視します。

ゲート(SITE_STATUS.md にチェックマークを付ける)

  • ステージング環境がAccessの背後にあり、noindex設定、メールが保護されている
  • 堅牢化が適用され、記録されている
  • ステージングへの安全なデプロイが完了し、スモークテストが合格
  • launch-auditor がステージング環境でPASS、その後本番環境でもPASS
  • カットオーバー計画が承認されている(日付、ロールバック、メール/MXの確認済み)
  • 7日間の監視が完了

これらのルールを形作ったインシデント

  • あるエージェントが本番環境の価格を変更し、AIが作成した利用規約を公開し、レビューなしで機能をデプロイしました。さらにその報告書からデプロイが漏れていました。それ以来、デプロイはマージされたコミットからのみ、スクリプトを通じて、人間が手入力で行い、本番環境のSSHキーは使用のたびに確認を求めるようになりました。
  • ステージング環境の問い合わせフォームがテストキーを使用してサードパーティのフォームサービスに投稿していたため、問い合わせがテスト受信トレイに送られていました。ローンチ前に本番環境で実際の問い合わせを1件送信し、届くことを確認してください。
  • Webアナリティクスが「ライト」モードでEUの訪問者を数週間にわたってカウントしておらず、主要市場を見逃していました。初日に設定を確認してください。
  • 長いデプロイ(39コミット)が、pipefail 下での git log | head からのSIGPIPEで停止しました。スクリプトは現在、最初に出力をキャプチャするようになりました。
  • サーバーのデータベースインポートで絵文字が ???? に変換されました。インポートのたびに check-emoji.sh を実行してください。

Individual skills in this repo

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

umairmsm/wp-build

Stage 3 of a wp-site-kit WordPress build - local DDEV site, the core must-use plugin (modules), the presentation-only child theme with skins, the content model (custom post types, meta, WP_Query, render functions), and the enquiry pipeline that saves leads before forwarding. Use when building or changing features, templates, content types, forms or plugin modules on a wp-site-kit site.

umairmsm/wp-content

Stage 4 of a wp-site-kit WordPress build - real copy and photos. Content truth (facts only from the owner), AI drafts and owner approval, claims audits, banned words and fake proof, legal pages, the photo pipeline (dedupe, real-only, EXIF strip, WebP sizes, alt text, AI image register), and recorded content changes. Use for "write the copy", "add photos", "the owner sent new photos", "check for duplicates", "update prices or text on the live site", "legal pages".

umairmsm/wp-design

Stage 2 of a wp-site-kit WordPress build - design direction, a static HTML/CSS prototype with design tokens, owner sign-off with screenshots, self-hosted fonts, and porting the approved look into a swappable WordPress skin. Use for "design the site", "new look", "redesign", "change colours or fonts", "make a new skin", "port the prototype to WordPress".

umairmsm/wp-kickoff

Stage 1 of a wp-site-kit WordPress build. Use when starting a new WordPress website or taking over or rebuilding an existing one - discovery brief, stack decision, creating the project with bin/wp-site-new, locked decisions, private repo and credentials inventory. Triggers - "new WordPress site", "start a client website", "rebuild this site", "take over this WordPress site".

umairmsm/wp-operate

Stage 8 of a wp-site-kit WordPress build and everything after launch - backups with an off-machine copy, restore drills, the disaster-recovery runbook, credentials inventory, update policy, alerts, and working from more than one machine (bridge file, workstation doctor, encrypted state bundle, rescuing unpushed work). Use for "backup", "restore", "move to a new machine/server", "update plugins", "what if the server dies", "work from the cloud box", "set up a second machine".

umairmsm/wp-seo

Stage 5 of a wp-site-kit WordPress build - titles and descriptions, canonical URLs, one schema owner and JSON-LD, sitemaps, robots.txt and llms.txt, AI crawler access, redirects (301 vs 302), legacy URL maps, Search Console, and adding languages one pilot at a time with Polylang (hreflang, .po/.mo strings, native review). Use for "SEO", "schema", "redirect", "old URLs", "translate the site", "add French/Spanish", "hreflang", "canonical".

umairmsm/wp-site

Start here for any WordPress website built with wp-site-kit, from an empty folder to a live site. Use when someone says "build a WordPress site", "new website for a client", "where are we on the site", "what is next before launch", or asks to continue a site project. Finds the current stage from SITE_STATUS.md, applies the hard rules, and hands over to the right stage skill.

関連スキル