/anglesite:inboxfrom anglesite
Browses, triages, and exports form submissions from Keystatic by persisting them to Cloudflare D1. Useful when the owner needs to view, sort, answer, or export site form messages without digging through email.
Ships in anglesite. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Persist submissions from /anglesite:contact and /anglesite:forms to Cloudflare D1, surface them in Keystatic as a Form Submissions collection, and triage from there. Closes the gap of digging through email for a single submission and gives spam triage a real home. Custom forms and the contact form share one inbox, distinguished by formSlug.
Read EXPLAIN_STEPS from .site-config. If true or not set, explain before every tool call that triggers a permission prompt — say what you're about to do and why in plain language. If false, proceed without pre-announcing.
Read .site-config:
CONTACT_WORKER_URL or FORMS_WORKER_URL must be setCF_PROJECT_NAME and SITE_DOMAIN must be set (site has been deployed)If neither worker URL exists, tell the owner: "Set up /anglesite:contact or /anglesite:forms first — the inbox sits on top of those workers."
If INBOX_DB_ID is already set in .site-config, the inbox is already configured — skip to Step 6 (sync and triage) or Step 7 (export).
Tell the owner: "I'm creating a Cloudflare D1 database to store your form submissions. D1 is a SQL database at the edge — it's free up to 5 GB and 100,000 writes per day, more than a small business will ever need."
Preferred — Cloudflare MCP (no copy-paste):
${CLAUDE_PLUGIN_ROOT}/docs/cloudflare-mcp.md.d1_database_create with name: "form_submissions". Read the uuid (database ID) from the response..site-config as INBOX_DB_ID=<uuid> using the Edit tool.Fallback — wrangler CLI (use only if no d1_database_create tool is available):
npx wrangler d1 create form_submissions
Wrangler prints a block like:
✅ Successfully created DB 'form_submissions' in region <REGION>
[[d1_databases]]
binding = "INBOX_DB"
database_name = "form_submissions"
database_id = "abc123-def4-..."
Copy the database_id value. Save it to .site-config as INBOX_DB_ID=abc123-def4-... using the Edit tool.
The schema (one submissions table plus two indexes) ships at worker/schema.sql. Apply it once to the live database:
npx wrangler d1 execute form_submissions --remote --file=worker/schema.sql
If worker/schema.sql is missing on an older site, run /anglesite:update first to copy it in, then re-run the execute command. The schema uses CREATE TABLE IF NOT EXISTS so re-running it is safe.
For every deployed worker (worker/wrangler.toml for the contact form, worker/forms-wrangler.toml for the forms handler), uncomment the [[d1_databases]] block and replace REPLACE_WITH_D1_DATABASE_ID with the saved INBOX_DB_ID. The binding name must remain INBOX_DB. Use the Edit tool — do not Write the whole file.
Example (after edit):
[[d1_databases]]
binding = "INBOX_DB"
database_name = "form_submissions"
database_id = "abc123-def4-..."
Tell the owner: "I'm creating a private token and saving it in two places — in Cloudflare so the workers can verify it, and locally in .env.local so the sync script can use it." The owner does not need to do anything.
Generate the token:
node -p "require('node:crypto').randomBytes(32).toString('hex')"
Set that value as INBOX_SECRET on each worker that exists by following ${CLAUDE_PLUGIN_ROOT}/docs/worker-secrets.md — once with --config worker/wrangler.toml (contact form) and once with --config worker/forms-wrangler.toml (forms handler). Use the same value for both. wrangler secret put cannot be used here: it prompts for input the shell can't supply. Both workers are already deployed (Step 0), so start at "Collect the values".
Then save the same value to .env.local (gitignored):
INBOX_SECRET=<the generated value>
If .env.local already exists, add the line with the Edit tool; otherwise create the file with the Write tool. Never repeat the value in a message to the owner.
Each worker now needs to re-deploy so the D1 binding is picked up. Run only the deploy commands that match what's installed on this site:
npx wrangler deploy --config worker/wrangler.toml
npx wrangler deploy --config worker/forms-wrangler.toml
Pull new submissions from D1 into src/content/submissions/:
npm run ai-inbox-fetch
Tell the owner what you saw — e.g. "Synced 4 new submissions, skipped 12 already on disk." Existing local files are never overwritten so the owner's triage edits (status, notes) are safe.
Open Keystatic and route them to the Form Submissions collection so they can review and triage. The list shows newest first; each entry includes:
formSlug)New, Archived, or SpamTriage actions are just edits to the status field — no special tooling. Encourage the owner to bulk-process: archive what's resolved, mark spam as spam.
On an Apple-Silicon Mac with Apple Intelligence enabled, npm run ai-inbox-fetch
also classifies each new submission on-device — nothing is uploaded.
Each new submission gets three advisory fields: aiCategory
(lead / support / question / other), aiSpam (yes / no), and aiReason (the
model's short rationale).
These are suggestions only. The owner's status field is never changed
automatically — a misclassified message is never hidden. Surface the suggestion
and let the owner decide.
After a sync, the script prints a one-line summary like
Triaged 3 new: 1 likely spam, 2 leads. Relay this to the owner in chat so
they get the overview before opening Keystatic — e.g. "3 new submissions: 1
looks like spam, 2 look like leads. Open the inbox to confirm and triage."
fm is not availableOn any other machine, no AI fields are written and nothing breaks — the owner
triages status manually exactly as before. To disable AI triage even on a
capable Mac, set INBOX_TRIAGE_AI=off in .site-config.
Lead-capture and survey responses are easier to work with in a spreadsheet. The export script reads the same files Keystatic shows:
npm run ai-inbox-export -- --slug=lead --status=new --out=leads.csv
Available filters:
--slug=<formSlug> — only this form (e.g. contact, lead, rsvp)--status=new|archived|spam — only this status--since=YYYY-MM-DD — only submissions on or after this date--out=<path> — write to a file instead of stdoutWithout --out, CSV is printed to stdout so the owner can pipe it into a spreadsheet, an email, or another tool.
formSlug field separates contact-form messages from each custom form. The Keystatic list view groups by form when the owner wants — sort or filter on formSlug. The /inbox Worker endpoint also accepts ?slug=<slug> and ?status=<status> query parameters that translate directly into indexed WHERE clauses on the D1 table.src/content/submissions/ and is committed to the owner's private Git repo as part of the standard backup flow. It is not rendered on the public site (no Astro page reads from this collection). Keep the repo private.dist/ (built HTML) — the submissions never get rendered onto a public page so the scan is unaffected. Confirm by running npm run predeploy after a sync.npx wrangler d1 execute form_submissions --remote --file=worker/schema.sql is idempotent. New indexes added to worker/schema.sql in a future template release will apply cleanly during /anglesite:update.What SKILL.md sets; muted values are Claude Code's defaults
Use when the owner asks to see, sort, answer, or export messages and submissions that came in through site forms.
npx claudepluginhub anglesite/anglesite-skills --plugin anglesite56 skills in this plugin
/bookingEmbed appointment scheduling (Cal.com or Calendly) into the siteOther plugins' skills for the same job