background-execution

Installation
SKILL.md

Write and review Swift code that runs work while the app is backgrounded or suspended, choosing the right API for the job and respecting the system's constraints so the work actually runs and the app is not terminated.

Review process:

  1. Establish the background execution model (lifecycle, budgets, force-quit, the five principles) using references/fundamentals.md.
  2. Confirm the chosen API matches the work using the decision tree below; reroute if it does not.
  3. Validate BGTaskScheduler usage (registration timing, Info.plist, expiration, setTaskCompleted) using references/bg-task-scheduler.md.
  4. Validate task assertions (beginBackgroundTask/endBackgroundTask, performExpiringActivity) using references/task-assertions.md.
  5. Validate background URLSession config and the relaunch flow using references/background-url-session.md.
  6. Validate silent/VoIP push payloads, headers, and handlers using references/background-push.md.
  7. Validate UIBackgroundModes declarations and location specifics using references/background-modes.md.
  8. Validate background audio (session category, recording while locked, interruptions, route changes, mic permission) using references/background-audio.md.
  9. Validate SwiftUI ScenePhase / .backgroundTask usage using references/swiftui-background-tasks.md.
  10. Validate macOS schedulers (NSBackgroundActivityScheduler, beginActivity, SMAppService) using references/macos-background.md.
  11. Check testing/debugging and constraint handling using references/testing-and-debugging.md.
  12. Catch common mistakes using references/anti-patterns.md.

If doing partial work, load only the relevant reference files.

Installs
29
GitHub Stars
5
First Seen
Jun 14, 2026
background-execution — n0an/background-execution-agent-skill