static-page-deploy

AI-driven static site deployment: generates HTML pages from natural language descriptions and user feedback, automatically deploys via GitHub to Cloudflare Pages, supports full static sites (HTML/CSS/JS/images), and manages project state with one-click updates.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "static-page-deploy" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-aca71c71e494d516922264aed1219807322dcd05e03e11f97265a6e8909d832a. Verify the upstream source and version against https://skillhub.cn/skills/user_a80a7fe6/static-page-deploy-github before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

AI-driven static site deployment: generates HTML pages from natural language descriptions and user feedback, automatically deploys via GitHub to Cloudflare Pages, supports full static sites (HTML/CSS/JS/images), and manages project state with one-click updates.

0 Downloads

Introduction source: third_party · user_a80a7fe6 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: static-page-deploy
description: "AI-powered static site deployment. AI generates HTML pages from natural language descriptions, user reviews, then auto-deploys to Cloudflare Pages via GitHub. Supports full static sites (HTML/CSS/JS/images). Manages project state for one-click updates."
agent_created: true

Static Page Deploy (AI-Powered)

AI 生成静态页面 → 用户审核 → GitHub 推送 → Cloudflare Pages 自动部署 → .pages.dev 上线

When This Skill Triggers

User says Interpretation
"帮我做个网站/页面" AI 生成 + 部署
"做个产品展示页" AI 生成特定页面
"做个 landing page" AI 生成落地页
"Deploy this folder" 部署已有文件
"更新我的网站" Mode B 更新
"发布这个页面" AI 生成 + 部署

Also trigger when: user describes a website/page they want + mentions deploy/host/上线/发布/展示页.

Architecture

用户描述需求
  ↓
AI 生成 HTML(内联 CSS,单文件可运行)
  ↓
show_widget 预览 → 用户确认
  ↓
mcp__github 推送到 GitHub
  ↓
Cloudflare Pages 自动部署
  ↓
projects.json 记录项目状态
  ↓
返回 https://xxx.pages.dev

适用场景与限制

✅ 适用场景(推荐)

本技能主要面向个人静态页展示类需求:

场景 示例
个人作品集 "帮我做个作品集页面展示我的项目"
产品展示页 "做个页面展示我们的 IFP 平板"
个人简历页 "帮我做个在线简历"
活动/会议页面 "做个产品发布会的邀请页"
个人博客首页 "做个简洁的博客首页"
项目落地页 "做个 SaaS 产品的介绍页"

❌ 不适用场景(不推荐)

场景 原因 替代方案
SEO 优化网站 Cloudflare Pages 的 .pages.dev 域名 SEO 表现差,搜索引擎几乎不收录 使用独立域名 + Vercel/Netlify,或专业 CMS
多页面大型网站 本技能面向轻量级单页/少页展示,不适合复杂站点架构 使用 Next.js/Hugo 等静态站点生成器
电商/支付类页面 缺乏后端能力,无法处理交易逻辑 Shopify / WooCommerce / 有赞
需要后台管理的网站 无 CMS,每次更新需通过 AI 生成 WordPress / Strapi / Notion + 同步
高流量网站 Cloudflare Pages 免费版有带宽限制 升级 Cloudflare 付费版或使用 CDN
需要数据库的应用 纯静态,无数据库支持 接入 Supabase/Firebase 等 BaaS

⚠️ 重要提醒:如果你做网站的主要目的是搜索引擎获客(SEO),本技能不建议使用。.pages.dev 二级域名在 Google/百度中的权重极低,几乎无法获得自然流量。此时建议购买独立域名(如 yourname.com)并配合专业建站工具。


Project State: projects.json

Maintained at ~/.workbuddy/skills/static-page-deploy/projects.json:

{
  "project-name": {
    "github_repo": "owner/repo",
    "cf_project": "project-name",
    "url": "https://project-name.pages.dev",
    "deployed_at": "2026-07-27",
    "description": "Product showcase for Riotouch IFP"
  }
}

Read this file first to determine if a project exists (Mode B) or is new (Mode A).

Two Modes

Mode A: AI Generate + First-Time Deploy

Full pipeline: requirements → AI generate → preview → confirm → GitHub → Cloudflare → live.

Mode B: Update Existing Project

Look up project in projects.json → push changes → verify deployment.


🆕 新手引导:账号注册与凭证获取

如果你从未使用过 GitHub 或 Cloudflare,请先完成以下注册步骤。整个过程大约 10 分钟。

1. GitHub 账号注册

GitHub 是代码托管平台,你的网站文件将存储在这里。

注册步骤:

  1. 打开 https://github.com/signup
  2. 输入邮箱地址(建议使用常用邮箱)
  3. 创建密码
  4. 选择用户名(将成为你的 GitHub 身份标识)
  5. 完成人机验证
  6. 验证邮箱(查收邮件点击确认链接)

创建 Personal Access Token(部署必需):

注册完成后,需要创建一个 Token 让 AI 能帮你推送代码:

  1. 登录 GitHub,点击右上角头像 → Settings
  2. 左侧滚动到底部 → Developer settings
  3. 点击 Personal access tokens → Tokens (classic)
  4. 点击 Generate new token (classic)
  5. 填写 Note:static-page-deploy
  6. 勾选权限:repo(完整仓库控制)
  7. 点击 Generate token
  8. 立即复制保存! 页面关闭后无法再次查看

⚠️ 重要:Token 只显示一次,请妥善保存。不要分享给他人。

2. Cloudflare 账号注册

Cloudflare 提供免费的静态网站托管服务(.pages.dev)。

注册步骤:

  1. 打开 https://cloudflare.com/
  2. 点击 Sign up
  3. 输入邮箱和密码
  4. 验证邮箱

创建 API Token(部署必需):

  1. 登录 Cloudflare,点击右上角头像 → My Profile
  2. 顶部导航选择 API Tokens
  3. 点击 Create Token
  4. 选择 Edit Cloudflare Pages 模板
  5. 权限:Pages:Edit + Account:Read
  6. 点击 Create Token
  7. 立即复制保存!

获取 Account ID:

  1. 登录 Cloudflare Dashboard
  2. 左侧选择 Workers & Pages
  3. 右侧 Account ID 显示在页面右侧
  4. 复制保存

3. 凭证清单

完成注册后,你将拥有:

凭证 说明 示例格式
GitHub Token 推送代码 ghp_xxxxxxxxxxxx
Cloudflare API Token 管理 Pages Abc123...
Cloudflare Account ID 标识账户 a1b2c3d4e5f6...
GitHub 用户名 你的 GitHub 登录名 barrychen

💡 提示:首次部署时,AI 会向你索要这些凭证。之后可以保存在环境变量中避免重复输入。


Mode A: Step by Step

Step 0: Check for Existing Project

Read projects.json. If the user mentions a project name that exists → Mode B.

If new project, proceed.

Step 1: Collect Requirements

Ask the user for:

  1. Purpose: What's this page for? (portfolio, product showcase, landing page, etc.)
  2. Content: What content should it have? (text, images, features list, etc.)
  3. Style: Any style preferences? (minimal, corporate, colorful, dark mode, etc.)
  4. Language: Chinese, English, or bilingual?

If the user is vague, make reasonable assumptions and confirm: "I'll create a clean, modern landing page with the content you described. Sound good?"

Step 2: AI Generate HTML

Generate a complete, self-contained HTML file:

Requirements:

  • Inline all CSS in <style> (single file, no external dependencies)
  • Responsive design (mobile-friendly)
  • Modern, clean aesthetic
  • Use placeholder images from https://picsum.photos/ or https://placehold.co/ if needed
  • Semantic HTML5 structure
  • If user provides specific content/text, use it verbatim

Output format:

<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>...</title>
  <style>
    /* All CSS inlined */
  </style>
</head>
<body>
  <!-- Content -->
</body>
</html>

Save to a temporary directory: ~/.workbuddy/skills/static-page-deploy/tmp/{project-name}/index.html

Step 3: Preview & Confirm

Use show_widget to render the HTML inline for the user to preview.

Say: "Here's a preview of your page. Want to deploy it, or should I change something?"

Wait for user confirmation before proceeding to any external action.

Step 4: Collect Credentials

4a. GitHub Token

4b. Cloudflare API Token

4c. Cloudflare Account ID

  • Auto-discover via Cloudflare API: GET /accounts with the token
  • If multiple accounts found, ask which one

4d. GitHub Username

  • Auto-discover: GET /user with GitHub token
  • Use the login field

Step 5: Create GitHub Repository

Use mcp__github__create_repository:

{
  "name": "{project-name}",
  "description": "{description}",
  "private": false,
  "auto_init": true
}

If repo already exists, ask user to confirm reuse.

Step 6: Push Files to GitHub

Use mcp__github__create_or_update_file for each file:

mcp__github__create_or_update_file(
  owner: "{owner}",
  repo: "{repo}",
  path: "index.html",
  content: "{base64-encoded-content}",
  message: "Initial commit: AI-generated static site",
  sha: null  // for new files
)

For full sites (CSS/JS/images), push each file individually via the same tool.

Also push _headers for security:

/*
  X-Frame-Options: DENY
  X-Content-Type-Options: nosniff
  Cache-Control: public, max-age=3600

Step 7: Create Cloudflare Pages Project

Use WebFetch to call Cloudflare API:

POST https://api.cloudflare.com/client/v4/accounts/{account_id}/pages/projects
Authorization: Bearer {cf_token}
Content-Type: application/json

{
  "name": "{project-name}",
  "production_branch": "main",
  "source": {
    "type": "github",
    "config": {
      "owner": "{owner}",
      "repo_name": "{repo}",
      "production_branch": "main"
    }
  }
}

Step 8: Authorize & Verify

Tell user:

Almost done! One manual step:
1. Go to https://dash.cloudflare.com/{account_id}/pages/view/{project-name}
2. Click "Connect GitHub" to authorize
3. This can't be automated — Cloudflare requires browser session

After user confirms:

  1. Wait ~30 seconds
  2. Check deployment: GET /accounts/{id}/pages/projects/{name}/deployments?per_page=1
  3. Verify: curl -sI https://{name}.pages.dev → 200

Step 9: Save Project State

Append to projects.json:

"project-name": {
  "github_repo": "owner/repo",
  "cf_project": "project-name",
  "url": "https://project-name.pages.dev",
  "deployed_at": "2026-07-27",
  "description": "..."
}

Step 10: Summary

Deployed successfully!

Project:   {project-name}
GitHub:    https://github.com/{owner}/{repo}
Live URL:  https://{name}.pages.dev

Next time, just say "update {project-name}" and I'll push changes.

Mode B: Update Existing Project

  1. Look up project: Read projects.json, find by name
  2. Get new files: Either AI-generate new version or use local files
  3. Push to GitHub: Use mcp__github__create_or_update_file (with SHA for updates)
  4. Verify deployment: Check Cloudflare deployment status
  5. Report: URL + status

If Cloudflare Pages doesn't auto-deploy:

POST /accounts/{id}/pages/projects/{name}/deployments
Body: {}

Decision Tree

User wants to deploy
  |
  +-- Project exists in projects.json?
  |     |
  |     +-- YES → Mode B (update)
  |     |     1. Look up project details
  |     |     2. Get updated files
  |     |     3. Push via mcp__github
  |     |     4. Verify deployment
  |     |
  |     +-- NO → Mode A (new)
  |           1. Check for local files
  |           2. If no files → AI generate
  |           3. Preview → confirm
  |           4. Collect credentials
  |           5. Create repo via mcp__github
  |           6. Push files via mcp__github
  |           7. Create CF Pages project
  |           8. User authorizes
  |           9. Verify + save state

Critical Pitfalls

1. production_branch Must Be "main"

After creating or updating a Pages project, ALWAYS set production_branch to "main". Cloudflare sometimes auto-creates a cloudflare/workers-autoconfig branch and points the project there. If this happens, the deployed content will be stale or empty.

PATCH /accounts/{id}/pages/projects/{name}
{
  "production_branch": "main",
  "source": {
    "type": "github",
    "config": {
      "owner": "{owner}",
      "repo_name": "{repo}",
      "production_branch": "main"
    }
  }
}

2. Project Names: Lowercase + Dashes Only

Cloudflare API rejects uppercase letters and most special characters.

  • Valid: my-site, barry-portfolio, cool-project-123
  • Invalid: MySite, barry_site, -start-dash, end-dash-

3. GitHub Authorization Cannot Be Automated

After creating a Pages project with GitHub source, the user MUST manually authorize Cloudflare to access their GitHub repo. This is a browser-based OAuth flow that cannot be done via API.

4. Always Preview Before Deploy

Never skip the preview step. User must confirm before any external action (GitHub push, CF create).

5. Token Security

  • Never log or display tokens in conversation
  • Don't save tokens to projects.json or any file
  • Ask user to provide tokens each session (or use environment variables)

6. Separate Repos for Worker vs Pages

If the user has both a Cloudflare Worker and Pages, use separate GitHub repos. Sharing a repo causes the Worker's cloudflare/workers-autoconfig branch to conflict.


Cloudflare API Reference

All endpoints: https://api.cloudflare.com/client/v4

Action Method Path
List projects GET /accounts/{id}/pages/projects
Create project POST /accounts/{id}/pages/projects
Update project PATCH /accounts/{id}/pages/projects/{name}
Delete project DELETE /accounts/{id}/pages/projects/{name}
List deployments GET /accounts/{id}/pages/projects/{name}/deployments
Get deployment GET /accounts/{id}/pages/projects/{name}/deployments/{did}
Trigger deploy POST /accounts/{id}/pages/projects/{name}/deployments
List accounts GET /accounts

Auth: Authorization: Bearer {cf_token}


GitHub MCP Reference

Use mcp__github tools (load via ToolSearch first):

Action Tool
Create repo mcp__github__create_repository
Create/update file mcp__github__create_or_update_file
Get file contents mcp__github__get_file_contents
Push multiple files mcp__github__push_files
Search repos mcp__github__search_repositories
Get repo mcp__github__get_file_contents

File Structure

~/.workbuddy/skills/static-page-deploy/
├── SKILL.md              # This file
├── projects.json         # Project state (created on first deploy)
├── references/
│   └── troubleshooting.md
└── tmp/                  # Temporary AI-generated files
    └── {project-name}/
        ├── index.html
        ├── style.css    # Optional: separate CSS
        └── script.js    # Optional: separate JS

Bonus: After First Deployment

Once the site is live, optionally suggest:

  1. Add _headers file for security and cache control:

    /*
    X-Frame-Options: DENY
    X-Content-Type-Options: nosniff
    Cache-Control: public, max-age=3600
  2. Add _redirects file for clean URLs:

    /about  /about.html  200
    /faq    /faq.html    200
  3. Connect a custom domain in Cloudflare Dashboard → Pages → Custom domains

  4. Enable Cloudflare Analytics for visitor insights

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value95/100

Highlights

  • 解决个人静态页展示的核心痛点(作品集、产品展示、简历等)
  • 提供端到端 AI 生成+GitHub+Cloudflare 自动部署能力
  • 显著提升轻量级建站效率,实现一键更新
Trigger Precision95/100

Highlights

  • 触发词覆盖全面,包含中英文多种表达变体
  • 清晰区分新建项目与更新现有项目场景
  • 边界定义明确,减少误触风险
Structure and Standards95/100

Highlights

  • Phase 划分清晰(Mode A/B 双模式)
  • 步骤完整且有序,包含10步新建流程和5步更新流程
  • 有明确的用户确认出口条件(预览确认)
  • frontmatter 完整,文档结构规范
Execution Reliability95/100

Highlights

  • 工具来源明确(mcp__github、Cloudflare API)
  • 参数配置正确,覆盖主要异常场景(凭证、分支、命名)
  • 不可逆操作有用户确认机制(预览+授权)
  • Token 安全处理规范,不保存敏感信息
Evidence Verifiability (mean of the first four)95/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • api.cloudflare.com
  • cloudflare.com
  • dash.cloudflare.com
  • github.com
  • picsum.photos
  • placehold.co
  • project-name.pages.dev
  • xxx.pages.dev

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.