AGENT SKILL

macos-menubar-tuist-app

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.

License 许可
MIT
最近更新
2026-11-13
Stars
★ 5
Forks
0

01 前言 Front Matter

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.

02 资源文件 2

03 SKILL.md 正文

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.
  1. 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.
  1. 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.
  1. 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.
  1. 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:

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

If launch workflow changed:

./run-menubar.sh

If shell scripts changed:

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.

04 同仓库更多 Skills

buidangminh23
buidangminh23/design-pro-max

icons-pro-max

A portable icon catalog and rendering guide for the current project: payment methods, QR codes, social/app brand marks, download badges, the lucide-react UI icon set, 145 tech-stack logos, 86 full-color AI provider marks, 516 Claude connector icons, and 25 Microsoft app logos. Gives the exact asset path, React component, canonical size, brand color, render recipe, and accessibility rule for each icon — plus an anti-slop checklist so an agent never redraws a logo, recolors a brand mark, distorts an aspect ratio, or re-inlines a duplicated icon. Use whenever adding, rendering, swapping, or auditing an icon anywhere in a website, app, or document.

★ 5
buidangminh23
buidangminh23/design-pro-max

design-spacing-rhythm

The most complete spacing & alignment skill for AI-generated UI and written documents. Reads the layout, sets three dials (SPACING_STEP / DENSITY / ALIGNMENT_RIGOR), derives ONE scale, and lets proximity carry meaning — establishing a spacing scale, vertical rhythm, optical alignment, whitespace hierarchy, responsive/fluid density, accessibility floors, component recipes, document & long-form (Word / Docs / PDF / Markdown) spacing, and an anti-slop checklist. Every rule is CONTEXTUAL: read the situation, then pull only what fits. Not a blanket "add more padding" pass.

★ 5
buidangminh23
buidangminh23/design-pro-max

apple

For Apple app UI and code (SwiftUI, Xcode, HIG) and scroll scenes. Use when a question or task needs HIG reviews, App Store Connect (app records, TestFlight, signing, notarizing, ad hoc, What's New, ASO, Apple Ads, Wall of Apps, screenshots), SwiftData, Swift 6, Swift Testing, Core Data, Xcode builds, disk space, Tuist apps or pinned or scrubbed web sections. Not for launch/preview videos, captioned screenshots, Play Store art, GSAP, web springs (apple-design) or Swift questions (write-swift).

★ 5
buidangminh23
buidangminh23/design-pro-max

xcode-disk-cleanup

Audit and safely clean Xcode-related developer storage on macOS. Use whenever a developer mentions low disk space, Xcode storage, DerivedData, simulator devices or runtimes, stale beta platforms in Xcode Settings, DeviceSupport, archives, dSYMs, CocoaPods caches, simulator dyld caches, project .build folders, downloaded Xcode DMGs/XIPs, duplicate Xcode installers, or old Xcode applications. Also use this skill proactively when you hit low storage during other work, such as a build, download, or install failing with an out-of-disk-space error. Always measure first, report recoverable GiB with evidence, and obtain explicit itemized approval before any mutation.

★ 5
buidangminh23
buidangminh23/design-pro-max

xcode-project-analyzer

Audit Xcode project configuration, build settings, scheme behavior, and script phases to find build-time improvements with explicit approval gates. Use when a developer wants project-level build analysis, slow incremental builds, guidance on target dependencies, build settings review, run script phase analysis, parallelization improvements, or module-map and DEFINES_MODULE configuration.

★ 5
buidangminh23
buidangminh23/design-pro-max

xcode-compilation-analyzer

Analyze Swift and mixed-language compile hotspots using build timing summaries and Swift frontend diagnostics, then produce a recommend-first source-level optimization plan. Use when a developer reports slow compilation, type-checking warnings, expensive clean-build compile phases, long CompileSwiftSources tasks, warn-long-function-bodies output, or wants to speed up Swift type checking.

★ 5