ios-design by pproenca/dot-skills
npx skills add https://github.com/pproenca/dot-skills --skill ios-design一份构建者指南,用于在 SwiftUI 中实现 Apple 品质的 iOS 界面,其基础源自两本核心设计著作:
包含 8 个基于原则的类别下的 62 条规则。每条规则都指出了一个具体的反模式,将修复方案建立在指定的原则之上,并提供了正确的 iOS 26 / Swift 6.2 SwiftUI 实现。
本技能是构建与实现指南 —— 它教授如何使用 Apple 品质的模式从头开始构建新的 SwiftUI 界面。当与 ios-ui-refactor(审查/重构现有 UI)一同加载时,本技能涵盖了 ios-ui-refactor 后续审计的绿地实现。使用本技能来构建新屏幕;使用兄弟技能来评估和改进现有屏幕。
本技能中的所有指导均假设采用 clinic 模块化 MVVM-C 架构:
Domain 和 DesignSystem(绝不导入 Data,也绝不导入兄弟功能模块)DependencyContainer、具体协调器以及 Route Shell 的连线广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
Domain 保持纯 Swift,并定义模型以及仓库、*Coordinating、ErrorRouting 和 AppError 契约Data 拥有 SwiftData/网络/同步/重试/后台 I/O 并实现 Domain 协议在以下情况下参考这些指南:
| 优先级 | 类别 | 原则 | 影响 | 前缀 | 规则数量 |
|---|---|---|---|---|---|
| 1 | 像素中的同理心 | Kocienda "同理心" · Edson "设计以人为本" | 关键 | empathy- | 8 |
| 2 | 视觉系统 | Edson "系统思维" · Kocienda "收敛" | 关键 | system- | 8 |
| 3 | 工艺:状态即基础 | Kocienda "工艺" | 关键 | craft- | 7 |
| 4 | 创意组合 | Kocienda "创意选择" | 高 | compose- | 6 |
| 5 | 品味:正确的选择 | Kocienda "品味" · Edson "信念设计" | 高 | taste- | 8 |
| 6 | 导航即对话 | Edson "设计即对话" · Kocienda "演示" | 高 | converse- | 9 |
| 7 | 大声设计:布局 | Edson "大声设计" · Kocienda "交叉点" | 高 | layout- | 8 |
| 8 | 产品会说话 | Edson "产品即营销" · Kocienda "演示文化" | 中 | product- | 8 |
Kocienda:"同理心 —— 尝试从他人的角度看世界。" Edson:设计始于手持设备的人。
empathy-semantic-colors - 使用语义颜色,绝不使用硬编码值empathy-dark-mode - 从一开始就支持深色模式empathy-foreground-style - 使用 foregroundStyle 而非 foregroundColorempathy-safe-areas - 始终为内容考虑安全区域empathy-voiceover-labels - 为每个交互元素添加 VoiceOver 标签empathy-touch-targets - 确保最小触摸目标为 44x44 点empathy-reduce-motion - 始终提供减少动态效果的备选方案empathy-readable-width - 在 iPad 上将文本限制在可读宽度内Edson:"拉远视角以看清对象之间的关系。" Kocienda:收敛 —— 众多决策汇聚成一个连贯的整体。
system-typography - 使用系统排版样式,绝不使用固定尺寸system-visual-hierarchy - 通过尺寸、粗细和颜色建立清晰的视觉层次system-spacing-grid - 使用 4pt 基础单位进行所有间距设置system-material-backgrounds - 使用材质背景来增加深度和层次感system-sf-symbols - 使用 SF Symbols 保持图标一致性system-gradients - 应用渐变以增加视觉深度,而非装饰system-standard-margins - 始终如一地使用系统标准边距system-stack-config - 明确配置栈的对齐方式和间距Kocienda:"工艺 —— 运用技能以达到高质量的结果。"
craft-state-local - 使用 @State 处理视图本地的值类型craft-state-binding - 使用 @Binding 处理子视图的变更craft-state-environment - 使用 @Environment 处理应用范围内共享的数据craft-state-observable - 使用 @Observable 处理模型类craft-avoid-body-state - 绝不在视图 body 内部创建状态craft-minimize-scope - 最小化状态范围以减少重新渲染craft-state-bindable - 使用 @Bindable 处理 @Observable 绑定Kocienda:"创意选择 —— 伟大的软件是通过组合和重组构建的。"
compose-body-some-view - 从 body 返回 some View,绝不返回具体类型compose-custom-properties - 使用属性使视图可配置compose-modifier-order - 以正确的顺序应用视图修饰符compose-viewbuilder - 使用 @ViewBuilder 进行灵活的基于插槽的组合compose-prefer-value-types - 优先使用值类型作为视图数据compose-prefer-composition - 优先使用组合而非继承来实现视图复用Kocienda:"品味 —— 精炼的判断力,选择唯一正确解决方案的能力。" Edson:致力于一种方法并完善它。
taste-list-vs-lazyvstack - 为系统功能选择 List,为自定义布局选择 LazyVStacktaste-sheet-vs-fullscreen - 为任务选择 sheet,为沉浸式体验选择 fullScreenCovertaste-picker - 根据数据类型选择正确的选择器样式taste-grid-vs-lazygrid - 为对齐的数据选择 Grid,为可滚动的集合选择 LazyVGridtaste-button - 使用与操作重要性相匹配的按钮样式taste-textfield - 使用正确的键盘和内容类型配置文本输入taste-alerts - 仅对关键、阻塞性信息使用警告框taste-action-sheets - 使用确认对话框处理上下文相关的多选操作Edson:"设计是产品与人之间的对话。" Kocienda:演示作为关于界面是否清晰表达的对话。
converse-navigationstack - 使用 NavigationStack 实现程序化、类型安全的导航converse-tabview - 使用 TabView 组织应用部分以实现并行导航converse-sheet-item - 使用 item 绑定实现数据驱动的 sheet 呈现converse-dismiss - 使用环境 dismiss 关闭模态视图converse-toolbar - 将工具栏项放置在正确的语义位置converse-tab-bar - 使用标签栏进行顶级部分导航converse-nav-bar - 配置导航栏以传达上下文converse-hierarchy - 在编写代码前设计清晰的导航层次结构converse-search - 使用 searchable 修饰符集成搜索Edson:"大声设计 —— 不断原型设计,直到布局感觉是必然的。" Kocienda:技术与人文艺术的交叉点。
layout-stacks - 使用栈代替手动定位layout-spacer - 使用 Spacer 进行灵活的空间分布layout-frame-sizing - 使用 frame() 进行明确的尺寸约束layout-zstack - 使用 ZStack 进行有目的的层叠组合layout-grid - 使用 Grid 处理对齐的非滚动表格内容layout-lazy-grids - 使用 LazyVGrid 处理可滚动的多列布局layout-adaptive - 为不同的尺寸类别使用自适应布局layout-scroll-indicators - 为长滚动内容显示滚动指示器Edson:"产品本身就是营销。" Kocienda:每个动画和加载状态都经得起史蒂夫·乔布斯的审视。
product-transitions - 为出现的视图使用语义过渡product-loading-states - 显示诚实的加载状态,而非无限旋转器product-with-animation - 使用 withAnimation 实现明确的状态驱动动画product-matched-geometry - 使用 matchedGeometryEffect 实现上下文相关的原点过渡product-list-cells - 使用标准布局设计列表单元格product-content-unavailable - 使用 ContentUnavailableView 处理空状态和错误状态product-segmented - 使用分段控件处理可见、互斥的选项product-menus - 使用菜单处理次要操作,避免界面杂乱阅读单独的参考文件以获取详细解释和代码示例:
| 文件 | 描述 |
|---|---|
| references/_sections.md | 类别定义和原则基础 |
| assets/templates/_template.md | 新规则模板 |
| metadata.json | 版本和参考信息 |
每周安装次数
85
仓库
GitHub 星标数
86
首次出现
2026年2月8日
安全审计
安装于
codex80
gemini-cli77
github-copilot76
opencode76
kimi-cli74
claude-code74
A builder's guide for implementing Apple-quality iOS interfaces in SwiftUI, grounded in two foundational design texts:
Contains 62 rules across 8 principle-based categories. Each rule identifies a specific anti-pattern, grounds the fix in a named principle, and provides the correct iOS 26 / Swift 6.2 SwiftUI implementation.
This skill is the building and implementation guide — it teaches how to construct new SwiftUI interfaces from scratch using Apple-quality patterns. When loaded alongside ios-ui-refactor (reviewing/refactoring existing UI), this skill covers the greenfield implementation that ios-ui-refactor later audits. Use this skill for building new screens; use the sibling for evaluating and improving existing ones.
All guidance in this skill assumes the clinic modular MVVM-C architecture:
Domain + DesignSystem only (never Data, never sibling features)DependencyContainer, concrete coordinators, and Route Shell wiringDomain stays pure Swift and defines models plus repository, *Coordinating, ErrorRouting, and AppError contractsData owns SwiftData/network/sync/retry/background I/O and implements Domain protocolsReference these guidelines when:
| Priority | Category | Principle | Impact | Prefix | Rules |
|---|---|---|---|---|---|
| 1 | Empathy in Every Pixel | Kocienda "Empathy" · Edson "Design Is About People" | CRITICAL | empathy- | 8 |
| 2 | The Visual System | Edson "Systems Thinking" · Kocienda "Convergence" | CRITICAL | system- | 8 |
| 3 | Craft: State as Foundation | Kocienda "Craft" | CRITICAL | craft- |
Kocienda: "Empathy — trying to see the world from other people's perspectives." Edson: design begins with the person holding the device.
empathy-semantic-colors - Use semantic colors, never hard-coded valuesempathy-dark-mode - Support Dark Mode from day oneempathy-foreground-style - Use foregroundStyle over foregroundColorempathy-safe-areas - Always respect safe areas for contentempathy-voiceover-labels - Add VoiceOver labels to every interactive elementEdson: "Zoom out to see relationships between objects." Kocienda: convergence — many decisions narrowing toward one coherent whole.
system-typography - Use system typography styles, never fixed sizessystem-visual-hierarchy - Establish clear visual hierarchy through size, weight, and colorsystem-spacing-grid - Use a 4pt base unit for all spacingsystem-material-backgrounds - Use material backgrounds for depth and layeringsystem-sf-symbols - Use SF Symbols for consistent iconographyKocienda: "Craft — applying skill to achieve a high-quality result."
craft-state-local - Use @State for view-local value typescraft-state-binding - Use @Binding for child view mutationscraft-state-environment - Use @Environment for shared app-wide datacraft-state-observable - Use @Observable for model classescraft-avoid-body-state - Never create state inside the view bodyKocienda: "Creative selection — great software is built through composition and recombination."
compose-body-some-view - Return some View from body, never concrete typescompose-custom-properties - Use properties to make views configurablecompose-modifier-order - Apply view modifiers in the correct ordercompose-viewbuilder - Use @ViewBuilder for flexible slot-based compositioncompose-prefer-value-types - Prefer value types for view dataKocienda: "Taste — refined judgment, the ability to choose the one right solution." Edson: commit to one approach and perfect it.
taste-list-vs-lazyvstack - Choose List for system features, LazyVStack for custom layoutstaste-sheet-vs-fullscreen - Choose sheet for tasks, fullScreenCover for immersiontaste-picker - Choose the right picker style for the data typetaste-grid-vs-lazygrid - Choose Grid for aligned data, LazyVGrid for scrollable collectionstaste-button - Use button styles that match the action's importanceEdson: "Design is a conversation between the product and the person." Kocienda: demos as conversations about whether the interface speaks clearly.
converse-navigationstack - Use NavigationStack for programmatic, type-safe navigationconverse-tabview - Organize app sections with TabView for parallel navigationconverse-sheet-item - Use item binding for data-driven sheet presentationconverse-dismiss - Use environment dismiss for modal closureconverse-toolbar - Place toolbar items in the correct semantic positionsEdson: "Design Out Loud — prototype relentlessly until layout feels inevitable." Kocienda: the intersection of technology and liberal arts.
layout-stacks - Use stacks instead of manual positioninglayout-spacer - Use Spacer for flexible space distributionlayout-frame-sizing - Use frame() for explicit size constraintslayout-zstack - Use ZStack for purposeful layered compositionlayout-grid - Use Grid for aligned non-scrolling tabular contentlayout-lazy-grids - Use LazyVGrid for scrollable multi-column layoutsEdson: "The product itself is the marketing." Kocienda: every animation and loading state built to survive Steve Jobs' scrutiny.
product-transitions - Use semantic transitions for appearing viewsproduct-loading-states - Show honest loading states, not indefinite spinnersproduct-with-animation - Use withAnimation for explicit state-driven animationproduct-matched-geometry - Use matchedGeometryEffect for contextual origin transitionsproduct-list-cells - Design list cells with standard layoutsRead individual reference files for detailed explanations and code examples:
| File | Description |
|---|---|
| references/_sections.md | Category definitions and principle grounding |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |
Weekly Installs
85
Repository
GitHub Stars
86
First Seen
Feb 8, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex80
gemini-cli77
github-copilot76
opencode76
kimi-cli74
claude-code74
Flutter布局指南:构建响应式UI的约束规则与自适应设计模式
1,200 周安装
WordPress性能优化最佳实践指南:34条规则提升网站速度与SEO排名
367 周安装
SvelteKit 项目结构详解:文件命名、路由布局与错误处理最佳实践
368 周安装
产品战略画布:9步制定完整产品战略,含模板与实例 | 产品管理工具
373 周安装
React Native 升级指南:使用 upgrade-react-native 技能轻松升级项目版本
367 周安装
Notion知识捕获工具 - 将对话笔记自动转化为结构化Notion页面 | 知识管理自动化
368 周安装
PyTorch PR 代码审查技能 - 自动化代码质量、测试与安全漏洞检查
390 周安装
| 7 |
| 4 | Creative Composition | Kocienda "Creative Selection" | HIGH | compose- | 6 |
| 5 | Taste: The Right Choice | Kocienda "Taste" · Edson "Design with Conviction" | HIGH | taste- | 8 |
| 6 | Navigation as Conversation | Edson "Design Is a Conversation" · Kocienda "The Demo" | HIGH | converse- | 9 |
| 7 | Design Out Loud: Layout | Edson "Design Out Loud" · Kocienda "Intersection" | HIGH | layout- | 8 |
| 8 | The Product Speaks | Edson "Product Is the Marketing" · Kocienda "Demo Culture" | MEDIUM | product- | 8 |
empathy-touch-targetsempathy-reduce-motion - Always provide reduce motion fallbackempathy-readable-width - Constrain text to readable width on iPadsystem-gradientssystem-standard-margins - Use system standard margins consistentlysystem-stack-config - Configure stack alignment and spacing explicitlycraft-minimize-scopecraft-state-bindable - Use @Bindable for @Observable bindingscompose-prefer-compositiontaste-textfieldtaste-alerts - Use alerts only for critical, blocking informationtaste-action-sheets - Use confirmation dialogs for contextual multi-choice actionsconverse-tab-barconverse-nav-bar - Configure navigation bar to communicate contextconverse-hierarchy - Design clear navigation hierarchy before writing codeconverse-search - Integrate search with the searchable modifierlayout-adaptive - Use adaptive layouts for different size classeslayout-scroll-indicators - Show scroll indicators for long scrollable contentproduct-content-unavailableproduct-segmented - Use segmented controls for visible, mutually exclusive optionsproduct-menus - Use menus for secondary actions without cluttering the interface