ワンクリックで
booking
Embed appointment scheduling (Cal.com or Calendly) into the site
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Embed appointment scheduling (Cal.com or Calendly) into the site
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Update site dependencies and template files to the latest version
Add ecommerce to your site — sells physical goods, digital downloads, services, or software
Design CSS animations: hover effects, scroll reveals, page transitions
Back up site changes to GitHub, or restore an earlier snapshot
Collect and display business hours, address, phone, and LocalBusiness JSON-LD
Add a buy button to sell a product, service, or digital good (Stripe or Polar)
| name | booking |
| description | Embed appointment scheduling (Cal.com or Calendly) into the site |
| license | ISC |
| compatibility | Designed for Claude Code / compatible agents operating inside an Anglesite project (Astro + Keystatic, Node >=22). |
| allowed-tools | Write, Read, Glob, Bash(npm run build), Bash(npx astro check) |
| metadata | {"author":"David W. Keith","version":"1.6.0","source":"https://github.com/Anglesite/anglesite","invocation":"user-facing"} |
Embed a booking widget into the site so visitors can schedule appointments directly. Supports Cal.com (default, open-source) and Calendly as providers. Generates a reusable 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 extract --color-primary using the logic from references/template/scripts/booking.ts:extractBrandColor(). Fall back to #000000 if not found.
Create src/components/BookingWidget.astro using the embed code from the helper functions in references/template/scripts/booking.ts. The component should:
provider, username, eventSlug, style, buttonText, brandColoris:inline for all scripts (required for third-party embed loaders)If the component already exists, update it.
Use the pre-built template at references/template/src/components/BookingWidget.astro as a starting point — copy it to the site and customize with the owner's settings.
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.
Generate ReserveAction JSON-LD using buildReserveAction() from references/template/scripts/booking.ts.
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.
Read public/_headers and update the CSP to allow the provider's domains. Use buildBookingCSP() from references/template/scripts/csp.ts to get the required domains:
Cal.com: Add app.cal.com to script-src, style-src, and frame-src.
Calendly: Add assets.calendly.com to script-src and style-src. Add calendly.com to frame-src.
The pre-deploy scan blocks third-party scripts by default. Update scripts/pre-deploy-check.ts (or .site-config) to allowlist the provider's script domains:
SCRIPT_ALLOW=app.cal.comSCRIPT_ALLOW=assets.calendly.comAdd to .site-config as a comma-separated allowlist if multiple providers are configured.
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.