Agent Skillsaresbit/MateBot › macos-menubar-tuist-app

macos-menubar-tuist-app

GitHub

构建和维护基于 Tuist 和 SwiftUI 的 macOS 菜单栏应用,规范分层架构与脚本化工作流。

skills/macos-menubar-tuist-app/SKILL.md aresbit/MateBot

Trigger Scenarios

创建或重构 macOS 菜单栏应用 配置 Tuist 工程结构 实现模型-客户端-存储-视图分层

Install

npx skills add aresbit/MateBot --skill macos-menubar-tuist-app -g -y
More Options

Use without installing

npx skills use aresbit/MateBot@macos-menubar-tuist-app

指定 Agent (Claude Code)

npx skills add aresbit/MateBot --skill macos-menubar-tuist-app -a claude-code -g -y

安装 repo 全部 skill

npx skills add aresbit/MateBot --all -g -y

预览 repo 内 skill

npx skills add aresbit/MateBot --list

SKILL.md

Frontmatter
{
    "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.

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.

Validation Matrix

Run validations after edits:

TUIST_SKIP_UPDATE_CHECK=1 tuist build <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.

Version History

  • 2328a17 Current 2026-08-20 10:32

Same Skill Collection

matecode/SKILL.md
skills/3d-cad-skill/SKILL.md
skills/agent-browser/SKILL.md
skills/arkts-agent-skill/SKILL.md
skills/autoresearch-skill/SKILL.md
skills/baoyu-post-to-wechat/SKILL.md
skills/blogwatcher/SKILL.md
skills/c-skill/SKILL.md
skills/chrome-cdp/SKILL.md
skills/claudeception/.claude/skills/continuous-learning/SKILL.md
skills/claudeception/examples/nextjs-server-side-error-debugging/SKILL.md
skills/claudeception/examples/prisma-connection-pool-exhaustion/SKILL.md
skills/claudeception/examples/typescript-circular-dependency/SKILL.md
skills/claudeception/SKILL.md
skills/clawdhub/SKILL.md
skills/coding-agent/SKILL.md
skills/docx/SKILL.md
skills/ebook/book-architect/SKILL.md
skills/ebook/book-idea-validator/SKILL.md
skills/ebook/book-ideation/SKILL.md
skills/ebook/book-market-research/SKILL.md
skills/ebook/chapter-architect/SKILL.md
skills/elf-patcher/SKILL.md
skills/excalidraw-diagram-skill/SKILL.md
skills/frontend-slides/SKILL.md
skills/gemini/SKILL.md
skills/gifgrep/SKILL.md
skills/git-wt/SKILL.md
skills/github/SKILL.md
skills/harmonyos-code-review/SKILL.md
skills/harmonyos-linux-cli-dev/SKILL.md
skills/harmonyos-skills/skills/harmonyos-game-generator/SKILL.md
skills/harmonyos-skills/skills/harmonyos-test-cases/SKILL.md
skills/harmonyos-skills/skills/harmonyos-ui-automator/SKILL.md
skills/harmonyos-skills/skills/ohos-app-build-debug/SKILL.md
skills/hm-fetch-skill/SKILL.md
skills/hm-framework-skill/SKILL.md
skills/humanizer/SKILL.md
skills/ian-gemini-web/SKILL.md
skills/kernel-dev-skill/SKILL.md
skills/kimi/docx_SKILL.md
skills/kimi/pdf_SKILL.md
skills/kimi/SKILL.md
skills/kimi/webapp-building_SKILL.md
skills/lecture-skill/SKILL.md
skills/macos2linuxapp/SKILL.md
skills/matecode/SKILL.md
skills/medialibrary-ut-generator/SKILL.md
skills/mermaid-validator/SKILL.md

Metadata

Files
0
Version
2328a17
Hash
b978d37d
Indexed
2026-08-20 10:32

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 15:12
浙ICP备14020137号-1 $방문자$