macos-crash-recovery

Implement macOS crash recovery with NSApplication termination handling and Core Data autosave.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/productengineered/parsely --skill macos-crash-recovery-productengineered
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: macos-crash-recovery
Source: https://github.com/productengineered/parsely/tree/main/.claude/skills/tooling/macos-crash-recovery
Command: npx skills add https://github.com/productengineered/parsely --skill macos-crash-recovery-productengineered

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

macOS app crash recovery, state restoration, and autosave patterns help developers prevent data loss during crashes or termination by preserving user progress and application state.

Core Features & Use Cases

  • Graceful termination handling with prompts to save unsaved changes via NSApplicationDelegate
  • State restoration using @SceneStorage to persist user navigation and UI state across launches
  • Core Data autosave strategies with periodic saves and context lifecycle management
  • Atomic multi-step operation saves with batch commits to avoid partial persistence
  • QA and testing guidance to ensure UI recovers gracefully after force-quit or crash

Quick Start

Integrate this pattern into a macOS app by enabling SceneStorage and Core Data autosave to preserve user progress across sessions.

Frequently Asked Questions about macos-crash-recovery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement macOS crash recovery and state restoration to prevent data loss?

macOS crash recovery prevents data loss by applying state restoration patterns like @SceneStorage for UI state and Core Data autosave for user progress, preserving application lifecycle across relaunches.

What is the best way to autosave Core Data context during the macOS app lifecycle?

The best way to autosave Core Data context involves periodic saves and strict context lifecycle management, ensuring batch commits for multi-step operations to avoid partial persistence during unexpected termination.

How do I handle NSApplication termination to prompt users to save unsaved changes?

Handling NSApplication termination requires using NSApplicationDelegate to intercept graceful termination events and prompt users to save unsaved changes before the application exits.

Does @SceneStorage work for persisting UI state across macOS app force-quit sessions?

Yes, @SceneStorage is designed to persist user navigation and UI state across launches, allowing the application to recover its previous interface state even after a force-quit or crash.

How do I test macOS state restoration and autosave after a force-quit crash?

Testing macOS state restoration after a force-quit involves following QA testing guidelines to verify UI recovers gracefully, checking that @SceneStorage and Core Data autosave successfully restore previous data.