安装
npx skillscat add munyon-canyon/monaco/ios-feature 通过 SkillsCat registry 安装。
技能简介
通过运行生成器脚本,为新的iOS移动屏幕生成Swift模型、视图、路由和测试文件的样板代码。
SKILL.md
iOS feature
Start from the generator, then swap the ping calls for the screen's operation. The rules are in iOS architecture. The recipe is Add a mobile feature. This page is only the generator.
Run from the repo root:
scripts/gen-mobile-feature.sh <Domain><Domain> is UpperCamelCase. The script refuses a name that is not, and it refuses a domain that already has a folder.
| File | What it is | Which tests run it |
|---|---|---|
packages/mobile-core/Sources/MonacoCore/<Domain>/<Domain>Model.swift |
@Observable model |
swift test |
packages/mobile-core/Tests/MonacoCoreTests/<Domain>ModelTests.swift |
Host tests | swift test |
apps/mobile/Monaco/Features/<Domain>/<Domain>View.swift |
SwiftUI binding | just build mobile |
apps/mobile/Monaco/Features/<Domain>/<Domain>Route.swift |
AppRoute for the screen |
just build mobile |
apps/mobile/Monaco/Features/<Domain>/<Domain>SampleHarness.swift |
SampleHarnessEntry subclass |
MonacoTests when a UI test launches it |
packages/mobile-core/Sources/MonacoAPI/Fixtures/<Domain>+Sample.swift |
DEBUG sample value | swift test |
The copy still calls postSystemPing and getSystemPing. Replace those with the screen's operation, then delete the ping-only assertions that no longer apply.