mcpField
A
apple-docs-index

apple-docs-index

github.com/prisma-labs-dev开发349789 次安装5 周前更新
代码仓库

关于 apple-docs-index

Apple 框架文档索引技能,列出多个框架的 API 与文档路径。开发者可浏览主题,并确定要进一步获取哪些详细页面。

主要功能

  1. 01多个 Apple 框架索引
  2. 02API 与主题检索
  3. 03文档路径查询
  4. 04获取详细文档的指引

适用场景

  1. 01浏览框架可用 API
  2. 02查找特定文档路径
  3. 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.md
healthkit-index.md
swiftdata-index.md
xctest-index.md
xcuiautomation-index.md

详细介绍

Apple 文档索引

此技能提供 Apple 框架文档的索引。可用于:

  • 浏览框架中可用的 API
  • 查找特定文档的路径
  • 决定要下载哪些详细文档

可用索引

框架文件大小主题
SwiftUI../swiftui/swiftui-overview.md907KB视图、修饰符、导航、状态
XCTestxctest-index.md55KB测试、断言、期望
XCUIAutomationxcuiautomation-index.md58KBUI 测试、元素、查询
UIKit../uikit/uikit-overview.md1.8MB视图、控制器、控件、场景
Core Animation../core-animation/core-animation-index.md80KBCALayer、CAAnimation、CATransaction、图层子类
HealthKithealthkit-index.md312KB健康数据、锻炼、记录
Combinecombine-index.md153KB发布者、订阅者、运算符
SwiftDataswiftdata-index.md86KB模型、容器、查询
Observationobservation-index.md3KB@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. 获取更详细的文档
  1. 检查已安装的 Apple 技能中是否已有该详细页面。
  2. 使用技能名称、描述或 SKILL.md 前置内容查找可能的技能目录,然后先在其中的本地 .md 文件中使用 grep 搜索。这比从互联网获取新文档更快,也更省上下文。
  3. 如果没有已安装的技能包含该页面,请使用相同路径访问 sosumi.ai Markdown 镜像。

例如,/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