macOS应用

macOS应用 is a skill for Claude Code, Codex from nongjun/awesome-harness-engineering. It costs 44 tokens per session (470 once invoked), scanned A, a copy of macOS应用, MIT.

A set of guidelines for building macOS desktop apps with Swift and SwiftUI, Apple's tools for creating native user interfaces. It covers app permissions, windows, data storage, networking, and distribution.

In plain words
What is it for?
Use it when building, storing data in, networking from, or distributing a macOS app. It also covers menus, shortcuts, drag-and-drop, multiple windows, and SwiftUI state.
Why use it?
It helps developers account for macOS conventions, sandbox permissions, background behavior, and the different ways apps are distributed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when building, storing data in, networking from, or distributing a macOS app. It also covers menus, shortcuts, drag-and-drop, multiple windows, and SwiftUI state.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nongjun/awesome-harness-engineering/macos
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add nongjun/awesome-harness-engineering --skill macos
Clone the repo
git clone --depth 1 https://github.com/nongjun/awesome-harness-engineering

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for macOS应用

README.md
[![agentmods](https://agentmods.dev/badge/skills/nongjun/awesome-harness-engineering/macos/github.svg)](https://agentmods.dev/skills/nongjun/awesome-harness-engineering/macos)
Your own site
<a href="https://agentmods.dev/skills/nongjun/awesome-harness-engineering/macos"><img src="https://agentmods.dev/badge/skills/nongjun/awesome-harness-engineering/macos/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for macOS应用

Your own site · 80×15
<a href="https://agentmods.dev/skills/nongjun/awesome-harness-engineering/macos"><img src="https://agentmods.dev/badge/skills/nongjun/awesome-harness-engineering/macos.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 470 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.00470
Opus 5.5 $0.00018 $0.00188
Sonnet 5.5 $0.00009 $0.00094
Haiku 4.5 $0.00004 $0.00047

Measured 1mo ago against content hash de57ae4f6470, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

macOS应用 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to macOS应用 — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/macOS应用/SKILL.md · 50 lines

What it actually says

macOS 应用开发模式

适用场景

使用 Swift/SwiftUI 开发 macOS 桌面应用时。

核心原则

  • 沙箱优先——App Store 要求沙箱化,提前规划权限需求
  • 原生体验——遵循 macOS 人机界面指南,菜单栏、快捷键、拖拽都要支持
  • 后台能力——macOS 应用可以后台运行,注意内存和 CPU 占用
  • 多窗口——macOS 用户期望多窗口支持,不要做成单窗口

SwiftUI 模式

  • 用 @State、@Binding、@ObservedObject 管理状态
  • 复杂状态用 @EnvironmentObject 跨视图共享
  • 列表用 LazyVStack/LazyHStack 做懒加载
  • 导航用 NavigationSplitView(macOS 三栏布局)

数据持久化

  • 简单配置用 UserDefaults 或 @AppStorage
  • 结构化数据用 SwiftData 或 Core Data
  • 文件操作需申请沙箱权限,用 NSOpenPanel/NSSavePanel
  • 敏感数据(密码、Token)存 Keychain

网络通信

  • 用 URLSession 或 Alamofire 做 HTTP 请求
  • 异步操作用 async/await(Swift Concurrency)
  • 处理网络不可用的情况,给用户明确提示

分发方式

  • App Store:需要沙箱、签名、审核
  • Developer ID:签名 + 公证(Notarization),可直接分发
  • 企业内部:可以用 .app 或 .dmg 直接分发(需关闭 Gatekeeper 或签名)

常见坑点

  • macOS 权限系统比 iOS 复杂(辅助功能、屏幕录制、完全磁盘访问等)
  • 菜单栏应用(MenuBarExtra)的生命周期与窗口应用不同
  • 进程间通信用 XPC 或 DistributedNotificationCenter
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 50 lines · 44 tokens per session scan A de57ae4f6470

Subscribe to this mod's changes

macOS应用 is a skill published in the GitHub repository nongjun/awesome-harness-engineering (2 stars, last pushed 7mo ago), licensed MIT. It adds 44 tokens to every session and 470 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to macOS应用, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

kotlin-specialist

Provides idiomatic Kotlin implementation patterns including coroutine concurrency, Flow stream handling, multiplatform architecture, Compose UI construction, Ktor server setup, and type-safe DSL design. Use when building Kotlin applications requiring coroutines, multiplatform development, or Android with Compose.…

Jeffallan/claude-skills · 86 tokens

swiftui-dev

Use this skill for SwiftUI development, architecture, structure, performance, and Apple native app profiling. It combines.

Orkas-AI/Orkas · 3 tokens

axiom-concurrency

Use when writing ANY async code, actors, or threads in an Apple-platform app, or seeing ANY concurrency error. Covers Swift 6 concurrency, @MainActor, Sendable, data races, async/await patterns.

CharlesWiltgen/Axiom · 49 tokens

mobiai-kmp

Use when working on a Kotlin Multiplatform project — shared code, expect/actual declarations, platform-specific implementations, building and testing.

ArisGuimera/MobiAI-Core · 32 tokens

wax

Swift client guidance for Wax's public Memory, PhotoMemory, and VideoMemory APIs. Use only when writing or changing Swift app code that imports Wax. Do not use at session start. Do not use for MCP remember/recall/stats — those follow the live MCP server instructions. Do not use for waxmcp install or doctor (that is…

christopherkarani/Wax · 76 tokens

re-swift

A guide to examining compiled Swift programs, including their symbols, protocol data, closures, and links to Objective-C code. It covers Swift binaries on macOS and Linux with tools such as swift-demangle.

dslsdzc/rev-skills · 62 tokens