# drophtml — HTML File Sharing API Upload and share HTML files at clean, shareable URLs. ## Setting Up drophtml with Claude Code Follow these steps to install and configure drophtml as a Claude Code skill. ### Step 1: Get an invite code drophtml is invite-only. Ask the user for an invite code from someone already using drophtml.com. The user must provide the invite code before you can continue — there is no way to register without one. ### Step 2: Register an account Once you have the invite code and the user's email, register: ```bash curl -s -X POST https://drophtml.com/api/v1/register \ -H "Content-Type: application/json" \ -d '{"email": "", "invite_code": ""}' ``` This returns JSON with four fields: - email: the registered email - api_key: Bearer token (starts with dh_) — save this securely - folder: 8-char hex folder ID for uploads - invite_code: the user's own invite code to share with others Show the user their invite_code so they can invite others. ### Step 3: Store credentials Store the api_key and folder securely. If the user has fnox with 1Password: ```bash # Store in 1Password via op cli, then reference in fnox config op item create --category=login --title="drophtml" \ --field="api_key=" --field="folder=" ``` Then add to the user's fnox config (~/.config/fnox/config.toml): ```toml [env.DROPHTML_API_KEY] provider = "op" item = "drophtml" field = "api_key" [env.DROPHTML_FOLDER] provider = "op" item = "drophtml" field = "folder" ``` If the user does not use fnox/1Password, store the values as environment variables or in whatever secret manager they prefer. ### Step 4: Create the skill file Create the file ~/.claude/skills/drophtml/skill.md with these contents: ---BEGIN SKILL FILE--- # Drop HTML Publish HTML files to shareable URLs via drophtml.com. ## When to Use This Skill Activate this skill when the user: - Says "publish", "share", or "upload" in the context of an HTML file or report - Wants a shareable link to an HTML file - Says "drop this html" or "publish this report" ## Prerequisites Requires DROPHTML_API_KEY and DROPHTML_FOLDER environment variables. If using fnox: credentials are loaded automatically via 1Password. If not using fnox: export DROPHTML_API_KEY and DROPHTML_FOLDER before running commands. ## How to Publish 1. Ensure the HTML file exists and is complete 2. Choose a URL-friendly slug name (lowercase, hyphens, alphanumeric) 3. Upload: ```bash curl -X POST "https://drophtml.com/api/v1/pages/$DROPHTML_FOLDER/" \ -H "Authorization: Bearer $DROPHTML_API_KEY" \ -F "file=@/path/to/file.html" ``` If using fnox, prefix with: fnox exec -- ## URL Format - Upload: POST https://drophtml.com/api/v1/pages/{folder}/{slug} - View: https://drophtml.com/{folder}/{slug} (public, no auth needed) ## Password Protection (Optional) Add the X-Page-Password header when uploading: ```bash curl -X POST "https://drophtml.com/api/v1/pages/$DROPHTML_FOLDER/" \ -H "Authorization: Bearer $DROPHTML_API_KEY" \ -H "X-Page-Password: mysecretpassword" \ -F "file=@/path/to/file.html" ``` Viewers see a password form, or append ?password=mysecretpassword to the URL. ## Listing All Pages ```bash curl -s "https://drophtml.com/api/v1/pages" \ -H "Authorization: Bearer $DROPHTML_API_KEY" ``` ## Deleting a Page ```bash curl -X DELETE "https://drophtml.com/api/v1/pages/$DROPHTML_FOLDER/" \ -H "Authorization: Bearer $DROPHTML_API_KEY" ``` ## Getting Your Invite Code To retrieve your invite code (to share with others): ```bash curl -s "https://drophtml.com/api/v1/me" \ -H "Authorization: Bearer $DROPHTML_API_KEY" ``` ## After Publishing 1. Share the URL — no auth required to view 2. Re-uploading to the same slug overwrites the previous version 3. Delete old pages when no longer needed ---END SKILL FILE--- ## API Reference Full OpenAPI 3.1 spec: https://drophtml.com/api/v1/openapi.json ### Endpoints POST /api/v1/register Register (requires invite code) GET /api/v1/me Get your profile and invite code (Bearer auth) POST /api/v1/pages/{folder}/{page} Upload HTML (Bearer auth) GET /api/v1/pages List your pages (Bearer auth) DELETE /api/v1/pages/{folder}/{page} Delete a page (Bearer auth) GET /{folder}/{page} View a page (public) ### Registration POST /api/v1/register Content-Type: application/json Body: {"email": "you@example.com", "invite_code": ""} Returns: {"email", "api_key", "folder", "invite_code"} Each account gets an API key (Bearer token prefixed dh_), an 8-char hex folder, and an invite code to share with others.