/anglesite:bookingfrom anglesite
Embeds appointment scheduling (Cal.com or Calendly) into a site using BookingWidget.astro, brand color, Schema.org data, and CSP updates.
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.
Embed a booking widget into the site so visitors can schedule appointments directly. Supports Cal.com (default, open-source) and Calendly as providers. Uses the site's BookingWidget.astro component, wires it into the appropriate page(s), applies the site's brand color, injects Schema.org structured data, and updates CSP headers.
Read EXPLAIN_STEPS from .site-config. If true or not set, explain before every tool call that will trigger a permission prompt. If false, proceed without pre-announcing.
The command accepts flags that skip prompts:
| Flag | Skips |
|---|---|
--provider=cal|calendly | Provider prompt |
--username=<slug> | Username prompt |
--event=<slug> | Event type prompt (repeatable) |
--style=inline|floating|button | Style prompt |
--page=<path> | Target page prompt (for inline/button) |
Parse flags from the command arguments before starting the prompt flow. Skip any prompt whose value was provided via flag.
Read .site-config for BOOKING_PROVIDER and BOOKING_USERNAME. If both exist, this is an update — tell the owner: "You already have a booking widget set up. I can update it, add more event types, or change the style. What would you like to do?"
Ask the owner each question in order, skipping any answered by flags:
"Which scheduling service do you use — Cal.com or Calendly? Cal.com is free, open-source, and privacy-friendly, so I'd recommend it if you're starting fresh."
Default to cal if the owner has no preference.
"What's your {provider} username? It's the part after {provider-url}/ — for example, if your booking page is {provider-url}/janedoe, your username is janedoe."
If the owner doesn't have an account:
Exit gracefully. Do not write any files.
"What appointment types do you offer? For example, 30min, consultation, haircut-45. I'll set up each one. You can also skip this to use your default booking page."
Loop until the owner is done. Store as a comma-separated list.
"How would you like the booking widget to appear?"
/book page."/book page, or add it to an existing page?""What should the button say?" Default: "Book Now"
Read src/styles/global.css and take the value of --color-primary (the text between --color-primary: and the next ;, trimmed). Fall back to #000000 if not found.
Every site ships src/components/BookingWidget.astro together with its loader src/scripts/booking-widget.ts. The component accepts the props provider, username, eventSlug, style, buttonText, and brandColor, renders an element whose data-* attributes carry those settings, and loads the bundled first-party loader — so the owner's settings are passed as props in Step 4. Do not regenerate or rewrite either file.
Use Glob to confirm both files exist. If either is missing or predates the loader (an older site — the component has a <script is:inline> with a body, or src/scripts/booking-widget.ts is absent), Read both from ${CLAUDE_PLUGIN_ROOT}/template/src/components/BookingWidget.astro and ${CLAUDE_PLUGIN_ROOT}/template/src/scripts/booking-widget.ts and Write them unchanged to the same paths in the site.
No inline scripts. The site's CSP has no 'unsafe-inline' (ADR-0008), so Cal.com's and Calendly's copy-paste snippets — and any <script is:inline> / define:vars body or onclick= attribute — are blocked on the deployed site even though they work in npm run dev. Never paste a provider snippet into a page, and never "fix" a blocked widget by adding 'unsafe-inline' to the CSP. The only is:inline script in the component is Calendly's external widget.js (<script is:inline src=… async>), which has no body.
Make sure the site's astro.config.ts has the vite.build.assetsInlineLimit setting from ${CLAUDE_PLUGIN_ROOT}/template/astro.config.ts — without it Astro inlines small bundled scripts into the page and the CSP blocks them.
Based on the chosen style:
If creating a new /book page:
---
import BaseLayout from '../layouts/BaseLayout.astro';
import BookingWidget from '../components/BookingWidget.astro';
---
<BaseLayout title="Book an Appointment" description="Schedule your appointment online.">
<main>
<h1>Book an Appointment</h1>
<BookingWidget
provider="{provider}"
username="{username}"
eventSlug="{eventSlug}"
style="inline"
brandColor="{brandColor}"
/>
</main>
</BaseLayout>
If adding to an existing page, insert the <BookingWidget> import and tag in the appropriate content area.
Import and render BookingWidget in src/layouts/BaseLayout.astro, just before </body>:
<BookingWidget
provider="{provider}"
username="{username}"
eventSlug="{eventSlug}"
style="floating"
buttonText="{buttonText}"
brandColor="{brandColor}"
/>
Insert a <BookingWidget style="button"> at the target location in the specified page. Import the component at the top.
Write one ReserveAction JSON-LD entry per event type (or a single entry for the profile page if no event types were given). The booking URL is https://cal.com/{username}/{eventSlug} for Cal.com or https://calendly.com/{username}/{eventSlug} for Calendly — drop the /{eventSlug} part for the profile page:
{
"@type": "ReserveAction",
"target": {
"@type": "EntryPoint",
"urlTemplate": "https://cal.com/janedoe/30min",
"inLanguage": "en-US",
"actionPlatform": [
"https://schema.org/DesktopWebPlatform",
"https://schema.org/MobileWebPlatform"
]
},
"result": { "@type": "Reservation", "name": "Appointment" }
}
Add the potentialAction entries to the existing LocalBusiness JSON-LD if present, or create a standalone <script type="application/ld+json"> block in the <head> of the page(s) where the widget appears.
For floating style (site-wide), add the structured data to the root layout or homepage.
Save BOOKING_PROVIDER to .site-config first (Step 7 lists the other keys) — both the CSP sync and the pre-deploy scan read it.
The shipped public/_headers does not allow the booking provider's domains (Cal.com: app.cal.com; Calendly: assets.calendly.com and calendly.com); without this step the site builds fine and then breaks in production. Make sure BOOKING_PROVIDER is saved in .site-config (the sync reads it), then run:
npm run ai-csp
It adds the provider's domains to the Content-Security-Policy in public/_headers in place — everything already there is kept — and prints each source it added (+ script-src: …). "up to date" means they were already present. The pre-deploy third-party script scan reads the same key, so no separate allowlist edit is needed.
Save to .site-config:
BOOKING_PROVIDER=cal
BOOKING_USERNAME=janedoe
BOOKING_EVENTS=30min,consultation
BOOKING_STYLE=inline
BOOKING_PAGE=/book
BOOKING_BUTTON_TEXT=Book Now
Run npm run build to ensure the site builds cleanly with the new component.
Tell the owner: "Your booking widget is set up! Visitors can now book appointments directly from your site. Want to preview it?"
If the build fails, diagnose and fix before presenting to the owner.
If /anglesite:booking is run again on a site that already has a booking widget:
.site-configThe command is idempotent — running it again with the same settings should produce the same result.
What SKILL.md sets; muted values are Claude Code's defaults
Use when the owner wants customers to book appointments, classes, or consultations online, or mentions Cal.com or Calendly.
npx claudepluginhub anglesite/anglesite-skills --plugin anglesite56 skills in this plugin
/business-infoCollect and display business hours, address, phone, and LocalBusiness JSON-LDOther plugins' skills for the same job