swift-docc-comments
/swift-docc-comments
Use when writing or enhancing Swift documentation comments for DocC generation, adding inline doc comments to Swift source files, or when user asks for API documentation
- Author
- ivan-magda ↗
- Repository
- claude-superpowers ↗
- Licence
- MIT
- Last repository change
- 21.06.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 21.06.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when writing or enhancing Swift documentation comments for DocC generation, adding inline doc comments to Swift source files, or when user asks for API documentation
Original author description
Use when writing or enhancing Swift documentation comments for DocC generation, adding inline doc comments to Swift source files, or when user asks for API documentation
How it works
- Overview
- Structure
- Quick Reference
- Correct Format
- Common Mistakes
- Red Flags
- Generate Documentation
SKILL.md preview
--- name: swift-docc-comments description: Use when writing or enhancing Swift documentation comments for DocC generation, adding inline doc comments to Swift source files, or when user asks for API documentation allowed-tools: Read, Grep, Glob --- # Swift DocC Inline Comments ## Overview Swift DocC inline comments follow a specific structure. Section headers like `## Overview` and `## Topics` belong in `.docc` catalog files, NOT in inline source comments. ## Structure ```` /// Summary (first paragraph - one sentence) /// /// Discussion paragraphs (no header needed) /// /// ```swift /// // Code example /// ``` /// /// - Parameter name: Description /// - Returns: Description /// - Throws: Description /// - Note: Additional info ```` ## Quick Reference | Element | Format | Location | | ------------- | --------------------- | ------------------------- | | Summary | First paragraph | Inline | | Discussion | Subsequent paragraphs | Inline | | Code examples | Triple backticks | Inline, before parameters | | `## Overview` | Section header | `.docc` catalog ONLY | | `## Topics` | Section header | `.docc` catalog ONLY | | Symbol links | ` ``SymbolName`` ` | Both | ## Correct Format ````swift /// Brief summary in one sentence. /// /// Extended discussion explaining behavior, use cases, /// or important details. No header needed. /// /// ```swift /// let example = MyType() /// example.doSomething() /// ``` /// /// - Parameter value: What this parameter does. /// - Returns: What gets returned. /// - Note: Default value is `.default`. func method(value: Int) -> String ```` ## Common Mistakes | Wrong | Correct | | ---------------------- | --------------------------- | | `/// ## Overview` | Just write paragraphs | | `/// ## Topics` | Use `.docc` catalog file | | `/// ## Example` | Just use code block | | Parameters before code | Code block, then parameters | ## Red Flags These indicate wrong format: - `## Overview` in `///` comments - `## Topics` in `///` comments - `## Example` before code blocks - `- Parameter:` appearing before code examples ## Generate Documentation ```bash swift package generate-documentation ```
Versions
The database has no other skills named swift-docc-comments.
Database snapshot: 13.11.2026 · package version b1ef8a0fe920 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100swift-docc-github-pages
Use when setting up DocC documentation for a Swift package, deploying to GitHub Pages, or encountering "no such module 'UIKit'" during doc generation - 100swift-comments-that-matter
Review and write Swift comments and DocC symbol documentation. Use to preserve API contracts, explain non-obvious intent or lifecycle constraints, and remove redundant implementation commentary. Applies to comment-focused work, not general Swift refactoring or concurrency migrations. - 90author-swift-docc-docs
Author and review DocC content in Swift components, including symbol comments, articles, extension files, landing pages, topic groups, and light tutorial-aware review. Use when the user wants help writing or reviewing DocC content, checking DocC structure or content correctness,… - 100sosumi
Fetches Apple documentation as Markdown via Sosumi. Use for Apple API reference, Human Interface Guidelines, WWDC transcripts, and external Swift-DocC pages. - 95sosumi
Fetches Apple documentation as Markdown via Sosumi. Use for Apple API reference, Human Interface Guidelines, WWDC transcripts, and external Swift-DocC pages. - 86swift
Always use when creating and editing Swift files (*.swift)