Pubifact
domuk-k/pubifact
Hospedagem de artefatos self-hosted para agentes de IA em um clique
Ver no GitHubSkill que permite publicar arquivos HTML e Markdown em URLs compartilháveis via seu próprio Cloudflare Worker, sem depender de serviços terceirizados. Ideal para agentes de IA gerarem e distribuírem artefatos rapidamente, com suporte a renderização de Markdown e proteção por senha.
Instalação
npx convez-ai domuk-k/pubifact1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Publicar rapidamente resultados de análise ou relatórios gerados por agentes
- Compartilhar documentação ou notas renderizadas sem infraestrutura própria
- Distribuir artefatos HTML/Markdown com URLs permanentes e gratuitas
Veredito

Ferramenta bem pensada que resolve um problema real: agentes IA precisam publicar artefatos sem sair do fluxo. Implementação limpa com init guiado torna a configuração acessível mesmo para quem não domina Cloudflare Workers. Ideal para quem quer infraestrutura própria sem complexidade.
README
A tradução para o português deste README ainda está na fila.
pubifact
Turn a static HTML or Markdown file into a shareable URL with one command — for any AI coding agent (Claude Code, OpenCode, Codex, …). Markdown is rendered to a clean HTML page.
"publish foo.html" → https://pubifact.<you>.workers.dev/x7qk2abc.html
"publish notes.md" → rendered to HTML at the same kind of URL
"publish secret.md --password" → same, but viewers must enter the password
Two pieces:
| Piece | What | Where |
|---|---|---|
| skill | The thin client an agent runs (publish.sh + SKILL.md). Reads config, prompts you to run init.sh if none is set. | skills/pubifact/ |
| worker | A free POST file → URL service: Cloudflare Worker + R2, renders Markdown. | worker/ |
See DESIGN.md for the why.
Use the skill
Install it for your agent (Claude Code example — personal skills apply to every project):
npx skills add domuk-k/pubifact
Then ask your agent to "publish this" or "share this page". That's it.
How the first publish works — init-first. On the first publish the skill detects that no instance is configured and offers to set up your own free permanent instance (~2 minutes). No content is uploaded to any third-party host — your data only ever reaches your own infrastructure.
Alternatively, install by hand with a symlink:
ln -s "$PWD/skills/pubifact" ~/.claude/skills/pubifact
Set up your own backend (free, permanent)
One-time, ~3 minutes. Needs a free Cloudflare account. The skill's init.sh
walks you through it:
bash ~/.claude/skills/pubifact/init.sh setup
Or click the button below (no CLI needed):
After either path, add your endpoint and token to the config file:
{
"endpoint": "https://pubifact.<account>.workers.dev",
"token": "<your-upload-token>"
}
Default location: ~/.config/pubifact/config.json (written automatically by
init.sh; the token key is only needed if you set UPLOAD_TOKEN on the
worker).
Environment variables override the config file (advanced / CI use):
export PUBIFACT_ENDPOINT=https://pubifact.<account>.workers.dev
export PUBIFACT_TOKEN=<your-upload-token>
What init.sh does, step by step
If you prefer to do it by hand:
cd worker
npm install
npx wrangler login # opens browser, authorize
npx wrangler r2 bucket create pubifact # create the storage bucket
npx wrangler deploy # deploy the Worker — prints your URL
Recommended hardening:
npx wrangler secret put UPLOAD_TOKEN # require a bearer token on uploads
Then write ~/.config/pubifact/config.json with your endpoint and token.
Cost
Cloudflare free tier covers small usage at ~$0: Workers 100k requests/day, R2 10 GB storage and zero egress fees (ideal for serving HTML).
Worker API
| Method & path | Purpose |
|---|---|
POST /up | Publish. Body: multipart file (preferred) or raw bytes. Returns two text lines — the URL, then a one-time delete token — or JSON (url, deleteToken) if Accept: application/json. |
GET /:key | Serve the page as text/html. 404 if unknown. |
HEAD /:key | Headers only (for link unfurlers). |
DELETE /:key | Take the page down. Authorization: Bearer <delete-token> (or the operator's UPLOAD_TOKEN as master key). |
POST /up fields / params:
file— the artifact..md/.markdownfilenames are rendered to HTML; for a raw body use?type=mdand optionally?name=foo.md.password— optional. If set, the page requires it to view (HTTP Basic, any username; or?k=<password>). Protected pages sendCache-Control: private.- Size cap: 5 MB. If
UPLOAD_TOKENis configured, sendAuthorization: Bearer <token>.
curl -F file=@page.html https://<your>.workers.dev/up
curl -F file=@notes.md -F password=hunter2 https://<your>.workers.dev/up
# take it down later (token = line 2 of the publish response)
curl -X DELETE -H "Authorization: Bearer <delete-token>" https://<your>.workers.dev/x7qk2abc.html
# or from the skill:
bash skills/pubifact/publish.sh --down <url> --token <delete-token>
The delete token is shown once, at publish time. A page published before
this feature existed can only be removed with the operator's UPLOAD_TOKEN.
Caveats
- Pages are hosted on a public host; without
--passwordanyone with the link can open it and its JS runs. Use--passwordfor private content. --passwordgates reading (good for "share with specific people"). It is not a fit for NDA/regulated data: content still lives in your R2, and the gate is only as strong as the password. Keep contractually-restricted material in sanctioned infra.- An open upload endpoint can be abused; flip on
UPLOAD_TOKEN, the 5 MB cap, or Cloudflare rate-limiting if needed. - Artifacts must be self-contained — inline assets, no relative file refs.
Contributing
See CONTRIBUTING.md.
Security
See SECURITY.md for the trust model and how to report vulnerabilities.
License
MIT