File structure
CODEBLOCK0
The lifecycle
CODEBLOCK1
The skill owns every stage except the ones that need a phone call.
For those, it does everything up to handing you the number and the script.
Booking methods
Online booking (handled automatically):
Agent uses the browser tool to find and complete the booking.
No action required from the user beyond the initial request.
Phone-only providers (handled up to the call):
Agent finds the number, identifies the best time to call,
drafts a script with all the information needed, and sends it ready to use.
The call is the user's — everything else is handled.
Manual logging:
User booked it themselves. Agent logs it and sets up the reminder chain.
/appt log [description] [date/time]
Setup flow
Step 1 — Reminder preferences
Ask once. Store in config.md. All future appointments use this.
Default chain:
- - 24 hours before: full reminder with address, what to bring, journey time
- 2 hours before: short nudge with location
- 15 minutes before: final ping (off by default — ask if they want it)
Also ask: follow-up prompt after appointment? Default on.
"[APPOINTMENT] is done — anything to note?"
Step 2 — Location
Ask for home location / postcode if not already in USER.md.
Used for: journey time estimates, finding local providers.
Step 3 — Calendar
If Google Calendar is connected: ask if they want appointments added automatically.
Default: yes.
Step 4 — Write config.md
CODEBLOCK2
Booking flow — online provider
When user says "book me a dentist appointment" or "I need a GP appointment next week":
Step 1 — Identify the provider
Check providers.md for a preferred or previously used provider.
If found: confirm with user — "Use [PROVIDER] again, or try somewhere new?"
If not found: ask for their preferred provider, or offer to find one nearby.
Finding a provider (if needed):
web_search: "[appointment type] near [location]"
Present top 3 options with: name, address, distance, rating, booking method.
User picks. Store in providers.md.
Step 2 — Find the booking page
CODEBLOCK4
Look for: online booking link, booking system (Doctolib, Zocdoc, Calendly, proprietary).
If booking system found: proceed to Step 3.
If no online booking: proceed to phone-only flow.
Step 3 — Check availability
Use browser tool to navigate the booking system.
Find available slots. Check against user's calendar if connected.
Ask the user: "Any preference on day or time? Morning or afternoon?"
Default: next available slot that doesn't conflict with calendar.
Present top 3 options:
CODEBLOCK5
Step 4 — Complete the booking
Navigate and complete the booking in the browser.
Fill in required details (name, DOB, reason for visit — ask user if needed).
Get confirmation number or confirmation email.
Confirm to user:
CODEBLOCK6
Log to appointments.md and update providers.md with booking details.
Step 5 — Register reminder cron jobs
For each reminder in the chain, register an isolated cron job:
CODEBLOCK7
Repeat for 2h reminder. Store cron job IDs in appointments.md.
Booking flow — phone-only provider
When the provider has no online booking:
Step 1 — Find the number
CODEBLOCK8
Extract: main booking number, best time to call, any notes ("call after 9am", "press 2 for appointments").
Step 2 — Draft the call script
Generate a complete script ready to use:
CODEBLOCK9
Send the script to the user's channel. Everything they need is in one message.
Step 3 — Set a call reminder
If the user hasn't logged the appointment within 2 days:
"Did you manage to call [PROVIDER]? If you've booked, just log it and I'll set up reminders."
Appointment types and prep notes
The skill knows what different appointments typically require.
The 24h reminder includes type-specific prep notes.
Medical / GP:
- - Bring: [any referral letters, current medication list, insurance card if applicable]
- Note: arrive 5-10 minutes early if first visit
- Journey: [estimated travel time from home]
Dentist:
- - Avoid eating 1 hour before if possible
- Bring: [dental insurance card if applicable]
- Journey: [estimated travel time]
Optician:
- - Bring: current glasses/contact lenses
- Note: driving after eye test may not be possible if drops are used
Haircut / beauty:
- - Bring: reference photos if you have a specific style in mind
- No special prep
Specialist / hospital:
- - Bring: referral letter, any previous test results, medication list, insurance card
- Note: allow extra time for registration
- Journey: [hospital can be large — check which department and entrance]
Custom:
For appointment types not in the library, ask the user once: "Anything specific to bring or prepare?"
Store in providers.md for future bookings at the same provider.
appointments.md structure
CODEBLOCK10
providers.md structure
CODEBLOCK11
providers.md grows over time. Every new provider is stored.
Future bookings at the same provider skip the research step entirely.
Reminder formats
24h reminder
CODEBLOCK12
2h reminder
CODEBLOCK13
15min reminder (if enabled)
CODEBLOCK14
Follow-up prompt (1h after end time)
CODEBLOCK15
Reschedule flow
INLINECODE1
- 1. Cancel existing reminder cron jobs
- Navigate back to booking system (for online bookings)
- Find new slot — present options
- Complete reschedule
- Update appointments.md
- Register new reminder cron jobs
- Update Google Calendar event
Cancellation flow
INLINECODE2
- 1. Cancel reminder cron jobs (delete them)
- Ask: "Do you want me to cancel with the provider too, or just remove your reminders?"
- If cancelling with provider: navigate to online cancellation or provide phone number + cancellation script
- Update appointments.md status to "cancelled"
- Update Google Calendar event
Management commands
- -
/book [description] — start booking flow - INLINECODE4 — all upcoming appointments with dates
- INLINECODE5 — anything today
- INLINECODE6 — manually log a booked appointment
- INLINECODE7 — mark complete with follow-up notes
- INLINECODE8 — cancel appointment and reminders
- INLINECODE9 — reschedule flow
- INLINECODE10 — past appointments log
- INLINECODE11 — past visits to one provider
- INLINECODE12 — list of known providers
What makes it good
The phone-script for phone-only providers is the most underrated feature.
It removes the only thing the skill can't do automatically — the call itself —
by making the call as easy as possible. Number, navigation instructions, exact words to say.
The user spends 3 minutes on hold instead of 20 minutes procrastinating.
The providers.md memory compounds.
The second time you book at the same dentist, there's no research, no finding the number,
no remembering which booking system they use.
The skill knows. It just asks "same place?" and proceeds.
The 24h reminder with journey time is the one people notice.
"Leave by 9:45 to arrive on time" is more useful than "appointment at 10:30."
文件结构
appointment-manager/
SKILL.md
appointments.md ← 所有预约、状态、完整生命周期
providers.md ← 已知服务提供方,含预约方式、联系方式、备注
config.md ← 提醒偏好、投递设置
生命周期
请求 → 查询 → 预约 → 确认 → 提醒(24小时前) → 提醒(2小时前) → 赴约 → 跟进
除需要电话沟通的环节外,该技能掌控所有阶段。
对于电话环节,它会完成所有准备工作,直到将号码和话术交到你手中。
预约方式
在线预约(自动处理):
智能体使用浏览器工具查找并完成预约。
除初始请求外,用户无需任何操作。
仅电话预约(处理至通话环节):
智能体查找号码,确定最佳通话时间,
起草包含所有必要信息的话术,并发送至就绪状态。
通话由用户完成——其余一切均由智能体处理。
手动记录:
用户自行预约。智能体记录并设置提醒链。
/appt log [描述] [日期/时间]
设置流程
第一步 — 提醒偏好
询问一次。存储在 config.md 中。所有未来预约均使用此设置。
默认提醒链:
- - 24小时前:完整提醒,包含地址、需携带物品、行程时间
- 2小时前:简短提醒,包含地点
- 15分钟前:最终提醒(默认关闭——询问用户是否需要)
同时询问:预约后是否需要跟进提示?默认开启。
[预约事项]已完成——有什么需要记录的吗?
第二步 — 位置
如果 USER.md 中尚未记录,询问家庭地址/邮编。
用于:行程时间估算、查找附近服务提供方。
第三步 — 日历
如果已连接 Google 日历:询问是否希望自动添加预约。
默认:是。
第四步 — 写入 config.md
md
预约管理器配置
提醒链
24小时前:开启
2小时前:开启
15分钟前:关闭
跟进:开启
位置
家庭地址:[地址/邮编]
日历同步
google_calendar:开启
投递
渠道:[渠道]
接收方:[目标]
预约流程 — 在线服务提供方
当用户说帮我预约牙医或我需要下周约个全科医生时:
第一步 — 确定服务提供方
检查 providers.md 中是否有首选或曾用过的服务提供方。
如果找到:与用户确认——再次使用[服务提供方名称],还是尝试新的?
如果未找到:询问用户偏好的服务提供方,或主动查找附近的选择。
查找服务提供方(如需):
web_search: [预约类型] 附近 [位置]
展示前3个选项,包含:名称、地址、距离、评分、预约方式。
用户选择。存储在 providers.md 中。
第二步 — 查找预约页面
web_fetch: [服务提供方网站]
查找:在线预约链接、预约系统(Doctolib、Zocdoc、Calendly、自有系统)。
如果找到预约系统:进入第三步。
如果无在线预约:进入仅电话预约流程。
第三步 — 查看可用时间
使用浏览器工具导航预约系统。
查找可用时段。如已连接日历,与用户日历核对。
询问用户:对日期或时间有偏好吗?上午还是下午?
默认:与日历无冲突的下一个可用时段。
展示前3个选项:
可用时段:
- 1. 4月15日星期二 — 上午10:30
- 4月16日星期三 — 下午2:15
- 4月18日星期五 — 上午9:00
哪个合适?
第四步 — 完成预约
在浏览器中导航并完成预约。
填写所需详细信息(姓名、出生日期、就诊原因——如需则询问用户)。
获取确认号或确认邮件。
向用户确认:
✅ 已预约:牙医 — [医生姓名] / [诊所名称]
4月15日星期二 上午10:30
[地址]
确认号:# [参考号]
已设置提醒:4月14日星期一(24小时前)和4月15日星期二上午8:30(2小时前)。
已添加至 Google 日历。✓
记录至 appointments.md 并更新 providers.md 中的预约详情。
第五步 — 注册提醒定时任务
为提醒链中的每个提醒注册一个独立定时任务:
json
{
name: 预约提醒 24小时前 — [类型] [日期],
schedule: { kind: at, at: [预约前24小时的ISO时间戳] },
sessionTarget: isolated,
wakeMode: now,
deleteAfterRun: true,
payload: {
kind: agentTurn,
message: 发送24小时预约提醒。读取 {baseDir}/appointments.md 中的[预约ID]。发送包含地址、需携带物品、行程时间的提醒。,
lightContext: true
},
delivery: { mode: announce, channel: <渠道>, to: <目标> }
}
为2小时提醒重复此操作。将定时任务ID存储在 appointments.md 中。
预约流程 — 仅电话服务提供方
当服务提供方无在线预约时:
第一步 — 查找号码
web_fetch: [服务提供方网站]
web_search: [服务提供方名称] 电话号码
提取:主要预约号码、最佳通话时间、任何备注(上午9点后拨打、预约请按2)。
第二步 — 起草通话话术
生成完整话术,随时可用:
📞 通话话术 — [服务提供方名称]
号码:[电话号码]
最佳通话时间:[时间 — 例如工作日上午,线路上午8点开通]
[任何导航说明 — 预约请按2]
接通后:
您好,我想预约[原因/类型]。
我叫[用户姓名]。
出生日期:[如为医疗预约需提供]
[其他任何所需详细信息]
我方便的时间:[用户的可用时间 — 从日历获取或询问]
请问未来[时间范围]内,有[上午/下午]的时段吗?
预约成功后,请记录:/appt log [类型] [日期/时间]
将话术发送至用户的渠道。一条消息包含所有所需信息。
第三步 — 设置通话提醒
如果用户在2天内未记录预约:
您是否已致电[服务提供方名称]?如果已预约,只需记录一下,我将设置提醒。
预约类型及准备说明
该技能了解不同预约通常需要什么。
24小时提醒包含针对特定类型的准备说明。
医疗/全科医生:
- - 携带:[任何转诊信、当前用药清单、保险卡(如适用)]
- 注意:首次就诊请提前5-10分钟到达
- 行程:[从家出发的预估行程时间]
牙医:
- - 如可能,就诊前1小时避免进食
- 携带:[牙科保险卡(如适用)]
- 行程:[预估行程时间]
验光师:
- - 携带:当前眼镜/隐形眼镜
- 注意:如使用散瞳药水,检查后可能无法驾驶
理发/美容:
专科/医院:
- - 携带:转诊信、任何既往检查结果、用药清单、保险卡
- 注意:预留额外时间用于登记
- 行程:[医院可能较大——确认科室和入口]
自定义:
对于库中未包含的预约类型,询问用户一次:有什么需要特别携带或准备的吗?
存储在 providers.md 中,供未来在同一服务提供方预约时使用。
appointments.md 结构
md
预约记录
[预约ID] — [类型] — [服务提供方名称]
日期:[日期时间]
时长:[如已知]
地址:[完整地址]
预约方式:[在线/电话话术/手动]
确认信息:[参考号或邮件确认]
状态:即将到来 / 已完成 / 已取消 / 已改期
提醒任务:[24小时前定时任务ID] [2小时前定时任务ID]
准备说明:[需携带物品、任何特定说明]
跟进:[无 / [特定跟进要求]]
日历事件:[如已同步,Google日历事件ID]
备注:[其他任何内容]
providers.md 结构
md
服务提供方
[服务提供方名称]
类型:[牙医/全科医生/验光师/等]
地址:[完整地址]
电话:[号码]
最佳通话时间:[如仅电话预约]
预约方式:[在线 — [URL] / 仅电话 / 混合]
预约系统:[Doctolib / Zocdoc / 自有系统 / 等]
上次就诊:[日期]
备注:[任何有用信息 — 首选[医生姓名]医生、有停车场等]
providers.md 随时间增长。每个新服务提供方都会被存储。