mcpField
B
booking-config

booking-config

github.com/terrylica生产力1102 次安装1 天前更新
代码仓库

关于 booking-config

booking-config 是一项技能,可通过 Cal.com CLI 和 API 管理活动类型、日程、可用时段及 Webhook,适用于配置预约页面与排期流程。

主要功能

  1. 01创建和更新活动类型
  2. 02列出并创建日程
  3. 03检查可预约时段
  4. 04管理预约 Webhook

适用场景

  1. 01设置面试或办公时间预约页面
  2. 02配置工作日可用时段
  3. 03检查指定日期范围的时段

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/terrylica/cc-skills --skill booking-config

安装后在 Claude Code 中输入/booking-config确认已加载。

附带文件references/evolution-log.md

详细介绍

预约配置

通过 CLI 配置 Cal.com 活动类型、日程安排和可用时间段。

自我演进技能:此技能会在使用过程中不断改进。如果说明有误、参数发生偏移,或需要采用变通方法,请立即修复此文件,不要拖延。仅针对真实且可复现的问题进行更新。

必须执行的预检

第 1 步:检查 CLI 二进制文件
ls -la "$HOME/.claude/plugins/marketplaces/cc-skills/plugins/calcom-commander/scripts/calcom-cli/calcom" 2>/dev/null || echo "BINARY_NOT_FOUND"
第 2 步:验证环境
echo "CALCOM_OP_UUID: ${CALCOM_OP_UUID:-NOT_SET}"
echo "CALCOM_API_URL: ${CALCOM_API_URL:-NOT_SET}"

所有项目都必须为 SET。 如果任何项目为 NOT_SET,请先运行设置命令。

第 3 步:测试 API 访问
CALCOM_CLI="$HOME/.claude/plugins/marketplaces/cc-skills/plugins/calcom-commander/scripts/calcom-cli/calcom"
$CALCOM_CLI event-types list 2>&1 | head -3

活动类型管理

创建活动类型

使用 AskUserQuestion 收集必填字段:

AskUserQuestion({
  questions: [{
    question: "What type of booking page do you want to create?",
    header: "Event Type",
    options: [
      { label: "30-min Meeting", description: "Standard 30-minute meeting slot" },
      { label: "60-min Interview", description: "Full hour interview session" },
      { label: "15-min Quick Call", description: "Brief check-in call" },
      { label: "Custom", description: "Specify custom duration and details" }
    ],
    multiSelect: false
  }]
})
CALCOM_CLI="$HOME/.claude/plugins/marketplaces/cc-skills/plugins/calcom-commander/scripts/calcom-cli/calcom"

# Create event type with collected details
$CALCOM_CLI event-types create \
  --title "30min Interview" \
  --slug "interview-30" \
  --length 30 \
  --description "Screening interview for VA candidates"
更新活动类型
# Update title
$CALCOM_CLI event-types update <id> --title "Updated Title"

# Update duration
$CALCOM_CLI event-types update <id> --length 45

# Disable event type
$CALCOM_CLI event-types update <id> --hidden true

日程安排管理

列出日程安排
$CALCOM_CLI schedules list
创建日程安排
# Create a weekday schedule (9am-5pm)
$CALCOM_CLI schedules create \
  --name "Business Hours" \
  --timezone "America/New_York" \
  --availability '[
    {"days": [1,2,3,4,5], "startTime": "09:00", "endTime": "17:00"}
  ]'
检查可用时间
# Check available slots for a specific date range
$CALCOM_CLI availability check \
  --event-type-id <id> \
  --start "2026-02-15" \
  --end "2026-02-20"

常见预约页面模式

候选人筛选面试
$CALCOM_CLI event-types create \
  --title "VA Screening Interview" \
  --slug "va-screening" \
  --length 30 \
  --description "BruntWork virtual assistant candidate screening" \
  --requires-confirmation true
开放办公时间
$CALCOM_CLI event-types create \
  --title "Office Hours" \
  --slug "office-hours" \
  --length 15 \
  --description "Drop-in office hours for team questions"

Webhook 管理

通过 webhook 中继管理 Cal.com webhook,以接收实时 Pushover 通知。

列出 Webhook
CALCOM_API_KEY=$(op item get "$CALCOM_OP_UUID" --vault "Claude Automation" --fields password --reveal)

curl -s "https://api.cal.com/v1/webhooks?apiKey=$CALCOM_API_KEY" | python3 -m json.tool
注册 Webhook
curl -s -X POST "https://api.cal.com/v1/webhooks?apiKey=$CALCOM_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"subscriberUrl\":\"$WEBHOOK_RELAY_URL\",\"eventTriggers\":[\"BOOKING_CREATED\",\"BOOKING_RESCHEDULED\",\"BOOKING_CANCELLED\"],\"active\":true}"
删除 Webhook
curl -s -X DELETE "https://api.cal.com/v1/webhooks/<webhook-id>?apiKey=$CALCOM_API_KEY"

前置条件:必须在环境中设置 WEBHOOK_RELAY_URL(守护进程配置在 ~/gh/<org>/<automation-repo>/.env.launchd 中,或在 shell 中导出)。请先通过 infra-deploy 技能部署中继。

变更后检查清单

  • YAML frontmatter 有效(描述中不含冒号)
  • 触发关键词为最新内容
  • 路径模式使用 $HOME,而非硬编码路径

执行后回顾

此技能执行完毕后,请在结束任务前进行回顾:

  1. 确认位置。 — 找到此 SKILL.md 的规范路径,然后再进行编辑。
  2. 哪里失败了? — 修复导致失败的说明。
  3. 哪些地方比预期更顺利? — 将其提升为推荐实践。
  4. 哪些内容已发生偏移? — 修复任何与实际情况不符的脚本、参考资料或依赖项。
  5. 记录下来。 — 添加演进日志条目,说明触发原因、修复内容和证据。

切勿拖延。下一次调用时将继承你留下的内容。

评论

支持 Markdown