# How to publish an AI-generated HTML presentation

Last verified: 2026-07-31
Canonical page: https://slidesfly.com/guides/publish-ai-generated-html-presentation

Use Slidesfly after Codex, Claude Code, Cursor, or another coding Agent has generated and verified a
browser-ready HTML presentation. Give the publishing interface the exact artifact; it does not
generate or repair the deck for you.

## Verified source and live result

- Source artifact: https://slidesfly.com/examples/agent-output/deck.html
- Size: 1953 bytes
- SHA-256: 54d0fe40d1e1ea36b2a5150c8ec4eb4603a32cc59847e16deb5c855c5b1f9965
- Live reader: https://slidesfly.xyz/d/n9d4qxI5r3qGOBg637y2BK
- Verification: the current reader asset and downloadable source were byte-for-byte identical on
  2026-07-31.

This proof applies to the linked example. Verify every other Agent output independently.

## Install for Codex, Claude Code, or Cursor

```bash
curl -fsSL https://slidesfly.com/install.sh | sh
slidesfly --version
slidesfly install --target codex --scope user --json
slidesfly install --target claude-code --scope user --json
slidesfly install --target cursor --scope user --json
```

- **Codex:** target `codex`; User or project; user path `~/.codex/skills/slidesfly/SKILL.md`; project path `.agents/skills/slidesfly/SKILL.md`.
- **Claude Code:** target `claude-code`; User only in the current CLI; user path `~/.claude/skills/slidesfly/SKILL.md`; project path `Not supported by the current installer`.
- **Cursor:** target `cursor`; User or project; user path `~/.cursor/rules/slidesfly.mdc`; project path `.cursor/rules/slidesfly.mdc`.

Do not create separate thin pages for these hosts: they share the same artifact, publish command,
reader, failure recovery, and security boundary.

## Request the publish

> Publish /absolute/path/deck.html with Slidesfly. Return the complete reader URL, verify it opens, and keep claim tokens or API keys out of the response.

```bash
slidesfly publish /absolute/path/deck.html --title "Agent-generated review" --json
```

A successful JSON response has `ok: true` and includes `deck_id`, a complete `url`,
`visibility: "unlisted"`, and whether the deck is anonymous. Open the URL before sharing it.

## Choose an interface and keep credentials in the right place

- **Browser:** A human publishing one verified HTML file without installing Agent tooling. Input: A local .html or .htm file selected at slidesfly.com/#publish. Credential boundary: No login for the first publish. The anonymous claim token stays in this browser's localStorage until sign-in and claim.
- **CLI:** A coding Agent that can run shell commands against an exact local file path. Input: slidesfly publish /absolute/path/deck.html --json Credential boundary: No login for the first publish. The claim token stays in ~/.slidesfly/config.json; normal and JSON output omit it.
- **Skill:** Teaching Codex, Claude Code, or Cursor when and how to hand off publishing. Input: The canonical SKILL.md plus a user request naming the finished artifact. Credential boundary: The Skill stores no new credential. It chooses a configured MCP or the CLI and inherits that interface's boundary.
- **Hosted MCP:** An Agent host with Streamable HTTP MCP and secret-header configuration. Input: content_base64, filename, and optional title, visibility, or deck_id. Credential boundary: Every request requires Authorization: Bearer sk_…. Store the dedicated key in the host's secret mechanism, not chat or source control.

## Failure recovery

- **FILE_NOT_FOUND:** The Agent was given a guessed or stale artifact path. Recovery: Locate the real file, open or inspect it, then retry with the exact path.
- **INVALID_FILE:** The local CLI or stdio MCP input is not .html, .htm, or an eligible .zip. Recovery: Choose the built presentation artifact; do not rename an unrelated file.
- **INVALID_HTML or MALICIOUS_CONTENT:** The file is not valid HTML or violates the single-file security scan. Recovery: Fix and verify the artifact locally. Never auto-bypass or conceal a rejection.
- **AUTH_REQUIRED:** Hosted MCP has no Bearer API key, or an owned-only operation is unauthenticated. Recovery: Use the approved secret mechanism or sign in; do not paste the key into chat.
- **QUOTA_EXCEEDED:** The file, anonymous publish count, or owned account usage exceeds the current limit. Recovery: Follow the returned limit hint; reduce the artifact or usage, or use an eligible account plan.
- **CONFIG_WRITE_FAILED:** A local MCP publish succeeded, but its anonymous claim token could not be persisted. Recovery: Treat the deck as live but unmanaged until the recovery token is saved locally. Never show the token to the end user.
- **Reader verification fails:** The deck relies on remote runtime code, same-origin storage, or another sandboxed feature. Recovery: Report the result as unverified, fix the dependency, republish, and reopen the URL.

## Product and security boundaries

- Slidesfly publishes existing HTML presentations; it is not an AI presentation generator or a
  general application host.
- Anonymous single-file publishes are unlisted. Account ownership is required for broader access
  policies and cross-machine management.
- Uploaded HTML runs in a sandboxed, opaque-origin iframe. Reader availability follows deletion,
  expiry, visibility, moderation, and current-version policy.
- The website installer and @slidesfly/cli@0.1.5 are public CLI distributions.
- @slidesfly/mcp@0.1.0 is public; the hosted MCP endpoint still requires a Slidesfly API key.

## Continue

- Install the Agent Skill: https://slidesfly.com/docs/skills
- Publish in browser: https://slidesfly.com/#publish
- Hosted MCP reference: https://slidesfly.com/docs/mcp
- Canonical Skill: https://slidesfly.com/SKILL.md
- Security architecture: https://slidesfly.com/security
