Communitygithub.com

umairmsm/wp-site

从空文件夹到线上站点:管理任何基于 wp-site-kit 构建的 WordPress 网站。当用户说“搭建一个 WordPress 网站”、“为客户创建新网站”、“网站进度如何”、“上线前还需做什么”或要求继续一个网站项目时使用。它会从 SITE_STATUS.md 读取当前阶段,应用硬规则,然后调用对应的阶段技能。

wp-site 是什么?

该技能是一个完整的 WordPress 网站构建方法 + 启动项目模板,源自真实的多语言预订网站经验。它将网站从启动到运营划分为 8 个阶段(启动、设计、构建、内容、SEO 与语言、质量、发布、运营),每个阶段结束时都有一个“门禁”条件。只有当门禁条件满足并将证据记录在 SITE_STATUS.md 中后,项目才能进入下一阶段。技能强制执行 14 条硬性规则,涵盖插件优先、无硬编码卡片/价格/URL、真实照片、无伪证、事实来源于所有者、AI 代码须经人工审核、自托管字体、测试不得削弱、数据库变更受控、密钥安全等关键原则。开发者在开始一个 WordPress 项目或需要恢复工作时,对 AI 助手说“搭建一个 WordPress 网站”或“继续网站项目”即可触发此技能。

兼容平台✓Claude Code✓Codex CLI~Cursor✓Antigravity
npx skills add https://github.com/umairmsm/wp-site-kit/tree/HEAD/skills/wp-site

在你喜欢的 AI 中提问

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

文档

WordPress 网站:从空文件夹到生产环境

本工具包是一个方法加一个启动项目。它是在一个真实客户付费使用的多语言预订网站上学习得来的。请按顺序跟随各个阶段。每个阶段以一道“门禁”结束:只有当门禁条件为真且证据已书面记录时,才能离开该阶段。

1. 查找项目当前所在位置

  1. 在项目根目录中查找 SITE_STATUS.md。
    • 如果缺失:项目尚未启动。请使用 wp-kickoff。
    • 如果存在:读取它。当前阶段是第一个门禁未勾选的阶段。
  2. 读取 AGENTS.md(项目规则),然后读取 SESSION_LOG.md 和 DECISIONS.md 中最新几行。
  3. 用两行告知所有者:当前阶段,以及下一步具体操作。

2. 各阶段

#阶段技能离开门禁条件(证据写入 SITE_STATUS.md)
1启动wp-kickoff所有者批准简报;锁定决策已记录;私有仓库;凭据按名称列出
2设计wp-design静态原型已签署(截图+日期);令牌已设置;字体自托管
3构建wp-build本地站点运行;核心插件+子主题激活;通过核心函数渲染真实项目;咨询在转发前先保存;结构测试通过
4内容wp-content每个公开页面均有所有者批准的文案和真实照片;法律页面存在;无未经批准的 AI 文本
5SEO 与语言wp-seo标题、描述、规范链接、结构化数据和 hreflang 测试通过;旧 URL 重定向映射;每种额外语言通过试点
6质量wp-quality完整测试套件通过;0 个可访问性违规;在预发布环境上满足性能预算
7发布wp-ship预发布环境与线上环境一致;安全加固已应用;上线审查器 PASS;切换完成;观察 7 天
8运营wp-operate自动备份含离线副本;完成一次恢复演练;更新和告警流程已编写
  • 将阶段工作移交流程交给构建代理人(Antigravity、Codex、或其他 Claude):wp-task-file。
  • 合并前审查:代理人 wp-rules-reviewer。上线前:代理人 launch-auditor。

3. 硬规则(每个阶段、每个代理人都遵守)

  1. 插件优先。 逻辑、数据、政策文本、表单、结构数据和 SEO 均位于核心必用插件中。主题负责布局。皮肤负责外观。重新设计不得丢失任何功能。
  2. 模板中不使用硬编码的卡片、价格或别名。 查询内容类型并通过核心的渲染函数渲染,以便 CMS 编辑后处处生效。
  3. 线索先保存。 表单提交至 admin-post.php 并携带 nonce。网站将线索存储在自己的数据库中,然后转发。页面中不出现 API 密钥或第三方端点。
  4. 无虚假证据。 永远不要展示无人能证明的评分、评论数量或推荐语。导入的或“遗留”的评论数字在可证明之前视为虚假。
  5. 真实照片 用于任何具名地点、房间、产品或人物。AI 图像仅作为通用风景,命名为 ai-*,记录在案,并且永远不要呈现为“这是你的房间”。
  6. 事实来自所有者。 价格、政策、包含项和安全事实绝不编造。AI 文案在所有者批准前仅为草稿。未知项 = PENDING-<谁>。
  7. 未经分支、本地测试、差异对比和人工合并,不许将 AI 编写的 PHP 发布到生产环境。 遵循 WordPress 编码标准。所有内容均加前缀。
  8. 无页面构建器。无 Google Fonts 调用。 自托管字体:一家德国法院判决因从 Google 加载字体泄露访客 IP 地址而需赔偿。
  9. 预发布环境和本地环境绝不能编入索引,也绝不能向真实客户发送邮件。
  10. 绝不能为通过测试而削弱测试: 不得删除、跳过或重新生成快照。重命名测试需经所有者同意。
  11. 部署权属于所有者。 从提交开始,通过 scripts/deploy-safe.sh:先试运行,先备份,live 一词由人类输入。
  12. 数据库是内容。 仅通过可审查的变更文件和带试运行的受保护脚本更改数据库。每次更改数据库前均需备份。
  13. 密钥绝不可进入 git、日志、提示或页面。CREDENTIALS_INVENTORY.md 列出名称以及每个密钥的存放位置,绝不列出值。
  14. 一个结构化数据所有权者(通常是 SEO 插件)。未提供价格时绝不输出 Offer。

4. 首先询问所有者

  • 安装插件、主题、工具或付费服务(页面构建器:绝不)。
  • 对价格、货币、政策、品牌名称或徽标的任何更改。发布新语言。
  • 任何涉及 DNS、Cloudflare、托管、预发布环境或线上环境的操作。破坏性数据库或文件命令。
  • 将代码或客户内容发送给第三方 AI API。

5. 工作方式

  • 一次一个阶段,一次一小步。每完成一个有意义的步骤后提交(约定式提交)。
  • 分支、本地测试、差异对比,然后所有者合并。除非所有者明确要求,否则代理人绝不推送、合并、部署或 ssh 到服务器。
  • 每个决策均写入 DECISIONS.md(日期、决策人、原因)。每次会话结束时在 SESSION_LOG.md 中添加一行。
  • “完成”意味着已检查:打开页面、运行测试、读取服务器响应。绝不相信其他代理人的“已解决”而不自行检查。

6. 来自其他工具包的有用技能(如果已安装)

  • agent-skills-kit:wordpress-modern、wp-plugin-development、wp-wpcli-and-ops、wp-performance,用于 WordPress API 细节。
  • agent-loop-kit:supervised-build、agent-supervisor,用于带门禁和审查者的无人值守构建循环。

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

Stage 7 of a wp-site-kit WordPress build - staging behind Cloudflare Access, server hardening, safe deploys from a commit (scripts/deploy-safe.sh), database content changes, the launch audit, DNS cutover without breaking a running business, and the first week after launch. Use for "deploy", "set up staging", "go live", "launch", "cutover", "move DNS", "harden the server".

相关技能