macos-menubar-tuist-app — скилл для Claude Code: менюбар-приложения
Скилл для сборки и правки macOS-приложений в строке меню на Tuist и SwiftUI. Пригодится, когда нужно держать сеть, состояние и UI по разным слоям.
npx skills add Dimillian/Skills --skill macos-menubar-tuist-app -a claude-codeЧто делает macos-menubar-tuist-app
Скилл задаёт правила для менюбар-утилит: приложение остаётся menubar-only, если не сказано иначе, а LSUIElement ставится в true. Сетевые вызовы и разбор ответов не должны жить внутри SwiftUI-вью, переходы состояния — в store-слое вроде @Observable. Манифесты Tuist считаются источником правды, править сгенерированные артефакты Xcode вручную не стоит.
Файлы раскладываются по ролям: Project.swift для таргета и настроек, отдельные файлы под модели, клиент, store и вью меню со строками. Запуск идёт через run-menubar.sh и stop-menubar.sh. Скрипт запуска перезапускает уже работающий экземпляр и не открывает Xcode заодно; при генерации используется tuist generate --no-open, а сборка — TUIST_SKIP_UPDATE_CHECK=1 tuist xcodebuild build вместо голого xcodebuild.
Порядок работы такой: сначала проверить, что проектом владеет Tuist, потом пощупать бэкенд через curl — форму ответа, авторизацию, пагинацию. Если эндпоинт игнорирует limit/page, скилл советует тянуть весь список и обрезать его в store. Дальше слои собираются снизу вверх: модели, клиент, store, и только потом вью. tuist run на macOS-таргете часто не может разрешить destination — тогда канонический путь запуска это скрипты.
Какие задачи решает
- собрать менюбар-утилиту на Tuist без ручной правки сгенерированного проекта
- вынести сеть и разбор ответов из SwiftUI-вью в отдельные слои
- пережить изменение полей в API без падения декодинга
- починить запуск, когда
tuist runне находит macOS-таргет - проверить сборку и скрипты запуска после правок
Примеры запросов агенту
- собери менюбар-приложение на Tuist: модели, клиент, store и вью меню
- перепиши разбор ответа API так, чтобы лишние поля не ломали декодинг
- почини
run-menubar.sh, чтобы он перезапускал старый экземпляр и не открывал Xcode
Как установить macos-menubar-tuist-app
1Через Skills CLI (Vercel)
npx skills add Dimillian/Skills --skill macos-menubar-tuist-app -a claude-code2Вручную: положить файлы
~/.claude/skills/macos-menubar-tuist-app/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/macos-menubar-tuist-app/
1Через Skills CLI (Vercel)
npx skills add Dimillian/Skills --skill macos-menubar-tuist-app -a codex2Вручную: положить файлы
.agents/skills/macos-menubar-tuist-app/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add Dimillian/Skills --skill macos-menubar-tuist-app -a cursor2Вручную: положить файлы
.cursor/skills/macos-menubar-tuist-app/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install Dimillian/Skills macos-menubar-tuist-app2Вручную: положить файлы
.github/skills/macos-menubar-tuist-app/SKILL.md1Через Skills CLI (Vercel)
npx skills add Dimillian/Skills --skill macos-menubar-tuist-app -a gemini-cli2Командой платформы
gemini skills install https://github.com/Dimillian/Skills --path macos-menubar-tuist-appВручную: положить файлы
.devin/skills/macos-menubar-tuist-app/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add Dimillian/Skills --skill macos-menubar-tuist-app -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о macos-menubar-tuist-app
Как установить macos-menubar-tuist-app в Claude?
Выполните npx skills add Dimillian/Skills --skill macos-menubar-tuist-app -a claude-code. Скилл окажется в ~/.claude/skills/macos-menubar-tuist-app/SKILL.md.
Что делает macos-menubar-tuist-app?
Описывает сборку, рефакторинг и ревью менюбар-приложений на Tuist и SwiftUI: границы слоёв, форму файлов, скрипты запуска и проверки после правок.
Чем этот скилл отличается от обычной работы в Xcode?
Он держит Tuist-манифесты источником правды и не опирается на правку сгенерированных артефактов Xcode. Локальный запуск идёт через скрипты, а сборка — через tuist xcodebuild.
Исходный текст
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