alarmkit
Implement AlarmKit alarms and countdown timers for iOS and iPadOS with Lock Screen, Dynamic Island, StandBy, and paired Apple Watch system UI.
Install / Use
npx skills add dpearson2699/swift-ios-skills --skill alarmkitInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Our assessment of alarmkit
alarmkit scores 89/100 on our quality scale, 1668th of 4,698 Development & Engineering skills we index (top 36%).
Its SKILL.md is 13 KB long, well organised into 23 sections with 4 code examples: a thorough specification that gives an agent plenty to work with.
With 1,143 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- Our last check on 2026-10-31 found the source still online.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 86/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-04. Automated pattern scan on 2026-10-04. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
alarmkit compared with similar skills
All 4 of these similar skills score higher than alarmkit; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| alarmkit (this skill)by dpearson2699 | 89 | 1.1k | 4mo ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 116.8k | 8d ago | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 72.1k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.3k | 2d ago | CLAUDE.md |
| lobehubby lobehub | 100 | 85.6k | today | MCP Server |
Frequently asked questions
- How do I install alarmkit?
- Run
npx skills add dpearson2699/swift-ios-skills --skill alarmkit. The install tabs above show the steps for each supported agent. - Which AI agents does alarmkit work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is alarmkit safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 86/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is alarmkit still maintained?
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubname: alarmkit description: "Implement AlarmKit alarms and countdown timers for iOS and iPadOS with Lock Screen, Dynamic Island, StandBy, and paired Apple Watch system UI. Covers AlarmManager scheduling, AlarmAttributes and AlarmPresentation, system Stop and AlarmButton secondary actions, authorization, state observation, countdown widget-extension handoff, and Live Activity integration. Use when building wake-up alarms, countdown timers, or alarm-style alerts that need Apple's system alarm experience."
AlarmKit
Schedule prominent alarms and countdown timers that surface on the Lock Screen, Dynamic Island, StandBy, and a paired Apple Watch when the alarm fires. AlarmKit requires iOS 26+ / iPadOS 26+. Alarms can break through Focus and Silent mode.
AlarmKit uses ActivityKit data models for its Live Activity, but the firing alert
is system-managed alarm UI, not a general custom notification UI surface. Custom
UI belongs only to countdown and paused Live Activity states rendered by a Widget
Extension with the same AlarmAttributes<Metadata> and
AlarmPresentationState used when scheduling.
See references/alarmkit-patterns.md for complete code patterns including authorization, scheduling, countdown timers, snooze handling, and widget setup.
import AlarmKit
Contents
- Workflow
- Authorization
- Alarm vs Timer Decision
- Scheduling Alarms
- Countdown Timers
- Alarm States
- AlarmAttributes and AlarmPresentation
- AlarmButton
- Live Activity Integration
- Common Mistakes
- Review Checklist
- References
Workflow
1. Create a new alarm or timer
- Add
NSAlarmKitUsageDescriptionto Info.plist with a user-facing string. - Request authorization with
AlarmManager.shared.requestAuthorization()when the app can explain the value, or handle the first-schedule system prompt. - If authorization is
.deniedor not.authorized, show recovery UI instead of scheduling. - Configure
AlarmPresentation(alert, countdown, paused states). - Create
AlarmAttributeswith the presentation, optional metadata, and tint color. - Build an
AlarmManager.AlarmConfiguration(.alarm or .timer). - Schedule with
AlarmManager.shared.schedule(id:configuration:). - Observe
alarmManager.alarmUpdatesand confirm the scheduled ID reaches the expected state. - If using countdown, add a Widget Extension target with an
ActivityConfigurationfor the sameAlarmAttributes<Metadata>type.
2. Review existing alarm code
Run through the Review Checklist at the end of this document.
Authorization
AlarmKit requires user authorization. Request early when the app can explain the value, or let AlarmKit prompt automatically on first schedule. If authorization is not granted after the explicit or automatic prompt, alarms are not scheduled and will not alert.
let manager = AlarmManager.shared
// Request authorization explicitly
let state = try await manager.requestAuthorization()
guard state == .authorized else { return }
// Check current state synchronously
let current = manager.authorizationState // .authorized, .denied, .notDetermined
// Observe authorization changes
for await state in manager.authorizationUpdates {
switch state {
case .authorized: print("Alarms enabled")
case .denied: print("Alarms disabled")
case .notDetermined: break
@unknown default: break
}
}
Alarm vs Timer Decision
| Feature | Alarm (.alarm) | Timer (.timer) |
|---|---|---|
| Fires at | Specific time (schedule) | After duration elapses |
| Countdown UI | Optional | Always shown |
| Recurring | Yes (weekly days) | No |
| Use case | Wake-up, scheduled reminders | Cooking, workout intervals |
Use .alarm(schedule:...) when firing at a clock time. Use .timer(duration:...)
when firing after a duration from now.
Scheduling Alarms
Alarm.Schedule
Use .fixed(date) for a one-time absolute date or .relative for a local clock
time with .never or .weekly repetition. Load
Recurring Alarm Patterns
for daily, weekday, weekend, and fixed-date variants.
Schedule and Configure
let id = UUID()
let alert = AlarmPresentation.Alert(
title: "Wake Up",
secondaryButton: AlarmButton(
text: "Snooze", textColor: .white, systemImageName: "bell.slash"
),
secondaryButtonBehavior: .countdown
)
let presentation = AlarmPresentation(alert: alert)
struct EmptyAlarmMetadata: AlarmMetadata {}
let attributes = AlarmAttributes<EmptyAlarmMetadata>(
presentation: presentation,
metadata: nil,
tintColor: .indigo
)
let snooze = Alarm.CountdownDuration(preAlert: nil, postAlert: 300)
let configuration = AlarmManager.AlarmConfiguration(
countdownDuration: snooze,
schedule: .relative(.init(
time: .init(hour: 7, minute: 0),
repeats: .never
)),
attributes: attributes,
sound: .default
)
let alarm = try await AlarmManager.shared.schedule(
id: id,
configuration: configuration
)
For an authorization-gated function and metadata-bearing variant, load Complete Alarm Scheduling Flow.
stopIntent and secondaryIntent default to nil. Omit stopIntent for
AlarmKit's standard system Stop behavior; provide it only when Stop must run app
cleanup, custom stop behavior, or other side effects. Omit secondaryIntent for
ordinary Snooze/Repeat with secondaryButtonBehavior: .countdown and
Alarm.CountdownDuration.postAlert; provide it only for .custom secondary
behavior or app cleanup/custom behavior.
Alarm State Transitions
cancel(id:)
|
scheduled --> countdown --> alerting
| | |
| pause(id:) stop(id:) / countdown(id:)
| |
| paused ----> countdown (via resume(id:))
|
cancel(id:) removes from system entirely
cancel(id:)-- remove the alarm completely, including repeating alarmspause(id:)-- pause a counting-down alarm; throws from other statesresume(id:)-- resume a paused alarm; throws from other statesstop(id:)-- stop the alarm; one-shot alarms are removed, repeating alarms reschedulecountdown(id:)-- restart countdown from alerting state (snooze); throws from other states
Countdown Timers
Timers fire after a duration and always show a countdown UI. Use
Alarm.CountdownDuration to control pre-alert and post-alert durations.
CountdownDuration
Alarm.CountdownDuration controls the visible countdown phases:
preAlert-- seconds to count down before the alarm fires (the main countdown)postAlert-- seconds for a repeat/snooze countdown after the alarm fires
Load Complete Countdown Timer Flow for the timer factory, pause/resume presentation, metadata, and scheduling gate.
Alarm States
Each Alarm has a state property reflecting its current lifecycle position.
| State | Meaning |
|---|---|
| .scheduled | Scheduled and ready to alert at the appropriate time |
| .countdown | Actively counting down (timer or pre-alert phase) |
| .paused | Countdown paused by user or app |
| .alerting | Alarm is firing -- sound playing, UI prominent |
Observing State Changes
AlarmManager.shared.alarms is a throwing getter for the current daemon
snapshot. Use try, and either propagate the error or wrap launch refresh in
do/catch before relying on the snapshot.
Observe alarmUpdates rather than maintaining an independent lifecycle. Load
State Observation with Async Sequences
for the complete store and refresh loop.
An alarm that disappears from alarmUpdates is no longer scheduled with
AlarmKit. Compare against app-persisted IDs when you need to distinguish fired,
cancelled, and rescheduled alarms.
AlarmAttributes and AlarmPresentation
AlarmAttributes conforms to ActivityAttributes and defines the static
data for the alarm's Live Activity. It is generic over a Metadata type
conforming to AlarmMetadata, which inherits Decodable, Encodable,
Hashable, and Sendable. The metadata value itself is optional and defaults
to nil.
AlarmPresentation supplies the required alerting content and optional
countdown/paused content. The system renders alerting UI; a widget extension can
customize countdown and paused Live Activity views with the same attributes and
presentation state. Keep metadata lightweight, use nil when it is unnecessary,
and share its type with the widget extension.
AlarmPresentationState
AlarmPresentationState is the system-managed ContentState of the alarm
Live Activity. It contains the alarm ID and a Mode enum:
.alert(Alert)-- alarm is firing, includes the scheduled time.countdown(Countdown)-- actively counting down, includes fire date and durations.paused(Paused)-- countdown paused, includes elapsed and total durations
The widget extension reads AlarmPresentationState.mode to decide which UI to
render in the Dynamic Island and Lock Screen for non-alerting states.
AlarmButton
AlarmButton defines the text, color, and symbol for an alarm action. The
representative scheduling example above shows a standard Snooze button.
Secondary Button Behavior
The secondary button on the alert UI has two behaviors:
| Behavior | Effect |
|---|---|
| .countdown | Restarts a countdown using postAlert duration (snooze) |
| .custom | Triggers the secondaryIntent (e.g., open app) |
Live Activity Integration
AlarmKit alarms appear as Live Activities on the Lock Screen, Dynamic Island,
StandBy, and on a paired Apple Watch when the alarm fires. The system manages
the alerting UI. For countdown and paused states, add a Widget Extension target
whose ActivityConfiguration uses the same AlarmAttributes<Metadata> type
used when scheduling the alarm.
A widget extension is expected if your alarm uses countdown presentation. Keep that lightweight metadata type available to both the app and widget extension. Without the extension, alarms may be dismissed unexpectedly or fail to alert, though the system can still show a fallback countdown UI in limited cases such as after a device restart before first unlock.
| Work | Owner |
|---|---|
| Authorization, scheduling/state, presentation, sound, system alarm actions | AlarmKit |
| Home Screen/Smart Stack widgets, families, timelines, reloads | widgetkit |
| Non-alarm Live Activity lifecycle, tokens, remote content state | activitykit |
| APNs, notification categories/actions, custom notification UI | push-notifications |
AlarmKit's alert is system-rendered on Lock Screen, Dynamic Island, StandBy, and paired Apple Watch; only countdown/paused states use the widget extension.
For setup, name Apple-documented NSAlarmKitUsageDescription and AlarmManager
authorization. Do not require unsupported AlarmKit setup keys or
com.apple.developer.alarmkit unless a current Apple source documents them.
Load Live Activity Widget Extension for Alarms
for the complete shared-attributes widget implementation.
Common Mistakes
| Mistake | Correction |
|---|---|
| Missing usage string or authorization gate | Add NSAlarmKitUsageDescription; handle denial before scheduling |
| Timer used for recurrence | Use an alarm with .weekly([...]) |
| App-owned state replaces alarmUpdates | Observe the system sequence and reconcile by ID |
| Intents added for standard Stop/Snooze | Omit
Truncated for display — read the full file on GitHub.
Related Skills
taste-skill
116.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
ai-job-search
72.1kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.3kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
lobehub
85.6k🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
