/clawnify:build-a-clawnify-websitefrom Clawnify
Build and ship a Clawnify website (Astro on Cloudflare Workers) with built-in forms, images and assets. Use when creating or editing a website, adding a contact/waitlist/signup form, deploying local edits, or publishing an existing website draft.
Ships in Clawnify. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A Clawnify website is an Astro project deployed to Cloudflare Workers. One site per organization. You write pages; the platform owns hosting, forms and the publish flow.
npx clawnify@latest init --type website --name "My Site" website
cd website && pnpm install && pnpm dev # http://localhost:4321
Always invoke the CLI as npx clawnify@latest <command> — never a
global or pinned install; stale CLIs miss deploy guards and fixes.
website/
src/pages/ # one .astro file per route (index.astro → /)
src/layouts/ # shared shell: nav, footer, <head>
src/blocks/ # platform blocks you've adopted (see Forms below)
public/ # images, favicons — served as-is from /
This is the single most common mistake. A site needs a contact or waitlist
form, and the obvious move is to write a <form> and POST it somewhere — your
own endpoint, a third-party form service, or the platform's submit URL with the
website id pasted in. All three are wrong, and the last one looks right enough
to survive review.
Clawnify has a form system. It captures submissions, stores them, can email you, and can hand each one to an agent or a flow. You get all of it by using the Forms block rather than writing a form yourself.
The submit target is computed at render time from WEBSITE_ID — a
variable the platform bakes into your site's Worker — plus the form's id:
const env = (Astro.locals as { runtime?: { env?: Record<string, string> } })?.runtime?.env;
const websiteId = env?.WEBSITE_ID ?? "";
const action = websiteId ? `https://provision.clawnify.com/forms/submit/${websiteId}/${formId}` : "";
Never hardcode the website id. It is baked per Worker so a site can only
ever submit to itself — hardcoding throws that away, and the literal goes
stale the moment the site is recreated. An empty action in local astro dev
is expected: there are no Worker vars locally, so the form simply no-ops.
The submit script POSTs JSON with Content-Type: text/plain;charset=UTF-8.
That is not a typo — text/plain is CORS-safelisted, so the request needs no
preflight, which matters because the platform can't know your site's origin in
advance. The route parses the text body as JSON.
Keep the Turnstile widget. The ingest rejects a submission with no token,
so a form without the widget fails every time with "Verification required".
The sitekey shipped in the block is public and pairs with the platform's
secret; the widget will not validate on localhost, only on a real hostname.
Sites are seeded with the platform's block library at creation. If yours has
src/blocks/Forms/Contact.astro, import it and go. If it doesn't — an older
site, or one scaffolded bare by the CLI — copy it in from the website template
and adapt it.
The design is yours; the plumbing is not. Restyle the markup, labels and classes freely. Preserve, exactly:
action (never a prop, never a literal),data-clawnify-managed-form attribute,export const schema,<form>,
or an injected action becomes a way to point your form at someone else.There is no submit script to copy. The runtime lives in the framework catch-all
(src/pages/[...path].astro) and binds every data-clawnify-managed-form on
the page. If the block you inherited still has its own inline <script> and a
data-clawnify-form attribute, it is the older shape: it still works, and you
can migrate it by deleting the script and renaming the attribute. Do not carry
both attributes on one form, and do not add data-clawnify-form to a managed
form: older blocks bind that selector unconditionally, so the form would submit
twice.
Two options, and the default is unchanged.
successText prop, rendered into the
status line.successUrl prop, or data-success-url on any form
you hand-built. A site-relative path (/thanks) or an absolute https://
URL (a booking page is fine). Anything else is ignored and the message is
shown instead, which is what keeps javascript: out of the navigation.A redirect to a thank-you page is also the only way to count a form conversion in the analytics tool, which has no custom events: the dashboard Submissions panel counts submissions, but a pageview is what gives you a rate.
Need a side effect on success, like setting a cookie? Listen for the
clawnify:form-success event on the form. It is cancelable, so
preventDefault() suppresses the redirect if you would rather navigate
yourself.
The stock block collects name, email and message. Two ways to go beyond that, and the right one depends on whether your form is registered:
Forms/Contact) are schema-locked:
the ingest 422s any field it doesn't expect. Give extra inputs no name
attribute and have the submit script fold them into message.The Contact block can collect one PDF per submission (job applications, RFQs).
Off by default — enable it with the block's attachment prop (and optionally
attachmentLabel), then publish: the file field is registered at publish
time, and the ingest rejects files on forms that haven't registered one. Rules
the platform enforces server-side (don't fight them client-side): PDF only,
verified by content not by extension, max 10 MB. The submission's payload
carries the filename and a download link that only the site's own organization
can open — the file is never on a public URL. When a file is attached the
submit script posts multipart/form-data instead of JSON; both are
preflight-free, and the block already handles the switch.
Every submission is stored and visible in the dashboard. From there it can notify an email address, or fan out to an agent or a flow — which is how a signup becomes a CRM record or a WhatsApp message without you writing a backend. Set the notification address in the dashboard, not in the site.
Put them in public/ and reference them with an absolute path (/img/hero.jpg).
They're served as static files. Pull in real assets at real resolution rather
than linking someone else's CDN from your markup.
npx clawnify@latest deploy --org <org> # upload local edits from the website folder
npx clawnify@latest deploy --draft --org <org> # build a private preview for review
npx clawnify@latest website publish --org <org> # take the current hosted draft live
When asked to ship local edits, use deploy directly. A signed-in deploy or a
push to the workspace repo normally goes live. If the site already has
unpublished changes, both sets of edits land in the draft. The CLI reports the
result. For a review before going live, use deploy --draft even on a first
deploy. It creates or updates the workspace’s shared website draft. Visitors to
an existing site keep seeing the published version. A signed-out deploy also
creates a private draft.
When asked to publish a draft already reviewed on Clawnify, use website publish.
It publishes the whole current draft, waits for the live result and prints the URL.
The dashboard's Publish to live button performs the same action.
A linked website or workspace identifies its organization. When working across
organizations, pass --org <slug-or-id> explicitly. From an unlinked folder
with several organizations, website publish asks you to name one.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub clawnify/skills --plugin clawnify6 skills in this plugin
/build-a-clawnify-appAuthor a Clawnify app end-to-end — the canonical Hono + React + Vite + @hono/zod-openapi + @clawnify/db (Drizzle) stack, schema.ts as the single schema source of truth (DDL generated via pnpm db:generate), OpenAPIHono routes (createRoute) that auto-generate an OpenAPI spec, and platform-injected identity via user()/orgId()/caller(). Use when building or modifying an app that deploys to the Clawnify platform./clawnify-knowledgeRoute a question to the right Clawnify knowledge source before answering or building. Covers how-to-use-Clawnify product docs, your org's company knowledge (brand, pricing, policy, SOPs), a specific client or project's reference, and durable memory. Use whenever a task needs a company fact, a platform how-to, or client-specific context from a connected Clawnify organization./fix-a-clawnify-agentDiagnose and fix a Clawnify AI agent that veers off its instructions, ignores specific rules, forgets things, repeats the same mistake, or burns a lot of API credits. Use when someone says their agent (e.g. "Ash") won't follow instructions, keeps going off-path, or is expensive — read the agent's own sessions, find the real cause, and fix the instructions / sessions / flow instead of patching blind./organize-company-knowledgeTurn a dump of raw company files into a clean, foldered, citable Company Knowledge corpus — the company's brain. Use when the user has dropped many files into the Company Knowledge section (or connected a Drive) and wants the agent to distill and organize them: cluster by topic, distill each into a canonical markdown doc (merging across sources into reusable playbooks), file it into a folder, tag and link it, and propose it for review./use-the-clawnify-cliUse the Clawnify CLI end-to-end — authenticate, scaffold, run locally, deploy apps and websites, link projects, manage orgs, and inspect deployed apps. Use when deploying to Clawnify from a terminal or wiring the CLI into scripts and coding agents.