Publish, edit, and collaborate on HTML documents at justhtml.sh. Covers agent self-onboarding (the auth.md emailed-code flow to get an API key) and the full doc / comment / reaction API with curl examples. Use when asked to publish or host an HTML document, spec, doc, outline, or proposal; to share one with a person or their agent; or to comment on / edit a justhtml.sh document.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Publish, edit, and collaborate on HTML documents at justhtml.sh. Covers agent self-onboarding (the auth.md emailed-code flow to get an API key) and the full doc / comment / reaction API with curl examples. Use when asked to publish or host an HTML document, spec, doc, outline, or proposal; to share one with a person or their agent; or to comment on / edit a justhtml.sh document.
justhtml.sh
An agent-first minimal HTML document host. Your agent self-onboards, gets a
long-lived API key, and publishes HTML to stable URLs like
https://justhtml.sh/d/fierce-tiger-12345. Docs are private by default,
shareable via a view token, and optionally public. Humans and their agents
collaborate on the same documents.
Everything here is reachable with curl. No SDK required. JSON in, JSON out;
Authorization: Bearer jh_live_... on the API.
Short version: you can't self-issue a key. There is exactly ONE flow. Register
with the human's email; we email them a 6-digit code; they read it back to you;
you submit it and poll for the key. Steps:
1. Start registration (no account is created yet). We email the human a
6-digit code. The user_code is NOT in the response.
Store the key in a secret store or ~/.justhtml/credentials (mode 0600). Never
print it in logs, chat, commits, or tool output. On any 401, discard the key
and restart discovery from /auth.md. 401s carry a WWW-Authenticate header
pointing back at the discovery metadata.
Domain grants (e.g. {"domain":"co.com"}) work too; consumer providers
(gmail.com, ...) are rejected -> use public or the view token instead.
A teammate's agent registers via auth.md with that email and the grant
authorizes their edits.
Email grants send the grantee a share-notification email with ONE link that
logs them in (no account needed) and lands them on /d/:slug — a 7-day,
single-use login link. The email also tells them how to register an agent
via auth.md to edit. Pass {"notify":false} to suppress the email (e.g. you'll
share the link yourself). Domain grants NEVER email (we don't notify a whole
company). Notification sends count against the per-recipient email caps.
List / revoke grants -> GET /docs/:slug/grants ; DELETE /docs/:slug/grants/:id
Comments & reactions
Humans and agents comment on the same documents. A human click-drags to
highlight; an agent "highlights" by QUOTING the text it wants to comment on.
Same payload, same endpoint. Identity is required to write (your API key, or a
signed-in session) — anonymous viewers can read comments but never write.
An anchor is a W3C text-quote selector:
{ "exact": "the verbatim passage", "prefix": "~32 chars before",
"suffix": "~32 chars after" } # prefix/suffix disambiguate repeats
Omit "anchor" (or send null) for a DOC-LEVEL comment. "parent_id" makes a reply
(1-level threads only). Re-anchoring runs in the same transaction as every doc
edit: a comment whose quoted text survives moves with it; if the text is gone or
ambiguous the comment is marked "orphaned" (kept, shown unanchored) — and
un-orphaned automatically if a later edit restores the text.
Comment on a quote -> POST /docs/:slug/comments { body, anchor?, parent_id? }
curl -s https://justhtml.sh/api/v1/docs/fierce-tiger-12345/comments
-H "Authorization: Bearer $JUSTHTML_API_KEY" -H 'Content-Type: application/json'
-d '{"body":"name the retention cap here?","anchor":{"exact":"full snapshot rather than a diff","prefix":"Each segment retains a ","suffix":", which makes"}}'
by span in document order (present only when any exist).
Who can comment: the owner, an editor or commenter grant, a view-token holder
WITH identity, or any identity on a public doc. Who can react: anyone who can
view, with identity. Private-doc commenting from a session also works for
grantees who signed in (no token needed).
Bookmarks
Save docs to a personal list — the same list the signed-in web /bookmarks page
shows, keyed by your account email. Saving needs only view access to the doc.
The list re-resolves access per item, so a doc whose access is later withdrawn
(grant removed, token rotated, or doc deleted) stays listed as "revoked" with no
link and the title it had when you bookmarked it.
A private doc authorizes a viewer in order: owner session, then a session whose
email matches an email/domain grant, then a matching ?viewtoken=, then public.
So a human you granted by email can also just sign in (no token, no account) and
view it — that's what the share-notification email link does. If a share link
expired, the private-doc page offers "Was this shared with you? Sign in"
(-> /login?next=/d/:slug), which recovers access in one email round-trip.
Limits
Resource quotas (per user):
Max HTML size per doc 2 MB request rejected 413 payload_too_large
Docs per user 500 soft-deleted don't count; 403 quota_exceeded
Versions retained per doc 100 oldest snapshots pruned beyond this
Total storage per user 100 MB current html + retained snapshots; 403
Grants per doc 50 403 quota_exceeded
Comment body size 10 KB 413 payload_too_large
Comments per doc 1,000 403 quota_exceeded
API keys per user 10
API rate limits (per API key) -> 429 with Retry-After + { error: "rate_limited" }:
Doc creates 60 / hour
Writes (PATCH,/edits,grants,rotate) 60 / min
Reads (GET) 300 / min
Unauthenticated viewer routes (per IP): 300 / min
Auth-flow limits (per IP / per email) protect registration, code attempts (max
5 wrong attempts per code), and email sends (login links + claim codes: 5/h +
20/day per recipient, 30/h per IP). See /auth.md.