apple-context
GitHub该技能用于在用户询问日程、事件、可用性、通勤时间或基于当前位置的上下文(如附近地点、天气)时,调用Apple日历和定位模块。需遵循权限检查原则,仅在获得授权后访问数据,并妥善处理权限拒绝情况。
Trigger Scenarios
Install
npx skills add aduermael/herm --skill apple-context -g -y
SKILL.md
Frontmatter
{
"name": "apple-context",
"metadata": {
"short-description": "Calendar and location through CPSL"
},
"description": "Use CPSL calendar and location modules for user-approved Apple Calendar events and current device location."
}
Apple Context
Use this skill when the user asks about their calendar, schedule, events, availability, travel time, local context, nearby places, weather at their current position, or any request that depends on the device's current location.
Permissions
- Check
help(), thencalendar.help()orlocation.help()before using the modules. - Calendar and location access states use
granted,denied, andundefinedthrough thestateoraccessfields. If access isundefined, calling the relevant request/current function may prompt the user. - If access is denied, stop using that capability and tell the user to enable access for Herm in iOS Settings or macOS System Settings. Do not repeatedly retry.
- Use only the minimum needed capability. Do not request calendar or location access unless it materially helps with the user's request.
Calendar
Use calendar.status() before reading or changing events when practical. If a calendar operation reports denied access, explain that Calendar access must be enabled in Settings.
local status = calendar.status()
if status.state == "undefined" then
status = calendar.request_access("full")
end
List events with an explicit time range:
local events = calendar.events("2026-07-08T00:00:00Z", "2026-07-09T00:00:00Z", {limit = 50})
Create events only when the user asked you to add something or clearly approved it:
local event = calendar.create("Dentist", "2026-07-08T16:00:00Z", "2026-07-08T17:00:00Z", {
location = "Main St"
})
Location
Use location.current() for the current device location. It prompts if access is undefined and returns a table containing location.latitude, location.longitude, accuracy, and timestamp.
local here = location.current()
print(here.location.latitude, here.location.longitude)
Treat location as sensitive. Do not print precise coordinates unless the user needs them or asks for them; prefer using the location to answer the task.
Version History
- f2da284 Current 2026-07-19 13:56


