publish-html-page
npx skills add https://github.com/serendipityoneinc/srp-claude-code-marketplace --skill publish-html-page
Agent 安装分布
Skill 文档
Publish HTML Page
Publish HTML pages to Cloudflare Pages with an asset-first workflow: images and media are uploaded to R2 storage (cf-assets) first, then the HTML references them via URLs instead of embedding base64 data. This keeps pages lightweight and fast.
When to Use This Skill
- User asks to “create/publish/deploy an HTML page”
- User asks to “make a web page” or “build a landing page”
- User wants to publish HTML content (reports, games, dashboards, portfolios, etc.)
- User mentions
page.yesy.siteor publishing to pages
When NOT to Use This Skill
- Uploading standalone files (images, videos, PDFs) without an HTML page â use
cloudflare-assetsskill - Deploying full web applications with build steps â use
cloudflare-pagesskill - Editing existing code projects â use standard development workflow
Architecture
âââââââââââââââââââ
â AI generates â
â HTML + assets â
ââââââââââ¬âââââââââ
â
ââââââââââââââââ¼âââââââââââââââ
â â â
â¼ â¼ â¼
ââââââââââââ ââââââââââââ ââââââââââââ
â Images â â Videos â â SVG/CSS â
â (png, â â (mp4, â â (inline â
â jpg...) â â webm) â â is OK) â
ââââââ¬ââââââ ââââââ¬ââââââ âââââââ¬ââââââ
â â â
â¼ â¼ â
âââââââââââââââââââââââââââââ â
â cf-assets (R2 Storage) â â
â assets.yesy.site â â
â â returns public URLs â â
ââââââââââââââ¬âââââââââââââââ â
â â
â¼ â¼
âââââââââââââââââââââââââââââââââââââââ
â HTML with URL references â
â (lightweight, no base64 blobs) â
ââââââââââââââââ¬âââââââââââââââââââââââ
â
â¼
ââââââââââââââââââââââââ
â cf-page-publish-mcp â
â page.yesy.site â
â (KV Storage) â
ââââââââââââââââââââââââ
Workflow (MANDATORY)
Step 0: Design Phase (if needed)
If the page requires custom visual assets (hero images, illustrations, icons, graphics):
- Check if
canvas-designskill is available - If available: Use it to generate images, then continue to Step 1
- If not available: Ask the user:
“This page would benefit from custom graphics. Would you like to install the
canvas-designskill for image generation? You can install it with:/install-skill canvas-design“ - If user declines: Use SVG graphics, CSS art, emoji, or stock image URLs instead
Other image generation skills like nano-banana or gpt-image-1-5 can also be used if available.
Step 1: Analyze Content
Before writing any HTML, identify all media assets the page will need:
- Binary images (PNG, JPG, WebP, GIF) â MUST upload to cf-assets
- Videos (MP4, WebM) â MUST upload to cf-assets
- SVG graphics â CAN inline directly in HTML (small, text-based)
- CSS/fonts â SHOULD inline in
<style>tags or use CDN links - Icons â Prefer SVG inline, emoji, or CDN icon libraries
Rule: Any base64-encoded binary content > 1KB should go to cf-assets.
Step 2: Upload Assets to cf-assets
Use the cloudflare-assets skill for smart upload routing:
- File < 512KB â MCP tool
upload_file(base64, fast) - File >= 512KB â Script
cf-assets.sh upload(REST API, no base64 overhead)
Small file (< 512KB) â MCP:
Tool: mcp__plugin_srp-developer_cloudflare-assets__upload_file
Args:
filename: "icon.svg"
content: "<base64-encoded content>"
Large file (>= 512KB) â Script:
SCRIPT=$(find ~/.claude/plugins/cache/srp-claude-code-marketplace/srp-developer -name "cf-assets.sh" -type f 2>/dev/null | head -1)
bash "$SCRIPT" upload /path/to/hero-banner.png
Both return: {"state":true,"data":{"url":"https://assets.yesy.site/f/images/2026/02/abc12345.png",...}}
Tips:
- Upload all assets in parallel when possible
- Note down each returned URL for use in HTML
- Filenames are for type detection only â the actual key is auto-generated
- For generated images (nano-banana, etc.), always use script â they’re typically > 512KB
Step 3: Build HTML with URLs
Construct the HTML page using the returned asset URLs:
<!-- GOOD: Reference uploaded asset URL -->
<img src="https://assets.yesy.site/f/images/2026/02/abc12345.png" alt="Hero">
<!-- GOOD: Inline SVG (small, text-based) -->
<svg viewBox="0 0 24 24"><path d="..."/></svg>
<!-- GOOD: CDN resources -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/...">
<!-- BAD: Inline base64 binary (bloats HTML) -->
<img src="data:image/png;base64,iVBORw0KGgo...very long string...">
Step 4: Publish HTML Page
Publish the lightweight HTML:
Tool: mcp__plugin_srp-developer_cloudflare-pages________
Args:
pagetitle: "Page Title"
pagehtml: "<complete HTML content>"
Returns: URL like https://page.yesy.site/pages/{key}
Step 5: Verify & Report
Report to the user:
- Published page URL
- List of uploaded assets (with URLs)
- Page size comparison (if relevant)
MCP Tools Reference
cloudflare-assets (assets.yesy.site)
| Tool | Description |
|---|---|
mcp__plugin_srp-developer_cloudflare-assets__upload_file |
Upload file (base64) â returns public URL |
mcp__plugin_srp-developer_cloudflare-assets__list_files |
List files, filter by type/year/month |
mcp__plugin_srp-developer_cloudflare-assets__delete_file |
Delete file by key |
Upload file parameters:
filename(string): Filename with extension, e.g.photo.pngâ used for type categorizationcontent(string): Base64-encoded file content
File categories (auto-detected from extension):
images/â png, jpg, jpeg, gif, webp, svg, ico, bmp, tiffvideos/â mp4, webm, mov, avi, mkvweb/â html, css, jsdocuments/â pdf, doc, docx, xls, xlsx, ppt, pptx, txt, csv, mdother/â everything else
cloudflare-pages (page.yesy.site)
| Tool | Description |
|---|---|
mcp__plugin_srp-developer_cloudflare-pages________ |
Create HTML page â returns page URL |
Parameters:
pagetitle(string): Page titlepagehtml(string): Complete HTML content
Examples
Example 1: Simple Text Page (no assets needed)
User: “Create a page showing today’s meeting notes”
Flow: No images â skip asset upload â publish directly
1. Build HTML with meeting notes content
2. Publish via cloudflare-pages
3. Return page URL
Example 2: Landing Page with Images
User: “Create a product landing page for our new app”
Flow:
1. [Design] Generate hero image and product screenshots
â Use canvas-design / nano-banana skill if available
â Save as PNG files
2. [Upload] Upload images to cf-assets
â hero.png â https://assets.yesy.site/f/images/2026/02/xxx.png
â screenshot1.png â https://assets.yesy.site/f/images/2026/02/yyy.png
3. [Build] Create HTML referencing asset URLs
<img src="https://assets.yesy.site/f/images/2026/02/xxx.png" alt="Hero">
4. [Publish] Publish to cloudflare-pages
â https://page.yesy.site/pages/ProductLandingAbcDefGh
Example 3: Interactive Game
User: “Create a 2048 game and publish it”
Flow: Pure CSS/JS game â no binary assets â publish directly
1. Build complete HTML with inline CSS and JavaScript
2. Publish via cloudflare-pages (single HTML, no external assets)
3. Return page URL
Example 4: Data Dashboard with Charts
User: “Create a dashboard showing our sales data”
Flow: Charts via JS library (Chart.js CDN) + maybe a logo image
1. [Upload] Upload company logo to cf-assets (if provided)
2. [Build] HTML with:
- Chart.js from CDN
- Logo from cf-assets URL
- Data inline in <script>
3. [Publish] Publish to cloudflare-pages
Decision Tree: Inline vs Upload
Is it binary (PNG, JPG, MP4, etc.)?
âââ YES â Upload to cf-assets
âââ NO
âââ Is it SVG < 5KB? â Inline in HTML
âââ Is it CSS? â Inline in <style> or use CDN
âââ Is it JS? â Inline in <script> or use CDN
âââ Is it a font? â Use CDN (Google Fonts, etc.)
Important Notes
- Always upload binary assets first before building the HTML â you need the URLs
- Parallel uploads: When multiple assets need uploading, call upload_file for each in parallel
- SVG is special: Small SVGs can inline directly; large/complex SVGs should upload to cf-assets
- CDN preference: For common libraries (jQuery, Chart.js, Tailwind), use CDN links rather than uploading
- Page size target: Aim for HTML < 500KB after asset extraction. If larger, check for missed base64 blobs
- No auth needed: Both services are protected by Cloudflare Zero Trust at the network level
Version History
- 1.1.0 (2026-02-26): Smart upload routing
- Upload now uses
cloudflare-assetsskill with size-based routing - Files < 512KB â MCP; files >= 512KB â REST API via script
- Added reference to
cf-assets.shscript for large file uploads
- Upload now uses
- 1.0.0 (2026-02-26): Initial skill release
- Asset-first workflow for HTML page publishing
- Integration with cf-assets (R2) and cf-page-publish-mcp (KV)
- Design phase with canvas-design skill integration
- Decision tree for inline vs upload