关于 apple-docs-index
Apple 框架文档索引技能,列出多个框架的 API 与文档路径。开发者可浏览主题,并确定要进一步获取哪些详细页面。
主要功能
- 01多个 Apple 框架索引
- 02API 与主题检索
- 03文档路径查询
- 04获取详细文档的指引
适用场景
- 01浏览框架可用 API
- 02查找特定文档路径
- 03选择要获取的详细页面
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ prisma-labs-dev/ apple-skills --skill apple-docs-index安装后在 Claude Code 中输入/apple-docs-index确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
combine-index.mdhealthkit-index.mdswiftdata-index.mdxctest-index.mdxcuiautomation-index.md详细介绍
Apple 文档索引
此技能提供 Apple 框架文档的索引。可用于:
- 浏览框架中可用的 API
- 查找特定文档的路径
- 决定要下载哪些详细文档
可用索引
| 框架 | 文件 | 大小 | 主题 |
|---|---|---|---|
| SwiftUI | ../swiftui/swiftui-overview.md | 907KB | 视图、修饰符、导航、状态 |
| XCTest | xctest-index.md | 55KB | 测试、断言、期望 |
| XCUIAutomation | xcuiautomation-index.md | 58KB | UI 测试、元素、查询 |
| UIKit | ../uikit/uikit-overview.md | 1.8MB | 视图、控制器、控件、场景 |
| Core Animation | ../core-animation/core-animation-index.md | 80KB | CALayer、CAAnimation、CATransaction、图层子类 |
| HealthKit | healthkit-index.md | 312KB | 健康数据、锻炼、记录 |
| Combine | combine-index.md | 153KB | 发布者、订阅者、运算符 |
| SwiftData | swiftdata-index.md | 86KB | 模型、容器、查询 |
| Observation | observation-index.md | 3KB | @Observable 宏 |
使用方法
1. 浏览索引
# See what's in HealthKit
cat healthkit-index.md | head -100
# Search for specific topic
grep -i "workout" healthkit-index.md
grep -i "navigation" ../swiftui/swiftui-overview.md
2. 查找文档路径
索引文件列出了所有可用的文档页面。每个条目都会显示路径:
- [HKWorkout](/documentation/healthkit/hkworkout)
- [NavigationStack](/documentation/swiftui/navigationstack)
3. 获取更详细的文档
- 检查已安装的 Apple 技能中是否已有该详细页面。
- 使用技能名称、描述或
SKILL.md前置内容查找可能的技能目录,然后先在其中的本地.md文件中使用 grep 搜索。这比从互联网获取新文档更快,也更省上下文。 - 如果没有已安装的技能包含该页面,请使用相同路径访问
sosumi.aiMarkdown 镜像。
例如,/documentation/healthkit/hkworkout 对应 https://sosumi.ai/documentation/healthkit/hkworkout。
4. 浏览缺失的框架索引
如果本地索引不包含所需的框架,请使用该框架的 sosumi.ai 索引:
https://sosumi.ai/documentation/{framework}
例如,https://sosumi.ai/documentation/foundation 提供了一个 Markdown 索引,可供搜索 Foundation 路径。
如果 Markdown 镜像不可用,且你的环境能够解析 JSON,则可以使用 Apple 的公开 DocC 索引端点:
https://developer.apple.com/tutorials/data/index/{framework}
有用的路径树位于 interfaceLanguages.swift[0].children 下。
评论
支持 Markdown