{"skill":{"slug":"html-deploy-easy","displayName":"html-deploy-easy","summary":"Instantly publish a single self-contained HTML page to htmlcode.fun for fast live URLs. Alias of html-deploy, updated for the current versioned htmlcode.fun...","description":"---\r\nname: html-deploy-easy\r\ndescription: Instantly publish a single self-contained HTML page to htmlcode.fun for fast live URLs. Alias of html-deploy, updated for the current versioned htmlcode.fun API and safer agent workflows.\r\n---\r\n\r\n> Alias note: `html-deploy-easy` is maintained as a compatibility alias of `html-deploy`. Prefer `html-deploy` for new installs, but this alias carries the same current htmlcode.fun workflow.\r\n\r\n\r\n# HTML Instant Deploy\r\n\r\n## Overview\r\n\r\nUse `htmlcode.fun` when the deliverable is one standalone HTML document and speed matters more than full project hosting. The service is an open HTML app marketplace: agents deploy or revise HTML, users can manually like a version in the web UI, and liked versions become preserved immutable snapshots.\r\n\r\nLive guide:\r\n- https://www.htmlcode.fun/s/htmlcode-fun-guide\r\n\r\nBundled script:\r\n- `scripts/htmlcode_deploy.py` for deploy, version append, version inspection, content fetch, and unlocked-version edits.\r\n\r\n## Decision rule\r\n\r\nUse this skill when:\r\n- The deliverable is a single HTML page.\r\n- The page can be self-contained or nearly self-contained.\r\n- Fast sharing matters more than custom domains, CI/CD, or multi-file assets.\r\n\r\nDo not use this skill when:\r\n- The project is a React, Vue, Next, or multi-file frontend app.\r\n- The site needs build steps, environment variables, server logic, or asset pipelines.\r\n- The user specifically needs their own domain or production-grade hosting.\r\n- The HTML payload is likely to exceed about 1 MB.\r\n\r\n## Current htmlcode.fun rules\r\n\r\n- Always use JSON; never use multipart/form-data or `curl -F`.\r\n- `description` is required: one concise sentence, max 240 characters.\r\n- One request deploys one HTML document only.\r\n- Stable projects should use `enableCustomCode=true` + `customCode`.\r\n- For recurring or iterative work, append a new version with `createVersion=true` instead of creating daily/random short codes.\r\n- A version with `likeCount > 0` is locked and must not be overwritten or deleted.\r\n- An unlocked version (`likeCount == 0`) may be overwritten or unpublished when appropriate.\r\n- Agents must not call like endpoints. Likes are intentionally user/manual actions in the htmlcode.fun web UI.\r\n- After deploy, tell the user the returned `url`, `detailUrl`, and/or `versionUrl`, plus the returned `preserveHint` when present.\r\n- Successful deploys have a global cooldown of about 10 seconds. On `429`, respect `retryAfterSeconds`.\r\n\r\n## Recommended workflows\r\n\r\n### New one-off page\r\n\r\n1. Produce a complete HTML document with `<title>`, viewport, and useful metadata.\r\n2. Deploy with `POST /api/deploy` and a required `description`.\r\n3. Return the live link and tell the user they can open the detail page and manually like the current version to preserve it.\r\n\r\nScript:\r\n\r\n```bash\r\npython scripts/htmlcode_deploy.py deploy page.html --title \"Launch Page\" --description \"A concise one-sentence summary of this HTML page.\"\r\n```\r\n\r\n### Stable short link or recurring project\r\n\r\nUse a stable `customCode`; append new versions for future updates.\r\n\r\n```bash\r\npython scripts/htmlcode_deploy.py deploy page.html --code ai-daily --title \"AI Daily 2026-05-08\" --description \"Daily AI briefing for 2026-05-08.\"\r\npython scripts/htmlcode_deploy.py append ai-daily page.html --title \"AI Daily 2026-05-09\" --description \"Daily AI briefing for 2026-05-09.\"\r\n```\r\n\r\n### Inspect or reuse an app\r\n\r\n```bash\r\npython scripts/htmlcode_deploy.py versions ai-daily\r\npython scripts/htmlcode_deploy.py get ai-daily --version 3 --output ai-daily-v3.html\r\n```\r\n\r\nBy default, `get --output` writes the HTML `content` field to the file. Use `--download` only when you explicitly want the server's raw download response.\r\n\r\n### Fix an existing version\r\n\r\nBefore overwriting, inspect versions. Only overwrite if the target version has `likeCount == 0`. If it has likes, append a new version instead.\r\n\r\n```bash\r\npython scripts/htmlcode_deploy.py versions landing-demo\r\npython scripts/htmlcode_deploy.py overwrite landing-demo 2 fixed.html --description \"Fixes layout issues in version 2.\"\r\n```\r\n\r\nThe script also performs this `likeCount` check automatically before `overwrite`, `status`, and `delete-version`.\r\n\r\n### Publish or unpublish one version\r\n\r\n```bash\r\npython scripts/htmlcode_deploy.py status landing-demo 2 inactive\r\npython scripts/htmlcode_deploy.py status landing-demo 2 active\r\n```\r\n\r\n## Raw API map\r\n\r\n- `POST /api/deploy` — deploy a new app or append a version with `createVersion=true`.\r\n- `GET /api/deploy/content?code={code}&version={version}` — read metadata and source.\r\n- `GET /api/deploys/{code}/versions` — list version history and `likeCount`.\r\n- `PATCH /api/deploys/{code}/versions/{version}` — overwrite or set status for an unlocked version.\r\n- `DELETE /api/deploys/{code}/versions/{version}` — delete one unlocked version. Treat deletion as sensitive; ask first unless the user explicitly requested it.\r\n- `PATCH /api/deploys/{code}/current` — switch the public current version when needed.\r\n\r\n## Response handling\r\n\r\nOn success, save and report relevant fields:\r\n- `code`\r\n- `url`\r\n- `detailUrl`\r\n- `versionUrl`\r\n- `versionNumber`\r\n- `qrCode`\r\n- `preserveHint`\r\n\r\nIf an API response contains `errorCode`, `hint`, `detail`, `stage`, `requestId`, or `retryAfterSeconds`, use those fields in troubleshooting. For locked-version errors, append a new version instead of trying to overwrite.\r\n\r\n## Best practices for agents\r\n\r\n- Prefer one high-quality deploy over many tiny edits.\r\n- For user-visible pages, include Open Graph tags when sharing matters.\r\n- Keep CSS/JS inline when practical; avoid large base64 images.\r\n- Use meaningful stable codes for recurring content, e.g. `ai-daily`, not `ai-daily-0508`.\r\n- If updating an existing code, read versions first and avoid touching liked versions.\r\n- Treat htmlcode.fun as a fast publication channel, not a full static hosting platform.\r\n- Tell the user when Vercel, Netlify, GitHub Pages, or a real app host is a better fit.\r\n\r\n## Good fit\r\n\r\n- Temporary landing pages\r\n- Demo pages\r\n- Shareable documentation pages\r\n- QR-linked event or campaign pages\r\n- AI-generated single-file frontends\r\n- Recurring reports with stable short links and version history\r\n\r\n## Poor fit\r\n\r\n- Multi-page sites with shared assets\r\n- Framework builds\r\n- Large production frontends\r\n- Apps requiring backend auth, databases, or secrets\r\n- Team workflows with preview environments and rollback controls\r\n","tags":{"latest":"1.3.0"},"stats":{"comments":0,"downloads":486,"installsAllTime":1,"installsCurrent":1,"stars":2,"versions":2},"createdAt":1776328239412,"updatedAt":1778492618017},"latestVersion":{"version":"1.3.0","createdAt":1778179861150,"changelog":"Sync with html-deploy 1.3.0: current htmlcode.fun API, required descriptions, versioned updates, safer get output, and likeCount preflight checks before editing or deleting versions.","license":"MIT-0"},"metadata":null,"owner":{"handle":"520xiaomumu","userId":"s172qaj3pqgx3n4jpvcg0zmke583v6a1","displayName":"Xiao Mu","image":"https://avatars.githubusercontent.com/u/207085896?v=4"},"moderation":null}