Skip to content

feat(build-macos-apps): add macOS app building skills and commands#72

Merged
duyet merged 2 commits into
masterfrom
feat/build-macos-apps-plugin
Jun 13, 2026
Merged

feat(build-macos-apps): add macOS app building skills and commands#72
duyet merged 2 commits into
masterfrom
feat/build-macos-apps-plugin

Conversation

@duyet

@duyet duyet commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Adds the build-macos-apps plugin for building, debugging, instrumenting, and implementing macOS apps with SwiftUI and AppKit guidance, codesigning, packaging, and telemetry.

Skills (11): liquid-glass, signing-entitlements, packaging-notarization, test-triage, window-management, telemetry, swiftui-patterns, view-refactor, appkit-interop, build-run-debug, swiftpm-macos.

Commands (3): build-and-run-macos-app, fix-codesign-error, test-macos-app.

Includes Claude + Codex manifests and an agent definition. The plugin is already registered in the marketplace manifests; this adds the missing plugin files.

New plugin for building, debugging, instrumenting, and implementing macOS apps with SwiftUI and AppKit guidance, codesigning, packaging, and telemetry workflows.

11 skills (liquid-glass, signing-entitlements, packaging-notarization, test-triage, window-management, telemetry, swiftui-patterns, view-refactor, appkit-interop, build-run-debug, swiftpm-macos) + 3 commands (build-and-run-macos-app, fix-codesign-error, test-macos-app) + agent definition. Claude + Codex manifests included; already registered in the marketplace manifests.

Co-Authored-By: duyetbot <duyetbot@users.noreply.github.com>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @duyet, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@duyet, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 4 minutes and 8 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9c109ff3-fbd4-4100-b5a5-20885f46d55b

📥 Commits

Reviewing files that changed from the base of the PR and between e7bf0f6 and 4ccfd54.

📒 Files selected for processing (30)
  • build-macos-apps/.claude-plugin/plugin.json
  • build-macos-apps/.codex-plugin/plugin.json
  • build-macos-apps/README.md
  • build-macos-apps/agents/openai.yaml
  • build-macos-apps/commands/build-and-run-macos-app.md
  • build-macos-apps/commands/fix-codesign-error.md
  • build-macos-apps/commands/test-macos-app.md
  • build-macos-apps/skills/appkit-interop/SKILL.md
  • build-macos-apps/skills/appkit-interop/references/drag-drop-pasteboard.md
  • build-macos-apps/skills/appkit-interop/references/representables.md
  • build-macos-apps/skills/appkit-interop/references/responder-menus.md
  • build-macos-apps/skills/appkit-interop/references/window-panels.md
  • build-macos-apps/skills/build-run-debug/SKILL.md
  • build-macos-apps/skills/build-run-debug/references/run-button-bootstrap.md
  • build-macos-apps/skills/liquid-glass/SKILL.md
  • build-macos-apps/skills/packaging-notarization/SKILL.md
  • build-macos-apps/skills/signing-entitlements/SKILL.md
  • build-macos-apps/skills/swiftpm-macos/SKILL.md
  • build-macos-apps/skills/swiftui-patterns/SKILL.md
  • build-macos-apps/skills/swiftui-patterns/references/commands-menus.md
  • build-macos-apps/skills/swiftui-patterns/references/components-index.md
  • build-macos-apps/skills/swiftui-patterns/references/menu-bar-extra.md
  • build-macos-apps/skills/swiftui-patterns/references/settings.md
  • build-macos-apps/skills/swiftui-patterns/references/split-inspectors.md
  • build-macos-apps/skills/swiftui-patterns/references/windowing.md
  • build-macos-apps/skills/telemetry/SKILL.md
  • build-macos-apps/skills/test-triage/SKILL.md
  • build-macos-apps/skills/view-refactor/SKILL.md
  • build-macos-apps/skills/window-management/SKILL.md
  • build-macos-apps/skills/window-management/references/api-snippets.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/build-macos-apps-plugin

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

Welcome! 👋

Thank you for your first contribution to this project! We appreciate you taking the time to improve our codebase.

Next Steps

  • A maintainer will review your PR shortly
  • Please check for any review comments and address them
  • Feel free to ask questions if anything is unclear

Contribution Guidelines

  • Ensure all tests pass
  • Update documentation if needed
  • Keep changes focused and atomic

Thanks again for contributing! 🎉

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive suite of guides, commands, and manifests for a macOS development plugin, covering areas like AppKit interop, window management, and SwiftUI patterns. The review feedback highlights several critical issues in the reference code snippets: a layout issue with NSTextView resizability, a deprecation warning for NSApplication.activate(ignoringOtherApps:) on macOS 14+, a compilation error due to a missing position: label in WindowPlacement, a potential background process leak in the bootstrap shell script, and a design convention violation regarding .scenePadding() on a TabView.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +22 to +28
func makeNSView(context: Context) -> NSScrollView {
let scrollView = NSScrollView()
let textView = NSTextView()
textView.delegate = context.coordinator
scrollView.documentView = textView
return scrollView
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Programmatically setting up an NSTextView inside an NSScrollView without configuring resizing masks and container tracking properties often leads to layout issues where the text view does not wrap text or fill the scroll view properly. It is highly recommended to configure the text view's vertical resizability, autoresizing mask, and text container width tracking.

Suggested change
func makeNSView(context: Context) -> NSScrollView {
let scrollView = NSScrollView()
let textView = NSTextView()
textView.delegate = context.coordinator
scrollView.documentView = textView
return scrollView
}
func makeNSView(context: Context) -> NSScrollView {
let scrollView = NSScrollView()
scrollView.hasVerticalScroller = true
let textView = NSTextView()
textView.isVerticallyResizable = true
textView.autoresizingMask = [.width]
textView.textContainer?.containerSize = NSSize(width: scrollView.contentSize.width, height: CGFloat.greatestMagnitude)
textView.textContainer?.widthTracksTextView = true
textView.delegate = context.coordinator
scrollView.documentView = textView
return scrollView
}

Comment on lines +29 to +34
final class AppDelegate: NSObject, NSApplicationDelegate {
func applicationDidFinishLaunching(_ notification: Notification) {
NSApp.setActivationPolicy(.regular)
NSApp.activate(ignoringOtherApps: true)
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

NSApplication.activate(ignoringOtherApps:) is deprecated starting in macOS 14.0. Since the minimum system version target is macOS 14.0, use the modern parameterless NSApplication.activate() instead to avoid deprecation warnings.

Suggested change
final class AppDelegate: NSObject, NSApplicationDelegate {
func applicationDidFinishLaunching(_ notification: Notification) {
NSApp.setActivationPolicy(.regular)
NSApp.activate(ignoringOtherApps: true)
}
}
final class AppDelegate: NSObject, NSApplicationDelegate {
func applicationDidFinishLaunching(_ notification: Notification) {
NSApp.setActivationPolicy(.regular)
NSApp.activate()
}
}

Comment on lines +34 to +40
.windowIdealPlacement { content, context in
let idealSize = content.sizeThatFits(.unspecified)
let displayBounds = context.defaultDisplay.visibleRect
let zoomedSize = zoomToFit(idealSize, displayBounds: displayBounds)
let position = centeredPosition(for: zoomedSize, in: displayBounds)
return WindowPlacement(position, size: zoomedSize)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The WindowPlacement initializer requires the position: argument label. Omitting it will result in a compilation error.

Suggested change
.windowIdealPlacement { content, context in
let idealSize = content.sizeThatFits(.unspecified)
let displayBounds = context.defaultDisplay.visibleRect
let zoomedSize = zoomToFit(idealSize, displayBounds: displayBounds)
let position = centeredPosition(for: zoomedSize, in: displayBounds)
return WindowPlacement(position, size: zoomedSize)
}
.windowIdealPlacement { content, context in
let idealSize = content.sizeThatFits(.unspecified)
let displayBounds = context.defaultDisplay.visibleRect
let zoomedSize = zoomToFit(idealSize, displayBounds: displayBounds)
let position = centeredPosition(for: zoomedSize, in: displayBounds)
return WindowPlacement(position: position, size: zoomedSize)
}

Comment on lines +45 to +52
--logs|logs)
"$APP_BINARY" &
/usr/bin/log stream --info --style compact --predicate "process == \"$APP_NAME\""
;;
--telemetry|telemetry)
"$APP_BINARY" &
/usr/bin/log stream --info --style compact --predicate "subsystem == \"com.example.MyTool\""
;;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Running the CLI binary in the background (&) and then starting a foreground log stream will leave the background process running indefinitely when the user terminates the script (e.g., via Ctrl+C). To prevent process leaks, use a trap to clean up the background process on script exit.

Suggested change
--logs|logs)
"$APP_BINARY" &
/usr/bin/log stream --info --style compact --predicate "process == \"$APP_NAME\""
;;
--telemetry|telemetry)
"$APP_BINARY" &
/usr/bin/log stream --info --style compact --predicate "subsystem == \"com.example.MyTool\""
;;
--logs|logs)
"$APP_BINARY" &
PID=$!
trap 'kill "$PID" 2>/dev/null || true' EXIT
/usr/bin/log stream --info --style compact --predicate "process == \"$APP_NAME\""
;;
--telemetry|telemetry)
"$APP_BINARY" &
PID=$!
trap 'kill "$PID" 2>/dev/null || true' EXIT
/usr/bin/log stream --info --style compact --predicate "subsystem == \"com.example.MyTool\""
;;

Comment on lines +34 to +43
var body: some View {
TabView {
Form {
Toggle("Show Sidebar Icons", isOn: $showSidebarIcons)
}
.tabItem { Label("General", systemImage: "gearshape") }
}
.frame(width: 460, height: 260)
.scenePadding()
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Applying .scenePadding() to the TabView itself will pad the tab bar/header, which violates macOS design conventions and pushes the tab items away from the window edges. Instead, apply padding to the content inside the tab items (e.g., on the Form).

Suggested change
var body: some View {
TabView {
Form {
Toggle("Show Sidebar Icons", isOn: $showSidebarIcons)
}
.tabItem { Label("General", systemImage: "gearshape") }
}
.frame(width: 460, height: 260)
.scenePadding()
}
var body: some View {
TabView {
Form {
Toggle("Show Sidebar Icons", isOn: $showSidebarIcons)
}
.padding()
.tabItem { Label("General", systemImage: "gearshape") }
}
.frame(width: 460, height: 260)
}

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6aea5f91d2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


rm -rf "$APP_BUNDLE"
mkdir -p "$APP_MACOS"
cp "$BUILD_BINARY" "$APP_BINARY"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve SwiftPM resources in generated app bundles

When this template is used for a SwiftPM GUI app that declares resources, copying only the executable into Contents/MacOS drops SwiftPM's generated resource bundles (Bundle.module assets, localizations, etc.). The resulting .app can build and launch but then fail to load assets or crash on resource lookups, so the bootstrap script should also stage the product's resource bundles into Contents/Resources.

Useful? React with 👍 / 👎.

"capabilities": [
"Skill",
"Command",
"Agent"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add a loadable agent or drop the Agent capability

This manifest advertises an Agent, but the new plugin only adds agents/openai.yaml; the repo convention and docs tooling consume agent definitions as agents/*.md with YAML frontmatter, so installing/generating docs for this plugin exposes an Agent capability with no discoverable sub-agent. Either add a real .md agent definition or remove the agents entry and Agent capability until one exists.

Useful? React with 👍 / 👎.

Comment on lines +23 to +25
3. Run the right product.
- Use `swift run <product>` when an executable exists.
- If multiple executables exist, explain the default choice.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Route SwiftPM GUI apps through the bundle path

When the SwiftPM product is a SwiftUI/AppKit GUI executable, swift run <product> launches the raw binary instead of the .app bundle that the rest of this plugin says is required for Dock activation and bundle metadata. This skill is the package-first entry point, so it should either detect GUI products and delegate to the bundle-building build-run-debug flow or explicitly limit swift run to true CLI tools.

Useful? React with 👍 / 👎.

Comment on lines +126 to +127
--debug|debug)
lldb -- "$APP_BINARY"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Debug GUI apps in the same bundle context

For SwiftPM GUI apps, --debug runs lldb against the raw executable inside Contents/MacOS instead of launching the .app bundle and attaching to that process. Any issue that depends on bundle metadata, resources, activation policy, or entitlements will be debugged in a different environment than the normal run path, so this mode can mask or misdiagnose launch-only failures.

Useful? React with 👍 / 👎.

Comment on lines +4 to +5
icon_small: "./assets/build-macos-apps-small.svg"
icon_large: "./assets/app-icon.png"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include the icon assets referenced by agent metadata

This metadata points at two plugin-local icon files, but the commit does not add an assets/ directory or either referenced file. Any surface that reads this metadata will show broken icons or fail asset resolution for the new plugin, so either include the assets or remove these references until they exist.

Useful? React with 👍 / 👎.

- Tag directory-tree fences as text (MD040)
- Wrap three guideline lines over 400 chars (MD013)
- Collapse codex capabilities array (JSON_PRETTIER)
- Apply prettier formatting to 7 SKILL.md files (MARKDOWN_PRETTIER)

Co-Authored-By: duyetbot <duyetbot@users.noreply.github.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@duyet duyet merged commit 0395c17 into master Jun 13, 2026
5 of 6 checks passed
@duyet duyet deleted the feat/build-macos-apps-plugin branch June 13, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants