/anglesite:indiewebfrom anglesite
Deploys self-owned IndieAuth, Webmention, and Micropub endpoints on a custom domain using Cloudflare Workers. Keeps identity and data on the owner's own infrastructure.
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.
Set up self-owned IndieWeb endpoints on the owner's primary domain using the @dwk/* worker packages. Deploys IndieAuth (sign in with your domain), Webmention (receive cross-site mentions), and Micropub (publish from third-party clients) — each independently selectable, runtime-guarded by its own bindings, and composed into the site's existing site-entry.js Worker.
The owner's identity, tokens, and data stay on their own Cloudflare account. No third-party identity or mention hosts.
@dwk/* composed into site-entry.jsPlatform integration guide: dwk-workers.md — read this before running the skill for binding details, the Micropub publish loop, and the DPoP caveat.
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 and verify all three prerequisites:
SITE_DOMAIN must be set and must not end in .workers.dev. IndieAuth identity is HTTPS-rooted at the owner's primary domain; a *.workers.dev address cannot serve as an identity root. If missing or on workers.dev, tell the owner: "The IndieWeb endpoints need your site on a custom domain — your identity is rooted there. Run /anglesite:deploy to set up a custom domain first, then come back here."CF_PROJECT_NAME must be set (site has been deployed at least once). If missing: "Deploy your site first with /anglesite:deploy so we have a Cloudflare project to attach the endpoints to."GITHUB_REPO must be set (backup configured). If missing: "Run /anglesite:backup to connect a GitHub repo first — the Micropub publish loop needs it to commit new posts."If any check fails, stop. Do not proceed to Step 1.
If INDIEWEB_ENABLED=true is already set in .site-config, the endpoints are already configured. Ask the owner if they want to reconfigure (e.g. enable an endpoint they skipped), reset owner auth (they lost every passkey and backup code and can't sign in), or if they need help with something else. For a reset, skip straight to "Reset owner auth" at the end of Step 5b — nothing else needs to change.
The @dwk/* packages must be published on npm and actually load under Node ESM before the endpoints can be installed. A published version is not enough: a broken build whose compiled dist/ re-exports omit file extensions passes npm view but throws ERR_MODULE_NOT_FOUND the moment it's imported (issue #363). Composing such a package into site-entry.js produces a Worker that can't boot — and the breakage is invisible until deploy because the repo's tests alias @dwk/* to stubs. So the gate must import each package, not just confirm it exists.
Run this combined gate. It installs the four packages into a throwaway directory (never touching the site) and dynamically imports each one, failing closed on any error. The check is all-or-nothing across the four @dwk/* packages: they're published from one monorepo at a shared version, so a broken build breaks them together — gating them as a set keeps this step simple. (Endpoint selection in Step 2 and runtime guarding remain per-endpoint.)
PKGS="@dwk/indieauth @dwk/webmention @dwk/micropub @dwk/webauthn"
SMOKE=$(mktemp -d)
GATE=1
if [ -n "$SMOKE" ]; then
printf '{"type":"module","private":true}' > "$SMOKE/package.json"
( cd "$SMOKE" \
&& { INSTALL_ERR=$(npm install $PKGS 2>&1 >/dev/null) \
|| { echo "INSTALL FAILED (network/registry issue or unavailable package):"; echo "$INSTALL_ERR"; exit 1; }; } \
&& for p in $PKGS; do \
node -e "import('$p').then(()=>console.log('ok $p')).catch(e=>{console.error('FAIL $p: '+(e.code||e.message));process.exit(1)})" || exit 1; \
done )
GATE=$?
rm -rf "$SMOKE"
fi
echo "gate exit: $GATE"
If gate exit is 0, every package installed and imported cleanly — proceed. Otherwise stop. Read the captured output to tell the two failure modes apart:
INSTALL FAILED block means the install itself errored — most often a transient network/registry hiccup, occasionally an unavailable package. Tell the owner: "I couldn't install the IndieWeb endpoint packages just now — this is usually a temporary network issue. Try again in a minute. If it keeps failing, the packages may not be ready yet."FAIL <pkg>: … line (e.g. ERR_MODULE_NOT_FOUND) means a package is published but doesn't load — a broken build. Tell the owner:"The IndieWeb endpoint packages aren't ready yet — this feature isn't available right now. It's being built by an open-source project and will be ready soon. I'll let you know when it ships. In the meantime, your site already supports the passive IndieWeb (microformats, rel="me", RSS) — see docs/indieweb.md for what's already working."
Do not attempt git installs, forks, version pins to a broken build, or workarounds. The gate is intentional: a package that imports cleanly is the contract the rest of this skill depends on.
Tell the owner: "There are three IndieWeb endpoints you can enable — each works independently, and I'd recommend all three for the full experience:"
| Endpoint | What it does |
|---|---|
| IndieAuth | Sign in to other IndieWeb services with your domain; issues access tokens for Micropub |
| Webmention | Receive (and send) cross-site mentions, replies, and likes |
| Micropub | Publish to your site from phone apps and other Micropub clients |
Ask: "Which would you like to enable? (Default: all three)"
Note the dependency: Micropub requires IndieAuth for token issuance. If the owner selects Micropub but not IndieAuth, explain this and recommend enabling both. Webmention is fully independent.
Record the choices for use in subsequent steps. If the owner selects all three (or accepts the default), proceed with all.
Provision the Cloudflare resources each selected endpoint needs. Use the MCP tools when available; fall back to wrangler CLI otherwise.
Each endpoint stores data in its own D1 database. Create only the databases for selected endpoints:
| Endpoint | D1 database name | Binding name | .site-config key |
|---|---|---|---|
| IndieAuth | indieauth | AUTH_DB | INDIEWEB_AUTH_DB_ID |
| IndieAuth (owner auth) | owner-auth | OWNER_AUTH_DB | INDIEWEB_OWNER_AUTH_DB_ID |
| Micropub | micropub | MICROPUB_DB | INDIEWEB_MICROPUB_DB_ID |
| Webmention | webmention | WEBMENTION_INBOX | INDIEWEB_WEBMENTION_DB_ID |
Preferred — Cloudflare MCP (no copy-paste):
${CLAUDE_PLUGIN_ROOT}/docs/cloudflare-mcp.md.d1_databases_list. For each selected endpoint, if a database with the name from the table above already exists (an earlier run), reuse its uuid; otherwise call d1_database_create with that name and read the uuid from the response..site-config using the Write tool (e.g. INDIEWEB_AUTH_DB_ID=<uuid>).Fallback — wrangler CLI (use only if the D1 tools are not available):
npx wrangler d1 create indieauth
Copy the database_id from the output. Save to .site-config as INDIEWEB_AUTH_DB_ID=<id>. Repeat for each selected endpoint's database.
If Micropub is selected, create an R2 bucket for the media endpoint:
Preferred — MCP:
Call r2_buckets_list; if micropub-media isn't there yet, call r2_bucket_create with bucket_name: "micropub-media". Save the result to .site-config as INDIEWEB_MEDIA_BUCKET=micropub-media.
Fallback:
npx wrangler r2 bucket create micropub-media
Save to .site-config as INDIEWEB_MEDIA_BUCKET=micropub-media.
If Webmention is selected, create a Queue for async source-link verification. Queues are not available via the MCP tools — use wrangler:
npx wrangler queues create webmention-queue
Save to .site-config as INDIEWEB_WEBMENTION_QUEUE=webmention-queue.
wrangler.jsoncRead wrangler.jsonc. The template ships the d1_databases, r2_buckets, and queues blocks commented out — Wrangler rejects an empty database_id / bucket_name (the build fails) and refuses to deploy a binding to a queue that doesn't exist, so nothing unprovisioned may be active. For each provisioned resource, uncomment its block (remove the leading // ) and fill in the real value using the Edit tool — do not Write the whole file. Leave unselected endpoints' entries out: delete their lines rather than leaving a REPLACE_WITH_… placeholder or an empty string active.
If a block is missing entirely (a site scaffolded before the commented blocks shipped), add it after the "observability" block. If an older site still has active entries with an empty "database_id": "" or "bucket_name": "", fill in the provisioned ones and delete the rest — an empty value breaks npm run build.
For each selected endpoint's D1 database, the d1_databases entry looks like:
"d1_databases": [
// ... any existing entries ...
{
"binding": "AUTH_DB",
"database_name": "indieauth",
"database_id": "<INDIEWEB_AUTH_DB_ID from .site-config>"
}
]
If an active "d1_databases" array already exists (e.g. from an earlier run of this skill), append to it rather than creating a duplicate key.
If any endpoint is selected, set the SITE_URL var to the site's own origin. @dwk/webmention needs it as its baseUrl at construction (the queue consumer runs off-request, with no request URL to derive an origin from), and site-entry.js derives the IndieAuth baseUrl, the WebAuthn origin/rpId, and Micropub's baseUrl/me from it as well — without it those endpoints throw on the first request. Edit the "vars" block in wrangler.jsonc:
"vars": {
"SITE_URL": "https://<SITE_DOMAIN from .site-config>"
}
For the R2 bucket (Micropub):
"r2_buckets": [
{
"binding": "MEDIA",
"bucket_name": "micropub-media"
}
]
For the Queue (Webmention) — the shipped block, uncommented as-is:
"queues": {
"consumers": [
{ "queue": "webmention-queue", "max_batch_size": 10, "max_retries": 3 }
],
"producers": [
{ "binding": "WEBMENTION_QUEUE", "queue": "webmention-queue" }
]
}
site-entry.js statically imports all four @dwk/* worker packages (and worker/webmention-inbox.js imports microformats-parser, which parses each verified source's microformats2 so stored mentions carry the author's name, photo, and a content snippet), so they ship as pinned dependencies in the site's package.json — a site builds without this skill ever running. Confirm they're installed:
npm ls @dwk/indieauth @dwk/micropub @dwk/webmention @dwk/webauthn microformats-parser
If any is missing (a site scaffolded before they were template dependencies), install all of them — the Worker bundle needs every import to resolve regardless of which endpoints the owner selected:
npm install @dwk/indieauth @dwk/micropub @dwk/webmention @dwk/webauthn microformats-parser
Every secret in this step goes on the main site Worker. Gather the values from 5a–5c for the selected endpoints, then set them all in one pass by following ${CLAUDE_PLUGIN_ROOT}/docs/worker-secrets.md — omit --config (this is the root wrangler.jsonc Worker), and skip that doc's "deploy the Worker first" step: Step 0 already confirmed the site Worker exists, and the new bindings shouldn't go live before Step 7's build check. wrangler secret put cannot be used: it prompts for input the shell can't supply.
Generate a signing key:
openssl rand -hex 32
Add it to the secrets file as TOKEN_SIGNING_KEY.
The binding must be named TOKEN_SIGNING_KEY: @dwk/indieauth signs access tokens with it and @dwk/micropub verifies them with the same secret, so both endpoints share this one key. Provision it whenever IndieAuth or Micropub is selected (they're a token issuer/consumer pair). The key never appears in source code or .site-config — it lives only in Cloudflare's secret store.
Upgrading an existing IndieAuth/Micropub site? Earlier plugin versions stored this secret as
INDIEAUTH_SIGNING_KEY, but the@dwk/*packages readTOKEN_SIGNING_KEY— so on the next deploy the endpoints would 500 with "missing required secret bindingTOKEN_SIGNING_KEY" until you re-provision it. If the owner still has the original value, set it asTOKEN_SIGNING_KEYthe same way (worker-secrets.md) so already-issued tokens stay valid; Cloudflare doesn't show a stored secret's value again, so if it's gone, generate a new key as above — apps the owner signed in to will simply ask them to sign in again. OnceTOKEN_SIGNING_KEYis confirmed working, delete the oldINDIEAUTH_SIGNING_KEYsecret. Also confirm theSITE_URLvar is filled inwrangler.jsonc(Step 4) — IndieAuth, WebAuthn, and Micropub all derive their origin from it.
IndieAuth signs the owner in to other sites with their domain, so the owner must
prove they are the owner before a token is minted. Anglesite uses passkeys
(@dwk/webauthn, served from the WEBAUTHN Durable Object — already declared in
wrangler.jsonc, no resource to create) plus printable backup codes.
Session + registration secrets. Generate both and add them to the
secrets file — the first as INDIEAUTH_SESSION_KEY:
openssl rand -hex 32
and the second as INDIEWEB_REG_TOKEN:
openssl rand -hex 24
INDIEAUTH_SESSION_KEY signs the owner-session cookie; INDIEWEB_REG_TOKEN
is the gate for the first passkey enrolment. Both live only in the
secret store — the deploy scan fails the build if either is committed.
Enrol the first passkey. After the next deploy, give the owner the one-time link (substitute the token value just set):
https://<SITE_DOMAIN>/auth/register?token=<INDIEWEB_REG_TOKEN>
Tell them to open it on each device they want to sign in from and register
at least two passkeys (e.g. phone + laptop) so a lost device isn't a
lockout. Once a passkey exists, they can add more from a signed-in session at
/auth/register.
Backup codes. Have the owner generate 10 single-use backup codes from
/auth/register and print or save them now. A code can stand in for a
passkey on the sign-in screen if every device is unavailable. Only hashes are
stored; the plaintext is shown once.
Recovery. Three layers: multiple passkeys, the backup codes, and — as the
ultimate root — redeploy access. If the owner loses everything, re-run
/anglesite:indieweb and choose "reset owner auth" (below), which rotates
INDIEWEB_REG_TOKEN and re-opens registration (only someone who controls the
Cloudflare account can do this).
Reset owner auth (reached from Step 0 when the owner is locked out):
Generate a new registration token:
openssl rand -hex 24
Set it as INDIEWEB_REG_TOKEN on the site Worker by following
${CLAUDE_PLUGIN_ROOT}/docs/worker-secrets.md (omit --config; skip its
deploy step). It takes effect immediately and the old link stops working.
Give the owner the new link,
https://<SITE_DOMAIN>/auth/register?token=<new INDIEWEB_REG_TOKEN>, and
have them register two passkeys and generate fresh backup codes as in items
2–3 above. Passkeys registered earlier are not removed.
The Micropub→Git bridge needs a fine-grained GitHub Personal Access Token to commit new posts to the site repo.
Guide the owner:
https://github.com/settings/personal-access-tokens/newanglesite-micropubAsk the owner to paste the token here in chat and add it to the secrets file as GITHUB_TOKEN. The Worker is the only consumer of this token — do not also set it as a GitHub repo secret (GitHub rejects secret names starting with GITHUB_, and the deploy workflow doesn't read it).
The Actions deploy workflow needs the CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID repo secrets. Check whether they are already set:
gh secret list --repo <GITHUB_REPO>
If either is missing, have the owner add it themselves (gh secret set prompts for input the shell can't supply): open https://github.com/<GITHUB_REPO>/settings/secrets/actions, click New repository secret, enter the name exactly as written above, and paste the value.
The owner can find their Cloudflare API token at https://dash.cloudflare.com/profile/api-tokens (use the "Edit Cloudflare Workers" template) and their account ID in the Cloudflare dashboard sidebar.
.site-configUpdate .site-config with the IndieWeb configuration using the Write tool (update the existing file):
INDIEWEB_ENABLED=true
INDIEWEB_ME=https://<SITE_DOMAIN>
INDIEWEB_INDIEAUTH=<true|false>
INDIEWEB_MICROPUB=<true|false>
INDIEWEB_WEBMENTION=<true|false>
Set each endpoint flag to true or false based on the owner's choices in Step 2.
INDIEWEB_ME is the owner's IndieWeb identity URL — their primary domain over HTTPS. This is the me value that IndieAuth and Micropub use to identify the site owner.
If OWNER_NAME is not already set in .site-config and Micropub or IndieAuth is enabled, ask the owner: "What name should appear on your IndieWeb profile?" Save it as OWNER_NAME=<name>.
Build the site to confirm everything compiles with the new dependencies and bindings:
npm run build
If the build fails, read the error and fix the issue before proceeding. Common causes: missing packages (re-run npm install), binding misconfiguration in wrangler.jsonc (check syntax — it's JSONC, trailing commas are OK).
Tell the owner what's live and what to expect:
"Your IndieWeb endpoints are set up! Here's what we configured:"
For each enabled endpoint, explain in one sentence:
https://<SITE_DOMAIN>. Your tokens are issued by your own server."/anglesite:deploy scans new posts for outbound links and notifies the sites you linked to."Important caveats to surface:
/anglesite:indieweb again to reconfigure."Suggest next steps:
/anglesite:deploy to publish the changeshttps://indieauth.com (or any relying party) with their domaindocs/indieweb.md) — it turns likes/replies/reposts on the syndicated copies back into webmentions on the original post. It's the one piece of the loop that still runs through a third-party service (Brid.gy itself), so frame it as optional, not a default step.site-entry.js. A partially configured site still serves static pages normally — the guards are all false until the bindings exist.https://dash.cloudflare.com/<account-id>/workers/services/view/<CF_PROJECT_NAME>/production/observability/logs. Or run /anglesite:check which will inspect the IndieWeb endpoint configuration.@dwk/indieauth / @dwk/micropub packages manage their own D1 schemas, which run automatically on first request. Micropub's posts table (keyed by post URL) is the package's authoritative store and has no sync-state of its own, so the D1→GitHub bridge (worker/indieweb-bridge.js) owns a side bridge_sync(url, synced_at) table in the same MICROPUB_DB database — created on the bridge's first run — and re-commits a post whenever its updated_at advances past the last recorded sync. Webmention is the other exception: the site's rich inbox (worker/webmention-inbox.js) owns its webmentions table — an extended schema (author name/url/photo, content, permalink, reply/like/repost type) created on first verified mention, replacing the package's default source/target-only inbox. Migration: a site that already ran the earlier minimal Webmention has a 3-column webmentions table; CREATE TABLE IF NOT EXISTS won't add the new columns, so the first rich UPSERT would fail. Drop the old table once so the rich schema is recreated on the next mention (verified mentions are re-sent/re-verifiable, so nothing is permanently lost): npx wrangler d1 execute webmention --remote --command "DROP TABLE IF EXISTS webmentions".What SKILL.md sets; muted values are Claude Code's defaults
Use when the owner wants to own their identity and interactions on the open web — sign in with their domain, send or receive Webmentions, or post via Micropub.
Three short reads, in order
indieweb, indieauth, webmention, micropub, self-hosting, cloudflare-workers
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