Publish HTML artifacts to stacktr.ee and get back a private URL you can paste into the conversation. Use when the user asks to ”publish this”, ”share this page”, ”drop this on stacktree”, or whenever
Publish an HTML artifact to stacktr.ee and return the URL into the conversation.
Do not use this for code that isn't a complete static page (e.g. fragments, JSX components without a host page). Wrap the fragment in a minimal HTML shell first.
STACKTREE_API_KEY=stk_live_... # generate at https://app.stacktr.ee/api-keys
STACKTREE_API_URL=https://api.stacktr.ee # optional override
If STACKTREE_API_KEY isn't set, ask the user to set it before retrying.
A fully autonomous agent with a funded wallet can provision its own key over
x402, no human and no dashboard:
@x402/fetch,or the second-state x402 skill). It needs USDC on Base; gas is covered.
POST https://api.stacktr.ee/provision returns a 402; the x402 clientsigns a USDC authorization, retries, and gets back a persistentstk_live_ key. Set it as STACKTREE_API_KEY and continue.
POST /unlock?feature=custom_domain(or higher_limits). See <https://stacktr.ee/x402> for the full flow.
Only do this when there is genuinely no human to set a key; otherwise the
dashboard key is simpler.
The fastest path when a paid action comes up mid-task (provision, make a
site permanent, custom domain, higher limits):
POST https://api.stacktr.ee/pay/sessions with { "feature": "provision" }(no auth) or { "feature": "custom_domain" } etc. with the API key.
qr field that is a ready-to-print terminalQR plus a short url. Print both and say what it costs (the amount
field) and why.
poll.url every few seconds; on provision the poll returns theAPI key once (set it as STACKTREE_API_KEY), on unlocks it confirms the
feature is active. Continue the task without further prompting.
"amount_minor": 1000 on provision (oruse { "feature": "topup", "amount_minor": 1000 } later). Anything above
the action's price becomes a prepaid balance, and future paid actions draw
from it silently — no more QRs until it runs out.
Every publish via this skill applies tighter defaults than the raw API:
stacktr.ee/p/<22-char-token>/) — not enumerable--expires-neversk-, xoxb-, ghp_, AWS AKIA) reject the publish; pass --pii-check warn to overrideX-Robots-Tag: noai, noimageai on every served pageIf the user explicitly asks for permanence, longer reach, or relaxed PII, surface the override flags rather than disabling the defaults silently.
<!doctype html>...</html>). If you only have a body fragment or markdown, wrap it.scripts/publish.sh (in this skill's directory) with the artifact piped on stdin. Pass options via flags:--password <secret> — basic-auth gate--expires-in-hours <n> or --expires-never--burn-after-read--agentation — enables the on-page feedback toolbar--public-slug <slug> — opt into {slug}.stacktr.ee/--pii-check off|warn|block — defaults to block via this skill (warn at the API)url. Surface the URL inline in your reply, plus expiry and any PII warnings.Publish a quick artifact:
echo "$ARTIFACT_HTML" | bash scripts/publish.sh
# → { "url": "https://stacktr.ee/p/AbC.../", "expires_at": 1781234567, ... }
Publish with password + 7-day expiry:
echo "$ARTIFACT_HTML" | bash scripts/publish.sh --password hunter2 --expires-in-hours 168
Replace an existing site (preserves the URL):
echo "$ARTIFACT_HTML" | bash scripts/publish.sh --update <id-or-slug>
By default every URL is unlisted (stacktr.ee/p/{22-char-token}/) and not crawlable. Anonymous uploads expire in 24h. Authed (API-key) uploads default to never expire. Pass --public-slug only when the user wants a discoverable URL.
If the artifact contains values that look like API keys, emails, SSNs, or credit cards, the response includes X-Stacktree-Pii-Warning. Surface this to the user before sending the link to anyone.
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.