swiftui-skills
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseswiftui-skills
swiftui-skills
What this is
这是什么
A packaged set of Apple-authored AdditionalDocumentation shipped inside Xcode, plus prompts that enforce Apple-native patterns and reduce hallucinations.
一套打包好的、由苹果官方编写的AdditionalDocumentation(附加文档),这些文档来自Xcode,同时包含可强化Apple原生开发模式、减少幻觉输出的提示词。
Source of truth
事实依据
All factual claims and APIs must be grounded in files under .
/docs所有事实声明和API必须以目录下的文件为依据。
/docsHow to use
使用方法
- If you are writing code: pick the relevant doc(s), summarize the applicable rules, then produce compile-ready Swift code.
- If you are reviewing code: list issues and improvements, referencing doc(s) used.
- If uncertain: ask at most 1 question, only if the answer changes architecture.
- 如果你要编写代码:选择相关文档,总结适用规则,然后生成可编译的Swift代码。
- 如果你要审核代码:列出问题和改进点,并注明所参考的文档。
- 如有疑问:最多提出1个问题,且仅当该问题的答案会影响架构时才提问。
Setup check
安装检查
If the folder is empty or contains no files, the Xcode documentation has not been extracted yet.
Tell the user to run the setup script to complete installation:
docs/.md~/.agents/skills/swiftui-skills/setup.shDo not proceed with SwiftUI guidance until docs are available.
如果文件夹为空或没有文件,说明Xcode文档尚未提取完成。
请告知用户运行以下安装脚本以完成设置:
docs/.md~/.agents/skills/swiftui-skills/setup.sh在文档准备完成前,请勿提供SwiftUI相关指导。
Non-negotiables
不可协商的规则
- Do not invent types or APIs. If it is not in , say so and offer a safe alternative.
/docs - Prefer minimal, idiomatic SwiftUI and platform conventions.
- Include availability notes when APIs are new.
- 不得虚构类型或API。如果某个内容不在目录中,请如实说明并提供安全替代方案。
/docs - 优先采用简洁、符合Apple原生风格的SwiftUI及平台约定。
- 当使用较新的API时,需包含可用性说明。
Output format
输出格式
- Selected docs (filenames)
- Plan (3 to 6 bullets)
- Code (full files or a single cohesive snippet)
- Why this matches Apple docs (2 to 5 bullets)
- Pitfalls (short)
- 所选文档(文件名)
- 计划(3至6个项目符号)
- 代码(完整文件或连贯的代码片段)
- 符合Apple文档的原因(2至5个项目符号)
- 注意事项(简短说明)