macos-file-system

Implement sandbox-compliant file access with security-scoped bookmarks and NSFileCoordinator.

1|Updated Jun 5, 2026
One-click install
npx skills add https://github.com/LaughingJackalope/macos-skills --skill macos-file-system
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: macos-file-system
Source: https://github.com/LaughingJackalope/macos-skills/tree/main/macos-file-system
Command: npx skills add https://github.com/LaughingJackalope/macos-skills --skill macos-file-system

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

macOS sandboxed applications face significant barriers when accessing files outside their container, coordinating file access with other processes, and integrating Spotlight search functionality, leading to broken document workflows, permission errors, and poor user experience for file-heavy apps.

Core Features & Use Cases

  • Persistent File Access: Security-scoped bookmarks let apps re-access user-selected files across launches without re-granting permissions.
  • Cross-Process Coordination: NSFileCoordinator and NSFilePresenter serialize file operations across processes to prevent data corruption during concurrent edits.
  • Spotlight Integration: NSMetadataQuery enables in-app search for files by metadata, content, and tags without leaving your app.
  • Use Case: A macOS document editor can use this skill to let users open files, save changes across launches, sync edits with iCloud, and search for recent documents directly in the app.

Quick Start

Use the macos-file-system skill to implement persistent security-scoped file access, cross-process file coordination, and in-app Spotlight search for your macOS document editor app.

Frequently Asked Questions about macos-file-system

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

FAQPage Schema
How do I persist file access in a macOS sandbox app across launches?

Security-scoped bookmarks enable macOS sandbox apps to persist file access across launches without re-granting permissions. They store resolved references to user-selected files, allowing your application to maintain continuous document workflows.

What is NSFileCoordinator used for in macOS file operations?

NSFileCoordinator serializes file operations across processes to prevent data corruption during concurrent edits. It works with NSFilePresenter to manage cross-process file coordination, ensuring safe read and write access for sandboxed applications.

Can I implement Spotlight search inside my macOS document editor?

Yes, NSMetadataQuery enables in-app Spotlight search for files by metadata, content, and tags. This allows users to search for recent documents directly within your macOS application without leaving the sandbox.

How do I register custom document types for native macOS workflows?

You can register custom document types using UTType declarations to integrate with Finder and native macOS workflows. This enables your sandboxed app to handle specific file formats and support iCloud document sync.

Why does my sandboxed app get permission errors accessing external files?

Sandboxed apps face permission barriers when accessing files outside their container without explicit user selection. Security-scoped bookmarks resolve this by maintaining persistent access to user-granted files across application launches.