PLUGIN brewdoc / Skills

publish

haiku model-invocable

Shares text, markdown, JSON, a file, a folder or a ZIP site on brewpage.app (free, no sign-up) and returns the link. Private means unlisted, not locked: anyone with the link can open it unless a password is set. Pick the visibility before uploading; owner tokens go to a local history file and never into the conversation.

BrewPage needs no account; anonymous publications last up to 30 days, or up to 90 days with a profile. Updates retain the original expiry. To compare hosting options, see brewpage.app/compare.

Optional: sign in free (Google or any email) at account.brewpage.app to manage publications and owner-token history. Publications still expire; sign-in is not needed to publish.

Quick reference

FieldValue
Command/brewdoc:publish [prompt] <text|file_path|directory_path|zip_path> [--ttl N] [--entry filename] [--delivery-mode path|subdomain]
Options--ttl N days (default 15); --entry site entry file; --delivery-mode creation mode
Modelhaiku
InvocationType the command, or ask Claude (“publish this”, “share a link”). Claude may start it itself; headless and dontAsk runs need Skill(brewdoc:publish *) allowed
PermissionsNo Bash or Write prompts: one scoped rule, scripts/brewpage-run.sh, covers every step
RequiresPOSIX runtime (macOS/Linux or WSL), bash, curl, jq, Python 3 (python3) with fcntl; git inside Git checkouts; sites also node, unzip, and directories zip. Native Windows Python is unsupported

When to use

GoalCommand
Share a report/brewdoc:publish report.md
Host a JSON dataset/brewdoc:publish '{"status":"ok","count":42}'
Upload any file, expires in 1 day/brewdoc:publish screenshot.png --ttl 1
Deploy a static site/brewdoc:publish ./dist/ --entry index.html
Own address for public content/brewdoc:publish report.md --delivery-mode subdomain

Example

/brewdoc:publish report.md --ttl 30

The skill asks for a namespace (public or a private slug) and an optional password-file path, then prints the server’s link and where the owner token was saved:

Published: <exact server URL>
Owner token saved to <project-root>/.claude/brewpage-history.md

Modes

InputTypeEndpoint
Text or markdown stringHTMLPOST /api/html?format=markdown
Text starting with <!doctype html or <htmlHTMLPOST /api/html?format=html
Existing .html/.htm fileHTMLPOST /api/html?format=html, a real page in any namespace, not a raw download (non-UTF-8 file: POST /api/files, bytes untouched)
Existing .md/.markdown fileMARKDOWNPOST /api/html, rendered page, not a raw download (non-UTF-8 file: POST /api/files, bytes untouched)
Starts with { or [JSONPOST /api/json
Any other existing fileFILEPOST /api/files (multipart)
Directory or .zipSITEPOST /api/sites

SITE is checked first. Site entry follows the server rule: --entry, else the root index.html, else the shallowest .html (ties by name). To start on another page, pass --entry.

Upload limits. brewpage.app allows 25 MB per request, 200 files, 5 MB per file and 20 MB in total. Ask the skill to check the limits, or run curl -s -A "ClaudeCode/6.12.10 (+https://brewpage.app)" https://brewpage.app/api/limits; the skill reads them itself before a big site.

Hosting modes and good to know #

--delivery-mode takes path or subdomain. Omitted, the skill sends no X-Delivery-Mode header and the server chooses. It applies to fresh publications with new-v1 routing metadata.

Fresh publicationDefaultExplicit choice
HTML format in public; Markdown, JSON or file in any namespacePromotion (path)path or subdomain, also with a password
Site, any namespaceSubdomainForced; requested path still publishes with a mismatch notice
HTML format outside publicSubdomainForced; requested path still publishes with a mismatch notice

Promotion serves from a brewpage.app address with stricter HTML limits (scripts, cookies, embeds). Dedicated subdomain gives its own origin with fewer limits: choose it if Promotion breaks your HTML. The response decides the effective mode, and the server may return an existing publication: share the returned link exactly, trailing slash included. New password-protected links stay clean (never append ?p=).

Good to know

  • In public, pages, sites and files are listed in the public gallery and the sitemap, so Google, Bing and AI search can find and index them and people can discover them. Use it for anything meant to be found or shared. Anyone can find and read a public publication, so never put secrets, tokens or personal data there. A private slug (default) is unlisted and not indexed; anyone with the link can still open it.
  • Headless runs need explicit namespace and password choices supplied or previously confirmed for this content/workflow. An unanswered or ambiguous choice stops the upload.
  • A rejected upload prints FAILED: publish rejected (HTTP <status>: <message>) with the server’s reason. After a successful OK line, lines starting with NOTICE: say what the server skipped or adjusted.
  • Limits behind the headline numbers: a ZIP expands to at most 40 MB, paths stop at 380 characters (900 bytes) and names at 200 bytes. The skill’s own read-only limits command prints the current values.
  • Do not publish .env files or secrets: pages are reachable by anyone with the link, and content expires after the TTL.
Flow in detail #

Arguments. --ttl N (default 15), --entry <filename>, optional --delivery-mode path|subdomain (other values are rejected before upload). A prompt with no path and no inline text asks once what to publish.

Detect. For a path, brewpage-run.sh probe '<path>' prints TYPE:, the absolute PATH: and size stats. Types are classified SITE, MARKDOWN, HTML file, FILE, JSON, HTML text in that order.

Namespace. Options: public, a suggested slug (3-16 chars named after the content, such as api-docs; never random), or custom. An explicit Skip selects the suggested private slug. An unanswered or ambiguous choice stops the upload.

Password. Option 2 takes an absolute path to an existing file with at least four characters. Explicit option 1 or 3 selects no password; an unanswered or ambiguous choice stops the upload. The helper copies the bytes into private header files: never shell literals, curl arguments or chat output; control characters stop the upload.

Publish. Every slot is re-validated by the script (ns, days, entry, delivery_mode, password_file); an invalid value is re-asked, never cleaned up. Commands over 8,000 characters are refused, so long text goes through stage: chunks of up to 6,000 characters, then publish --run <id>. cleanup --run <id> drops a staged but unpublished run.

Result. The script prints OK <url> (sites add | Files: N), CONFIRM: ... (exit 2, nothing uploaded) or FAILED: ... (response body withheld, since it may hold a token). Flagged archives also print REVIEW_SHA256: <digest>: after reviewing the manifest and confirming, rerun the same command with --confirmed --review-sha256 <digest>, using that displayed digest. Changed archive bytes require a fresh manifest, digest and approval; a stale digest exits 2 without uploading. On OK the skill shows Published: <url> (sites: Published site: <url>). The run directory is removed on every exit.

Security, permissions and history #

One script, one rule. Every shell step is bash ${CLAUDE_SKILL_DIR}/scripts/brewpage-run.sh <probe|stage|publish|cleanup> ... with single-quoted values. The single allowed-tools rule matches that exact shape, so nothing prompts, headless included. A quoted script path, cd prefix, && chain or $(...) falls back to the normal permission prompt.

Owner token. Stays inside the script and local history; the model sees the manifest, review digest and status lines.

Run isolation. A private brewpage.XXXXXX directory (mode 700) under $TMPDIR, else /tmp, outside .claude/; only the script creates and removes it, so no Write grant is needed.

History file. <project-root>/.claude/brewpage-history.md, mode 600, git-ignored. Root resolution: CLAUDE_PROJECT_DIR, Git, an upward .git/.claude search (a profile .claude is skipped), or the current directory. Existing rows are never rewritten.

| Date | URL | Owner Token | TTL | Type | Owner API | Identity |
|------|-----|-------------|-----|------|-----------|----------|
Delete, update and change hosting #

Use the stored Owner API (ownerLink), never a hostname split into namespace and ID. OWNER_API is that URL and TOKEN the stored owner token.

curl -s -A "ClaudeCode/6.12.10 (+https://brewpage.app)" -X DELETE "$OWNER_API" -H "X-Owner-Token: $TOKEN"
curl -s -A "ClaudeCode/6.12.10 (+https://brewpage.app)" -X PUT "$OWNER_API" -H "X-Owner-Token: $TOKEN" -F "archive=@/absolute/path/to/new-bundle.zip"

PUT replaces a site’s file set and keeps the host and the delivery mode; do not send X-Delivery-Mode on it. Old publications (made before 5 October 2026) are read-only: 409 OLD_PUBLICATION_READ_ONLY; publish anew and report only the new public URL. Keep the owner token in protected local history, never in conversation or logs.

Owner-only GET and PATCH /api/{type}/{ns}/{id}/hosting support html, files, json, kv and sites. Read the current version with GET, then PATCH with X-Owner-Token and {"deliveryMode":"subdomain","expectedVersion":1}, using the actual version from GET. Use the returned link and version. Legacy publications without new routing metadata remain unchanged; sites and non-public HTML-format pages stay on subdomain. Mode mismatches are reported rather than rejected. Eligible switches retain the reserved host and redirect the previous link.

ResponseMeaning
403Owner authorization failed
400Invalid mode or malformed version
Success with stale-version noticeThe requested mode was applied; inspect the returned version and link
Success with mode-mismatch noticeA forced-mode publication keeps its subdomain, or a legacy publication keeps its existing link
503Hosting changes unavailable; creation can fail with HOST_ALLOCATION_FAILED

Passwords and revocation cannot recall downloaded or cached copies.

Site bundles and tests #

A directory is packed by scripts/publish.mjs pack --dir <dir> --out <archive.zip>: stale target removed, zip status checked, result verified with unzip -t and a non-zero size; any failure deletes the archive before curl runs.

Local inspection checks the central directory before decompression: at most 25 MiB compressed, 40 MiB expanded, 200 files, 400 entries, 5 MiB per member and 1 MiB metadata. ZIP64 and split archives are refused; each unzip check has a 10-second timeout. These local budgets are separate from server upload limits.

The pack is an allowlist: only web-asset extensions (.html .css .js .json .svg .png .woff2 .pdf .md and similar) go in. System files (.DS_Store, __MACOSX/, Thumbs.db, desktop.ini) are dropped and listed under SKIPPED, never flagged and never counted toward the server’s file limit. Hidden files and folders (.env, .git/) are dropped too, except the root .well-known/, which ships with its files, extension-less ones included (such as apple-app-site-association); node_modules/ and symlinks are dropped as well. A supplied .zip is copied into the private run directory; inspection, hashing and upload use that same copy, leaving the source unchanged. System entries are left alone (the server drops them), hidden entries are flagged, and an entry matching .env, id_rsa, secret, credential, password, token, .pem, .key, .p12, .crt or .map blocks the upload until you confirm its displayed digest. Temporary payloads are deleted on every exit, including confirmation; no archive is cached between attempts.

Tests: bash brewdoc/skills/publish/tests/run.sh (no network, no real upload; they do not prove server rollout).

md-to-pdf

Convert markdown to PDF, then publish the file.

brewpage-mcp

Official MCP server for the BrewPage API: claude mcp add brewpage -- npx -y brewpage-mcp@1.14.4

OpenAPI spec

Full API contract (Scalar UI); REST base URL https://brewpage.app/api.

GitHub source

Source code, SKILL.md and scripts.

Brewdoc overview

All brewdoc skills.

Update: /brewtools:plugin-update, /reload-plugins, then /brewcode:setup-status upgrade - FAQ