static-page-deploy
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "static-page-deploy":https://skillpi.com/zh/skills/deepskill-aca71c71e494d516922264aed1219807322dcd05e03e11f97265a6e8909d832a。安装前核对上游来源和版本:https://skillhub.cn/skills/user_a80a7fe6/static-page-deploy-github。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
skillhub.cn
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
AI 驱动的静态网站部署:根据自然语言描述和用户评论生成 HTML 页面,并通过 GitHub 自动部署到 Cloudflare Pages,支持完整静态网站(HTML/CSS/JS/图片)并管理项目状态与一键更新。
介绍来源: third_party · user_a80a7fe6 · 1.0.0 参考来源
SkillPi 解读
- 能完成的任务
- AI 生成静态页面 → 用户审核 → GitHub 推送 → Cloudflare Pages 自动部署 → .pages.dev 上线
- 适合谁
- 来源文档未说明。
- 输入和输出
- 来源文档未说明。
- 软件、账号及付费要求
- **如果你从未使用过 GitHub 或 Cloudflare,请先完成以下注册步骤。整个过程大约 10 分钟。**
- 限制与区别
- 来源文档未说明。
- 实测状态
- 未测试
文件浏览
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: trueStatic 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 是代码托管平台,你的网站文件将存储在这里。
注册步骤:
- 打开 https://github.com/signup
- 输入邮箱地址(建议使用常用邮箱)
- 创建密码
- 选择用户名(将成为你的 GitHub 身份标识)
- 完成人机验证
- 验证邮箱(查收邮件点击确认链接)
创建 Personal Access Token(部署必需):
注册完成后,需要创建一个 Token 让 AI 能帮你推送代码:
- 登录 GitHub,点击右上角头像 → Settings
- 左侧滚动到底部 → Developer settings
- 点击 Personal access tokens → Tokens (classic)
- 点击 Generate new token (classic)
- 填写 Note:
static-page-deploy - 勾选权限:repo(完整仓库控制)
- 点击 Generate token
- 立即复制保存! 页面关闭后无法再次查看
⚠️ 重要:Token 只显示一次,请妥善保存。不要分享给他人。
2. Cloudflare 账号注册
Cloudflare 提供免费的静态网站托管服务(.pages.dev)。
注册步骤:
- 打开 https://cloudflare.com/
- 点击 Sign up
- 输入邮箱和密码
- 验证邮箱
创建 API Token(部署必需):
- 登录 Cloudflare,点击右上角头像 → My Profile
- 顶部导航选择 API Tokens
- 点击 Create Token
- 选择 Edit Cloudflare Pages 模板
- 权限:Pages:Edit + Account:Read
- 点击 Create Token
- 立即复制保存!
获取 Account ID:
- 登录 Cloudflare Dashboard
- 左侧选择 Workers & Pages
- 右侧 Account ID 显示在页面右侧
- 复制保存
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:
- Purpose: What's this page for? (portfolio, product showcase, landing page, etc.)
- Content: What content should it have? (text, images, features list, etc.)
- Style: Any style preferences? (minimal, corporate, colorful, dark mode, etc.)
- 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/orhttps://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
- Check conversation context or environment
- If missing: ask user for token
- Scope:
repo - Generate: https://github.com/settings/tokens
4b. Cloudflare API Token
- If missing: ask user for token with
Pages:Edit+Account:Read - Generate: https://dash.cloudflare.com/profile/api-tokens
4c. Cloudflare Account ID
- Auto-discover via Cloudflare API:
GET /accountswith the token - If multiple accounts found, ask which one
4d. GitHub Username
- Auto-discover:
GET /userwith GitHub token - Use the
loginfield
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:
- Wait ~30 seconds
- Check deployment:
GET /accounts/{id}/pages/projects/{name}/deployments?per_page=1 - 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
- Look up project: Read
projects.json, find by name - Get new files: Either AI-generate new version or use local files
- Push to GitHub: Use
mcp__github__create_or_update_file(with SHA for updates) - Verify deployment: Check Cloudflare deployment status
- 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:
-
Add
_headersfile for security and cache control:/* X-Frame-Options: DENY X-Content-Type-Options: nosniff Cache-Control: public, max-age=3600 -
Add
_redirectsfile for clean URLs:/about /about.html 200 /faq /faq.html 200 -
Connect a custom domain in Cloudflare Dashboard → Pages → Custom domains
-
Enable Cloudflare Analytics for visitor insights
当前收录版本
1.0.0
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 解决个人静态页展示的核心痛点(作品集、产品展示、简历等)
- 提供端到端 AI 生成+GitHub+Cloudflare 自动部署能力
- 显著提升轻量级建站效率,实现一键更新
亮点
- 触发词覆盖全面,包含中英文多种表达变体
- 清晰区分新建项目与更新现有项目场景
- 边界定义明确,减少误触风险
亮点
- Phase 划分清晰(Mode A/B 双模式)
- 步骤完整且有序,包含10步新建流程和5步更新流程
- 有明确的用户确认出口条件(预览确认)
- frontmatter 完整,文档结构规范
亮点
- 工具来源明确(mcp__github、Cloudflare API)
- 参数配置正确,覆盖主要异常场景(凭证、分支、命名)
- 不可逆操作有用户确认机制(预览+授权)
- Token 安全处理规范,不保存敏感信息
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
-
账号、密钥或授权
使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。
主文档提及 · 第 118, 235, 394, 430 行
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- api.cloudflare.com
- cloudflare.com
- dash.cloudflare.com
- github.com
- picsum.photos
- placehold.co
- project-name.pages.dev
- xxx.pages.dev
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
**如果你从未使用过 GitHub 或 Cloudflare,请先完成以下注册步骤。整个过程大约 10 分钟。**
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。