Skip to content

domuk-k/pubifact

Repository files navigation

pubifact

CI MIT Cloudflare Workers

Agent-native artifact hosting — publish HTML or Markdown to a shareable URL on your own Cloudflare Worker. One command from Claude Code, Codex, or any agent with the skill installed.

"publish report.html"  →  https://pubifact.<you>.workers.dev/x7qk2abc.html
"publish notes.md"     →  rendered HTML at the same URL shape
"publish draft.md --password secret"  →  password-gated page

Your content never touches a third-party host — only your R2 bucket and Worker.


Two pieces

Piece Role
skill Thin client: publish.sh + SKILL.md. Agents call it on "publish this".
worker POST file → URL API on Cloudflare Workers + R2. Renders Markdown → HTML.

Design rationale: DESIGN.md


Use the skill (30 seconds)

npx skills add domuk-k/pubifact

Then ask your agent: "publish this HTML" or "share this page".

First run: if no instance is configured, the skill offers a ~2-minute setup for your own free permanent Worker. No upload happens until you own the endpoint.

Manual install:

ln -s "$PWD/skills/pubifact" ~/.claude/skills/pubifact

Set up your backend (~3 min)

Needs a free Cloudflare account.

bash ~/.claude/skills/pubifact/init.sh setup

Or one-click deploy:

Deploy to Cloudflare

Config written to ~/.config/pubifact/config.json:

{
  "endpoint": "https://pubifact.<account>.workers.dev",
  "token": "<upload-token-if-set>"
}

Manual deploy

cd worker && npm install
npx wrangler login
npx wrangler r2 bucket create pubifact
npx wrangler deploy
npx wrangler secret put UPLOAD_TOKEN   # recommended

Cost: Cloudflare free tier — Workers 100k req/day, R2 ~10 GB, zero egress for HTML serving.


Worker API

Method Path Purpose
POST /up Publish file → URL + one-time delete token
GET /:key Serve page (text/html)
HEAD /:key Link unfurlers
DELETE /:key Remove page (Authorization: Bearer <delete-token>)
curl -F file=@page.html https://<your>.workers.dev/up
curl -F file=@notes.md -F password=hunter2 https://<your>.workers.dev/up

Markdown (.md), size cap 5 MB, optional UPLOAD_TOKEN on uploads.


Security notes

  • Public URLs are world-readable unless --password is set.
  • Password gates viewing; not for regulated/NDA data — use sanctioned infra for that.
  • Enable UPLOAD_TOKEN + rate limits on public deployments.
  • Artifacts must be self-contained (inline assets; no relative file refs).

See SECURITY.md for the full trust model.


Related

  • domuk-k agent infrastructure
  • oh-my-workflow — orchestrate agents that produce artifacts to publish
  • Cloudflare skill: wrangler, workers-best-practices

Contributing

CONTRIBUTING.md

License

MIT

About

Agent-native, self-hostable artifact hosting — publish HTML/Markdown to a shareable URL on your own Cloudflare Worker

Topics

Resources

License

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors