Skip to main content
skill CX Codex

macos-menubar-tuist-app — Claude Code skill for Tuist menubar apps

A skill for building and reviewing macOS menubar apps on Tuist and SwiftUI. Useful when networking, state and UI need to stay in separate layers.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Dimillian/Skills --skill macos-menubar-tuist-app -a claude-code
Open on GitHub

What macos-menubar-tuist-app does

The skill lays down rules for menubar utilities: the app stays menubar-only unless told otherwise, with LSUIElement set to true. Transport and decoding logic belongs outside SwiftUI views, and state transitions live in a store layer such as @Observable. Tuist manifests are the source of truth, so hand-editing generated Xcode artifacts is off the table.

Files get fixed roles: Project.swift for the target and settings, then separate files for models, client, store, and the menu and row views. Local runs go through run-menubar.sh and stop-menubar.sh. The run script restarts an existing instance before relaunching and does not pop Xcode open; generation uses tuist generate --no-open, and builds use TUIST_SKIP_UPDATE_CHECK=1 tuist xcodebuild build rather than raw xcodebuild.

Work order matters. Confirm Tuist owns the project, then probe the backend with curl — response shape, auth, pagination. If the endpoint ignores limit/page, the skill advises pulling the full list and trimming it in the store. Layers go bottom to top: models, client, store, views last. tuist run often fails to resolve a macOS destination, which is why the scripts are the canonical launch path.

What it helps with

  • build a menubar utility on Tuist without touching generated project files
  • move networking and decoding out of SwiftUI view bodies
  • survive API field changes without breaking model decoding
  • fix local launch when tuist run cannot resolve the macOS target
  • re-run build and script checks after edits

Example prompts for the agent

  • build a Tuist menubar app with models, client, store and menu views
  • rewrite the API decoding so extra fields don't break it
  • fix run-menubar.sh so it restarts the old instance and skips Xcode

How to install macos-menubar-tuist-app

1Skills CLI (Vercel)

npx skills add Dimillian/Skills --skill macos-menubar-tuist-app -a claude-code

2Manually: put the files in place

~/.claude/skills/macos-menubar-tuist-app/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/macos-menubar-tuist-app/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about macos-menubar-tuist-app

How do I install macos-menubar-tuist-app in Claude?

Run npx skills add Dimillian/Skills --skill macos-menubar-tuist-app -a claude-code. The skill lands in ~/.claude/skills/macos-menubar-tuist-app/SKILL.md.

What does macos-menubar-tuist-app do?

It covers building, refactoring and reviewing menubar apps on Tuist and SwiftUI: layer boundaries, file layout, launch scripts and the checks to run after edits.

How is this different from a plain Xcode workflow?

It treats Tuist manifests as the source of truth and avoids hand-edited generated Xcode artifacts. Local runs go through scripts, and builds go through tuist xcodebuild.

Source text

SKILL.md · MIT
---
name: macos-menubar-tuist-app
description: Build, refactor, or review macOS menubar apps that use Tuist and SwiftUI. Use when creating or maintaining LSUIElement menubar utilities, defining Tuist targets/manifests, implementing model-client-store-view architecture, adding script-based launch flows, or validating reliable local build/run behavior without Xcode-first workflows.
---

# macos-menubar-tuist-app

Build and maintain macOS menubar apps with a Tuist-first workflow and stable launch scripts. Preserve strict architecture boundaries so networking, state, and UI remain testable and predictable.

## Core Rules

- Keep the app menubar-only unless explicitly told otherwise. Use `LSUIElement = true` by default.
- Keep transport and decoding logic outside views. Do not call networking from SwiftUI view bodies.
- Keep state transitions in a store layer (`@Observable` or equivalent), not in row/view presentation code.
- Keep model decoding resilient to API drift: optional fields, safe fallbacks, and defensive parsing.
- Treat Tuist manifests as the source of truth. Do not rely on hand-edited generated Xcode artifacts.
- Prefer script-based launch for local iteration when `tuist run` is unreliable for macOS target/device resolution.
- Prefer `tuist xcodebuild build` over raw `xcodebuild` in local run scripts when building generated projects.

## Expected File Shape

Use this placement by default:

- `Project.swift`: app target, settings, resources, `Info.plist` keys
- `Sources/*Model*.swift`: API/domain models and decoding
- `Sources/*Client*.swift`: requests, response mapping, transport concerns
- `Sources/*Store*.swift`: observable state, refresh policy, filtering, caching
- `Sources/*Menu*View*.swift`: menu composition and top-level UI state
- `Sources/*Row*View*.swift`: row rendering and lightweight interactions
- `run-menubar.sh`: canonical local restart/build/launch path
- `stop-menubar.sh`: explicit stop helper when needed

## Workflow

1. Confirm Tuist ownership
- Verify `Tuist.swift` and `Project.swift` (or workspace manifests) exist.
- Read existing run scripts before changing launch behavior.

2. Probe backend behavior before coding assumptions
- Use `curl` to verify endpoint shape, auth requirements, and pagination behavior.
- If endpoint ignores `limit/page`, implement full-list handling with local trimming in the store.

3. Implement layers from bottom to top
- Define/adjust models first.
- Add or update client request/decoding logic.
- Update store refresh, filtering, and cache policy.
- Wire views last.

4. Keep app wiring minimal
- Keep app entry focused on scene/menu wiring and dependency injection.
- Avoid embedding business logic in `App` or menu scene declarations.

5. Standardize launch ergonomics
- Ensure run script restarts an existing instance before relaunching.
- Ensure run script does not open Xcode as a side effect.
- Use `tuist generate --no-open` when generation is required.
- When the run script builds the generated project, prefer `TUIST_SKIP_UPDATE_CHECK=1 tuist xcodebuild build ...` instead of invoking raw `xcodebuild` directly.

## Validation Matrix

Run validations after edits:

```bash
TUIST_SKIP_UPDATE_CHECK=1 tuist xcodebuild build -scheme <TargetName> -configuration Debug
```

If launch workflow changed:

```bash
./run-menubar.sh
```

If shell scripts changed:

```bash
bash -n run-menubar.sh
bash -n stop-menubar.sh
./run-menubar.sh
```

## Failure Patterns and Fix Direction

- `tuist run` cannot resolve the macOS destination:
Use run/stop scripts as canonical local run path.

- Menu UI is laggy or inconsistent after refresh:
Move derived state and filtering into the store; keep views render-only.

- API payload changes break decode:
Relax model decoding with optional fields and defaults, then surface missing data safely in UI.

- Feature asks for quick UI patch:
Trace root cause in model/client/store before changing row/menu presentation.

## Completion Checklist

- Preserve menubar-only behavior unless explicitly changed.
- Keep network and state logic out of SwiftUI view bodies.
- Keep Tuist manifests and run scripts aligned with actual build/run flow.
- Run the validation matrix for touched areas.
- Report concrete commands run and outcomes.

© Dimillian · MIT · Dimillian/Skills

Similar skills

Everything for Mobile →

From the same set11

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor