[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-0f5abb56-4bf4-4252-91bd-ce336d1d8e4f":3,"$fx590IyRYzVM7uJd1Ra7PolmGdGsURNkgXb5MUSY8Hl0":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"0f5abb56-4bf4-4252-91bd-ce336d1d8e4f","macos-menubar-tuist-app","构建、重构或审查使用 Tuist 的 SwiftUI macOS 菜单栏应用程序。","cat_coding_frontend","mod_coding","sickn33,coding","---\nname: macos-menubar-tuist-app\ndescription: Build, refactor, or review SwiftUI macOS menubar apps that use Tuist.\nrisk: safe\nsource: \"Dimillian\u002FSkills (MIT)\"\ndate_added: \"2026-03-25\"\n---\n\n# macos-menubar-tuist-app\n\nBuild 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.\n\n## When to Use\n- When working on LSUIElement menubar utilities built with Tuist and SwiftUI.\n- When you need Tuist manifests, launch scripts, or architecture guidance for a menubar app.\n\n## Core Rules\n\n- Keep the app menubar-only unless explicitly told otherwise. Use `LSUIElement = true` by default.\n- Keep transport and decoding logic outside views. Do not call networking from SwiftUI view bodies.\n- Keep state transitions in a store layer (`@Observable` or equivalent), not in row\u002Fview presentation code.\n- Keep model decoding resilient to API drift: optional fields, safe fallbacks, and defensive parsing.\n- Treat Tuist manifests as the source of truth. Do not rely on hand-edited generated Xcode artifacts.\n- Prefer script-based launch for local iteration when `tuist run` is unreliable for macOS target\u002Fdevice resolution.\n- Prefer `tuist xcodebuild build` over raw `xcodebuild` in local run scripts when building generated projects.\n\n## Expected File Shape\n\nUse this placement by default:\n\n- `Project.swift`: app target, settings, resources, `Info.plist` keys\n- `Sources\u002F*Model*.swift`: API\u002Fdomain models and decoding\n- `Sources\u002F*Client*.swift`: requests, response mapping, transport concerns\n- `Sources\u002F*Store*.swift`: observable state, refresh policy, filtering, caching\n- `Sources\u002F*Menu*View*.swift`: menu composition and top-level UI state\n- `Sources\u002F*Row*View*.swift`: row rendering and lightweight interactions\n- `run-menubar.sh`: canonical local restart\u002Fbuild\u002Flaunch path\n- `stop-menubar.sh`: explicit stop helper when needed\n\n## Workflow\n\n1. Confirm Tuist ownership\n- Verify `Tuist.swift` and `Project.swift` (or workspace manifests) exist.\n- Read existing run scripts before changing launch behavior.\n\n2. Probe backend behavior before coding assumptions\n- Use `curl` to verify endpoint shape, auth requirements, and pagination behavior.\n- If endpoint ignores `limit\u002Fpage`, implement full-list handling with local trimming in the store.\n\n3. Implement layers from bottom to top\n- Define\u002Fadjust models first.\n- Add or update client request\u002Fdecoding logic.\n- Update store refresh, filtering, and cache policy.\n- Wire views last.\n\n4. Keep app wiring minimal\n- Keep app entry focused on scene\u002Fmenu wiring and dependency injection.\n- Avoid embedding business logic in `App` or menu scene declarations.\n\n5. Standardize launch ergonomics\n- Ensure run script restarts an existing instance before relaunching.\n- Ensure run script does not open Xcode as a side effect.\n- Use `tuist generate --no-open` when generation is required.\n- When the run script builds the generated project, prefer `TUIST_SKIP_UPDATE_CHECK=1 tuist xcodebuild build ...` instead of invoking raw `xcodebuild` directly.\n\n## Validation Matrix\n\nRun validations after edits:\n\n```bash\nTUIST_SKIP_UPDATE_CHECK=1 tuist xcodebuild build -scheme \u003CTargetName> -configuration Debug\n```\n\nIf launch workflow changed:\n\n```bash\n.\u002Frun-menubar.sh\n```\n\nIf shell scripts changed:\n\n```bash\nbash -n run-menubar.sh\nbash -n stop-menubar.sh\n.\u002Frun-menubar.sh\n```\n\n## Failure Patterns and Fix Direction\n\n- `tuist run` cannot resolve the macOS destination:\nUse run\u002Fstop scripts as canonical local run path.\n\n- Menu UI is laggy or inconsistent after refresh:\nMove derived state and filtering into the store; keep views render-only.\n\n- API payload changes break decode:\nRelax model decoding with optional fields and defaults, then surface missing data safely in UI.\n\n- Feature asks for quick UI patch:\nTrace root cause in model\u002Fclient\u002Fstore before changing row\u002Fmenu presentation.\n\n## Completion Checklist\n\n- Preserve menubar-only behavior unless explicitly changed.\n- Keep network and state logic out of SwiftUI view bodies.\n- Keep Tuist manifests and run scripts aligned with actual build\u002Frun flow.\n- Run the validation matrix for touched areas.\n- Report concrete commands run and outcomes.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,190,893,"2026-05-16 13:27:23",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"编程开发","coding","mdi-code-braces","代码生成、调试、审查，提升开发效率",2,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"前端开发","frontend","mdi-language-html5","HTML\u002FCSS\u002FJavaScript\u002F框架相关",1,96,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"eada6331-c0ed-45a8-914c-5b1a799161b6","1.0.0","macos-menubar-tuist-app.zip",2525,"uploads\u002Fskills\u002F0f5abb56-4bf4-4252-91bd-ce336d1d8e4f\u002Fmacos-menubar-tuist-app.zip","67615d348dd91c8171a1357e0d2d59284740645adb3da3c0e08b1914dbfe14aa","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":4573},{\"path\":\"agents\u002Fopenai.yaml\",\"isDirectory\":false,\"size\":299}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]