macos-menubar-tuist-app – skill Lập trình cho agent AI
Xây dựng, tái cấu trúc hoặc review ứng dụng menubar macOS bằng SwiftUI sử dụng Tuist.
Cài skill macos-menubar-tuist-app bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/macos-menubar-tuist-app-ff208.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /macos-menubar-tuist-app – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/macos-menubar-tuist-app-ff208.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $macos-menubar-tuist-app – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/macos-menubar-tuist-app-ff208.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /macos-menubar-tuist-app – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/macos-menubar-tuist-app-ff208.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /macos-menubar-tuist-app – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
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.
When to Use
- When working on LSUIElement menubar utilities built with Tuist and SwiftUI.
- When you need Tuist manifests, launch scripts, or architecture guidance for a menubar app.
Core Rules
- Keep the app menubar-only unless explicitly told otherwise. Use
LSUIElement = trueby default. - Keep transport and decoding logic outside views. Do not call networking from SwiftUI view bodies.
- Keep state transitions in a store layer (
@Observableor 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 runis unreliable for macOS target/device resolution. - Prefer
tuist xcodebuild buildover rawxcodebuildin local run scripts when building generated projects.
Expected File Shape
Use this placement by default:
Project.swift: app target, settings, resources,Info.plistkeysSources/*Model*.swift: API/domain models and decodingSources/*Client*.swift: requests, response mapping, transport concernsSources/*Store*.swift: observable state, refresh policy, filtering, cachingSources/*Menu*View*.swift: menu composition and top-level UI stateSources/*Row*View*.swift: row rendering and lightweight interactionsrun-menubar.sh: canonical local restart/build/launch pathstop-menubar.sh: explicit stop helper when needed
Workflow
1. Confirm Tuist ownership
- Verify
Tuist.swiftandProject.swift(or workspace manifests) exist. - Read existing run scripts before changing launch behavior.
2. Probe backend behavior before coding assumptions
- Use
curlto 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
Appor 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-openwhen generation is required. - When the run script builds the generated project, prefer
TUIST_SKIP_UPDATE_CHECK=1 tuist xcodebuild build ...instead of invoking rawxcodebuilddirectly.
Validation Matrix
Run validations after edits:
TUIST_SKIP_UPDATE_CHECK=1 tuist xcodebuild build -scheme <TargetName> -configuration DebugIf launch workflow changed:
./run-menubar.shIf shell scripts changed:
bash -n run-menubar.sh
bash -n stop-menubar.sh
./run-menubar.shFailure Patterns and Fix Direction
tuist runcannot 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.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Skill liên quan
- macos-screen-recorder – Trình ghi màn hình macOS thu màn hình chính CÙNG âm thanh hệ thống qua ScreenCaptureKit…
- mailtrap-testing-with-sandbox – Thu email đi trong Mailtrap Email Sandbox phục vụ phát triển, staging, CI, kiểm tra…
- maintain-codex-wiki – Duy trì wiki kỹ thuật ưu tiên review, có truy xuất nguồn gốc, truy vấn nhận biết trích…
- makepad-2-0-dsl – Hướng dẫn Makepad 2.0 về dsl; dùng khi xây dựng hoặc gỡ lỗi mã UI Makepad.
- makepad-2-0-events – Hướng dẫn Makepad 2.0 về events; dùng khi xây dựng hoặc gỡ lỗi mã UI Makepad.
- makepad-2-0-layout – Hướng dẫn Makepad 2.0 về layout; dùng khi xây dựng hoặc gỡ lỗi mã UI Makepad.
- makepad-2-0-widgets – Hướng dẫn Makepad 2.0 về widgets; dùng khi xây dựng hoặc gỡ lỗi mã UI Makepad.
- makepad-widgets – Chọn và kết hợp các widget Makepad, cấu hình thuộc tính và kiểu dáng, gỡ lỗi hành vi…