preflight-permissions

Automate macOS XCUITest preflight permission handling with certificate creation and Settings navigation.

Updated Mar 27, 2026
One-click install
npx skills add https://github.com/sunfmin/autocraft --skill preflight-permissions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: preflight-permissions
Source: https://github.com/sunfmin/autocraft/tree/main/skills/preflight-permissions
Command: npx skills add https://github.com/sunfmin/autocraft --skill preflight-permissions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Preflight permissions to prevent macOS UI tests from hanging on permission dialogs and failing silently, especially when tests hang or trigger the "access data of other apps" prompts. This prerequisite ensures autocraft on macOS projects runs smoothly by preparing the correct permissions before automated journeys.

Core Features & Use Cases

  • Detects required TCC permissions by scanning entitlements and code usage.
  • Creates a self-signed signing certificate and configures the project to use it.
  • Builds the app with a deterministic derived data path to a predictable location.
  • Guides user to grant each permission via System Settings, opening the relevant panes automatically.
  • Launches the app to register it for TCC permissions.
  • Runs a smoke test to verify permission handling and app launch.

Quick Start

Run this skill once to preflight macOS permissions, generate a signing certificate, build the app, and guide you through granting TCC permissions.

Frequently Asked Questions about preflight-permissions

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

FAQPage Schema
How do I prevent macOS XCUITest UI tests from hanging on permission dialogs?

To prevent macOS XCUITest UI tests from hanging on permission dialogs, you can run a preflight permissions skill that detects required TCC permissions, creates a signing certificate, and guides you through granting access before automated journeys.

Why do my macOS UI tests fail silently when triggering access data of other apps prompts?

macOS UI tests fail silently because they hang on TCC permission dialogs like 'access data of other apps' without preflight preparation. Automating permission detection and granting access via System Settings beforehand ensures tests run smoothly without silent failures.

How to automate TCC permission setup for macOS UI tests?

Automate TCC permission setup for macOS UI tests by scanning entitlements to detect required permissions, building the app with a deterministic derived data path, launching it to register for TCC, and automatically navigating to relevant System Settings panes for approval.

Does preflight permissions work with new macOS projects using XCUITest?

Yes, preflight permissions is designed for new macOS projects using XCUITest. It satisfies requirements for certificate management, project.yml updates, deterministic builds, permission detection, automatic Settings navigation, smoke verification, and a final readiness report.

What's the best way to handle code signing for automated macOS UI tests?

The best way to handle code signing for automated macOS UI tests is creating a self-signed signing certificate and configuring the project to use it. This ensures deterministic builds to a predictable derived data path for consistent test execution.

When do I need to configure TCC permissions before running macOS automated tests?

You need to configure TCC permissions before running macOS automated tests when your app requires access to protected resources. Preflight permission handling detects required TCC permissions by scanning entitlements and code usage, then guides you through granting each permission via System Settings.