关于 swift-docc
swift-docc 是为 Swift 框架和软件包编写 API 文档及交互式教程的参考技能,涵盖源代码注释、补充内容、排版和文档发布。
主要功能
- 01生成 API 参考文档
- 02创建分步交互式教程
- 03根据源代码注释编写符号文档
- 04添加文章、链接和代码片段
- 05排版并组织文档页面
适用场景
- 01编写 Swift 软件包的 API 文档
- 02为 Swift API 用户制作教程
- 03添加概念文章和代码示例
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ nonameplum/ agent-skills --skill swift-docc安装后在 Claude Code 中输入/swift-docc确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
adding-code-snippets-to-your-content.mdadding-images.mdadding-structure-to-your-documentation-pages.mdadding-supplemental-content-to-a-documentation-catalog.mdadding-tables-of-data.mdcustomizing-the-appearance-of-your-documentation-pages.mddistributing-documentation-to-other-developers.mddocumenting-a-swift-framework-or-package.mdformatting-your-documentation-content.mdlinking-to-symbols-and-other-content.mdother-formatting-options.mdAssets/table-align-center.svgtable-align-leading.svgtable-align-trailing.svgDocumenting API with different language representations/documenting-api-with-different-language-representations.mdReference Syntax/API Reference Syntax/api-reference-syntax.mdDisplayName.mdDocumentationExtension.mdMetadata.mdTitleHeading.mdReference Syntax/Shared Syntax/Comment.mdReference Syntax/Tutorials Syntax/building-an-interactive-tutorial.mdReference Syntax/Tutorials Syntax/Shared Directives/Image.mdIntro.mdtutorial-shared-directives.mdVideo.mdReference Syntax/Tutorials Syntax/Shared Directives/Chapter/Chapter.mdTutorialReference.mdReference Syntax/Tutorials Syntax/Top-Level Directives/Tutorial/Assessments/Assessments.mdReference Syntax/Tutorials Syntax/Top-Level Directives/Tutorial/Assessments/MultipleChoice/Choice/Choice.md详细介绍
docc
为你的 Swift 框架或软件包生成丰富的 API 参考文档和交互式教程。
文档结构
基础知识
- 记录 Swift 框架或软件包 (documenting-a-swift-framework-or-package.md):从源代码注释创建开发者文档,并添加包含代码片段的文章,
文档内容
- 在源文件中编写符号文档 (writing-symbol-documentation-in-your-source-files.md):为符号添加参考文档,说明如何使用这些符号。
- 向文档目录添加补充内容 (adding-supplemental-content-to-a-documentation-catalog.md):添加文章和扩展文件,以扩充源代码文档注释或提供辅助概念内容。
- 链接到符号和其他内容 (linking-to-symbols-and-other-content.md):使用链接实现页面间导航。
- 向内容添加代码片段 (adding-code-snippets-to-your-content.md):创建并添加代码片段,以说明并示范如何使用你的 API。
- 使用不同语言表示形式记录 API ([Documenting API with different language representations/documenting-api-with-different-language-representations.md](Documenting API with different language representations/documenting-api-with-different-language-representations.md)):为可从多种源语言调用的 API 创建文档。
结构与格式
- 设置文档内容的格式 (formatting-your-documentation-content.md):使用特殊的文本和列表格式与样式,改善内容的呈现效果。
- 添加数据表格 (adding-tables-of-data.md):将信息整理到行和列中。
- 其他格式选项 (other-formatting-options.md):通过添加特殊页面元素,改善内容的呈现效果和结构。
- 向内容添加图像 (adding-images.md):通过添加图像提升内容的视觉效果。
- 为文档页面添加结构 (adding-structure-to-your-documentation-pages.md):将符号整理到组和集合中,使其更容易查找。
- 自定义文档页面的外观 (customizing-the-appearance-of-your-documentation-pages.md):自定义文档网页的外观和风格。
分发
- 向其他开发者分发文档 (distributing-documentation-to-other-developers.md):将文档托管在 Web 服务器上以供分享。
文档类型
- API 文档 ([Reference Syntax/API Reference Syntax/api-reference-syntax.md](Reference Syntax/API Reference Syntax/api-reference-syntax.md)):通过根据代码注释和扩展文件创建的参考文档来介绍 API,也可以创建详细的文章和概念指南。
- 交互式教程 ([Reference Syntax/Tutorials Syntax/tutorial-syntax.md](Reference Syntax/Tutorials Syntax/tutorial-syntax.md)):通过循序渐进的交互式内容向开发者介绍你的 Swift API。
共享语法
使用说明
- 文档按由浅入深的顺序组织,涵盖入门内容到高级主题
- 从“简介”或“入门”部分开始
- 查阅特定指南以获取详细信息
许可证与归属
此技能包含从 DocC 文档格式转换而来的内容。
评论
支持 Markdown