Agent skill

Swift DocC Documentation

by adamayoung in adamayoung/TMDb

Writes and maintains DocC /// comments for the public API of the TMDb Swift package, following the project's summary patterns and comment structure.

Apache-2.0Auto-check passedDevelopment

Install Swift DocC Documentation

skills CLI
$ npx skills add adamayoung/TMDb --skill document-swift -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install adamayoung/TMDb document-swift --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/adamayoung/TMDb.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/document-swift .claude/skills/document-swift && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
document-swift
GitHub stars
178
Token cost
~2.6k tokens
SKILL.md length
999 words
Files
1
Skills in repo
18
Repo updated
First seen
Licence
Apache-2.0

At a glance

Writes and maintains DocC /// comments for the public API of the TMDb Swift package, following the project's summary patterns and comment structure.

  • Works in 9 steps: Every public declaration in the change… → Summary style matches the declaration… → Service methods carry the [TMDb API - …]… → …
  • Adding a public protocol, struct or method to the TMDb package
  • SKILL.md covers Scope, Summary patterns, Structure of a doc comment and Cross-references, plus 5 more sections
  • Calls make; reaches developer.themoviedb.org

What it does

The skill is the project's single source of truth for documentation style, applied while each declaration is written, because a public symbol without a /// comment is unfinished and make build-docs treats warnings as errors. It covers only public declarations, every one of them with no self-explanatory exceptions, uses /// rather than block comments and keeps lines to 100 characters.

Summaries follow patterns by kind: methods start with a verb phrase, properties are noun phrases, types read as a model representing a noun, protocols describe an interface for providing data from TMDb, and initializers create an object. Sections follow a fixed order of API link, Precondition, Parameters, Throws and Returns. Service protocol methods link to the TMDb API reference, parameters use the singular or plural list form, and methods with a page parameter note the allowed range. A documentation-writer agent follows the same rules for bulk sweeps.

When your agent uses it

  • Adding a public protocol, struct or method to the TMDb package
  • Fixing missing documentation warnings in the DocC build
  • Documenting a model's properties and initializers
  • Keeping the DocC catalog in sync after an API change

Example prompts

  • “Add a public method to fetch TV season details and document it in the TMDb DocC style.”
  • “Document every public property on the new movie credits model.”
  • “Go through this file and fix any public declarations missing /// comments.”

Requirements

  • The TMDb Swift package with its make build-docs target

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. Every public declaration in the change has a /// comment.
  2. Summary style matches the declaration kind; structure is summary → blank →
  3. Service methods carry the [TMDb API - …] link.
  4. Singular vs plural Parameter(s) is correct; order is Parameters → Throws →
  5. Lines ≤ 100 chars; image-path properties cross-reference the image-URL guide.
  6. Init parameter docs match property docs.
  7. DocC catalog (extension files, TMDb.md, TMDbClient.md) reflects the
  8. README.md overview is in sync — the Available Services table (row +
  9. Run make build-docs to confirm docs compile with no warnings, and

What it can do on your machine

Read from SKILL.md and the folder at commit a3f1311. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • make

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • developer.themoviedb.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Swift DocC Documentation loads about 2.6k tokens when it runs. Until then it costs about 123 tokens; SKILL.md has 999 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~123
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from adamayoung/TMDb at commit a3f1311, republished under its Apache-2.0 licence (© adamayoung). 999 words, ~2,575 tokens.

Download SKILL.mdSave it as .claude/skills/document-swift/SKILL.md (or your agent's skills folder).
name
document-swift
description
Write and maintain high-quality Swift DocC documentation for the TMDb package, following its established `///` conventions. Use when adding or changing any public declaration (protocol, class, struct, enum, actor, model, property, initializer, method, typealias) and when keeping the DocC catalog in sync. This is the single source of truth for the project's documentation style — applied inline as you write, and followed by the `documentation-writer` agent for bulk sweeps.

Document Swift (DocC conventions)

The canonical guide for documenting public API in the TMDb Swift package. Apply these conventions inline, in the same step you write the declaration — a public symbol without a /// comment is not finished (CLAUDE.md requires it, and make build-docs runs warnings-as-errors, so a miss breaks the build). For documenting many files at once, the documentation-writer agent follows these same rules in an isolated context.

Scope

  • Document only public declarations — skip internal, private, fileprivate, package.
  • Document every public declaration — no "self-explanatory" exceptions: protocols, classes, structs, enums (and cases where meaning isn't obvious), actors, typealiases, models, stored/computed properties, initializers, methods, subscripts. Custom init(from:) / encode(to:) in a public extension need comments too (a common miss).
  • Use /// style — never /** */.
  • 100-character line length; wrap continuation lines indented to align with the text above.

Summary patterns

The first /// line after the opening blank /// is the summary. Match the project's house style by declaration kind:

  • Method — verb phrase: "Returns the primary information about a movie." (not "Gets a movie.")
  • Property — noun phrase: "Movie identifier." (not "The ID of the movie.")
  • Type (struct/class) — "A model representing a [noun]."
  • Protocol — "Provides an interface for [verb]-ing [noun] from TMDb."
  • Enum — "A model representing a [noun]."; cases use concise noun phrases/adjectives.
  • Initializer — "Creates a [type description] object."

Be concise. Extra detail goes in later paragraphs only when it adds something the signature doesn't.

Structure of a doc comment

Opening ///, summary, blank ///, then sections in this order, each separated by a blank /// line: API link → Precondition → Parameters → Throws → Returns. No trailing whitespace on blank /// lines.

  • TMDb API link — every service protocol method includes, right after the summary: /// [TMDb API - <Category>: <Endpoint>](https://developer.themoviedb.org/reference/<slug>)
  • Parameters — - Parameter name: (singular) for exactly one parameter; - Parameters: with an indented list for two or more.
  • Precondition — methods with a page parameter add a /// - Precondition: line — e.g. page can be between 1 and 1000.
  • Throws — service methods use /// - Throws: TMDb error ``TMDbError``.; for Decodable inits, list the specific DecodingError cases.
  • Returns — describe what comes back, e.g. "Matching review."
Standard parameter descriptions (reuse verbatim)
  • language: "ISO 639-1 language code to display results in. Defaults to the client's configured default language."
  • country: "ISO 3166-1 country code."
  • page: "The page of results to return."
  • id parameters: "The identifier of the [entity]."
  • session: "The user's TMDb session."

Cross-references

  • Types: double backticks — TMDbError .
  • Articles/guides: <doc:/TMDb/ArticleName>.
  • Image paths: any URL? property representing an image path — posterPath, backdropPath, profilePath, logoPath, stillPath — must add, on its own paragraph: "To generate a full URL see doc:/TMDb/GeneratingImageURLs."

Canonical examples

Service method, multiple parameters (note Precondition + plural Parameters):

swift
///
/// Returns the user reviews for a movie.
///
/// [TMDb API - Movies: Reviews](https://developer.themoviedb.org/reference/movie-reviews)
///
/// - Precondition: `page` can be between `1` and `1000`.
///
/// - Parameters:
///    - movieID: The identifier of the movie.
///    - page: The page of results to return.
///    - language: ISO 639-1 language code to display results in.
///     Defaults to the client's configured default language.
///
/// - Throws: TMDb error ``TMDbError``.
///
/// - Returns: Reviews for the matching movie as a pageable list.
///
func reviews(
    forMovie movieID: Movie.ID,
    page: Int?,
    language: String?
) async throws -> ReviewPageableList

Service method, single parameter (singular Parameter):

swift
///
/// Returns a review's details.
///
/// [TMDb API - Reviews: Details](https://developer.themoviedb.org/reference/review-details)
///
/// - Parameter id: The identifier of the review.
///
/// - Throws: TMDb error ``TMDbError``.
///
/// - Returns: Matching review.
///
func details(forReview id: Review.ID) async throws -> Review

Model struct with an image path and a matching initializer:

swift
///
/// A model representing a movie.
///
public struct MovieListItem: Identifiable, Codable, Equatable, Hashable, Sendable {

    ///
    /// Movie identifier.
    ///
    public let id: Int

    ///
    /// Movie poster path.
    ///
    /// To generate a full URL see <doc:/TMDb/GeneratingImageURLs>.
    ///
    public let posterPath: URL?

    ///
    /// Creates a movie list item object.
    ///
    /// - Parameters:
    ///    - id: Movie identifier.
    ///    - posterPath: Movie poster path.
    ///
    public init(id: Int, posterPath: URL? = nil)
}

Initializer parameter descriptions must stay consistent with the corresponding property documentation.

Keep the DocC catalog in sync

When public API changes, update Sources/TMDb/TMDb.docc/ so make build-docs (warnings-as-errors) stays green. Catalog layout:

text
Sources/TMDb/TMDb.docc/
├── TMDb.md                      # Main catalog with topic sections
├── Extensions/
│   ├── TMDbClient.md            # TMDbClient properties
│   └── <ServiceName>Service.md  # Service method groupings
├── GettingStarted/
├── HowTos/
└── Resources/
  • New service → create Extensions/<ServiceName>Service.md; add the service and its return types to TMDb.md; add the property to TMDbClient.md.
  • New method on an existing service → add a reference under the right topic heading in the service's extension file, double-backtick with labels: reviews(forMovie:page:language:) .
  • New public model/type → add to the appropriate topic section in TMDb.md.
  • Renamed/removed API → update every affected catalog file.

Extension file shape:

markdown
# ``MovieService``

## Topics

### Reviews

- ``reviews(forMovie:page:language:)``
Show full SKILL.md (469 more words)Show less

Keep the README API overview in sync

README.md carries a human-facing overview that drifts out of date as the API grows — update it in the same change, then run make lint-markdown:

  • Available Services table (## Available Services) — one row per service, | **serviceName** | capability, capability, … |.
    • New service → add a row, and bump the service count in the **Comprehensive API Coverage** feature bullet so the number stays accurate.
    • New method/capability on an existing service → extend that service's row description if it adds a notable capability (e.g. add "watch providers" to the movies row). A new endpoint that's just a variant of an existing one does not always need a new word — judge whether a user scanning the table would miss it.
  • Features list (## Features) → add or amend a bullet when the change introduces a headline, user-visible capability (a new search mode, a new formatting conformance, etc.), not for routine endpoint additions.
  • Code examples (## Setup, ## Common Use Cases) → if the change alters a usage pattern shown in an example, update the example; these aren't compiled, so verify types, property names, and try/await by hand. Example blocks must show the swift-tools-version that matches Package.swift.
  • Requirements / Installation → only if platform support or swift-tools-version changed, or a new tool/dependency is required (bump Prerequisites).

Rule of thumb: the README is the at-a-glance map of the API — if a user reading only the Features list and the service table would now have a wrong or incomplete picture, fix it here. Skip churn for purely internal changes.

What NOT to do

  • Don't repeat what the signature already says, or use vague filler ("does something", "handles stuff").
  • Don't leave placeholders (/// ?, Array of...) — write complete descriptions.
  • Don't copy-paste carelessly: catch "movie" left in a Person doc, or Movie.ID where Person.ID is meant.
  • Don't reference SwiftUI/UIKit — this is a pure API-client library.
  • Don't add @available unless it matches the enclosing type's declaration.

Verify before finishing

  1. Every public declaration in the change has a /// comment.
  2. Summary style matches the declaration kind; structure is summary → blank → sections, no trailing whitespace.
  3. Service methods carry the [TMDb API - …] link.
  4. Singular vs plural Parameter(s) is correct; order is Parameters → Throws → Returns.
  5. Lines ≤ 100 chars; image-path properties cross-reference the image-URL guide.
  6. Init parameter docs match property docs.
  7. DocC catalog (extension files, TMDb.md, TMDbClient.md) reflects the current public API.
  8. README.md overview is in sync — the Available Services table (row + capability words), the service count in the Features bullet, the Features list for any headline capability, and any affected code examples.
  9. Run make build-docs to confirm docs compile with no warnings, and make lint-markdown if README.md (or any .md) changed.

For Apple API specifics (concurrency safety, availability, behaviour), look it up with the sosumi MCP tools rather than guessing. For documenting async/actor/ Sendable API, the swift-concurrency skill has the concurrency vocabulary.

© adamayoung, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/document-swift of adamayoung/TMDb.

Open the folder on GitHubat commit a3f1311

Compare with similar skills

Swift DocC Documentation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Swift DocC Documentation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Swift DocC Documentation this skilladamayoung/TMDb178—~2.6kAutomated safety check: PassApache-2.0
Generating Swift Package Docsjohnrogers/claude-swift-engineering231—~272Automated safety check: PassMIT
Swift Concurrencyhenrypldev/react-native-nitro-mlx1003 repos~3.1kAutomated safety check: PassMIT
Core Data ExpertAvdLee/Core-Data-Agent-Skill315—~1.2kAutomated safety check: PassMIT
Swift Concurrencynimblehq/ios-templates110—~1.7kAutomated safety check: PassMIT
Generate Dochyochan/react-native-nitro-sound961—~824Automated safety check: PassMIT

Similar skills

  • Generating Swift Package Docs

    johnrogers/claude-swift-engineering

    A skill your agent uses when encountering unfamiliar import statements, exploring dependency APIs, or when user asks "what's import X" or "what does X do".

    231 GitHub stars~272 tokensUpdated 8 mo ago
    DevelopmentAuto-check passed
  • Swift Concurrency

    henrypldev/react-native-nitro-mlx

    Diagnose Swift Concurrency issues, refactor callback-based code to async/await, and guide Swift 6 migration when working with tasks, actors, @MainActor, Sendable, data races, thread safety, or…

    100 GitHub starsUsed in 3 repos~3.1k tokens
    DevelopmentAuto-check passed
  • Core Data Expert

    AvdLee/Core-Data-Agent-Skill

    Expert Core Data guidance (iOS/macOS): stack setup, fetch requests & NSFetchedResultsController, saving/merge conflicts, threading & Swift Concurrency, batch operations & persistent history…

    315 GitHub stars~1.2k tokensUpdated 25 days ago
    DevelopmentAuto-check passed
  • Swift Concurrency

    nimblehq/ios-templates

    Write, review, or fix Swift 6 concurrency code using actors, Sendable, structured concurrency, and the strict data-race-safety model.

    110 GitHub stars~1.7k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Generate Doc

    hyochan/react-native-nitro-sound

    Create or update react-native-nitro-sound API documentation, examples, migration notes, FAQ entries, changelog or release notes, and compiled AI context.

    961 GitHub stars~824 tokensUpdated 9 days ago
    DevelopmentAuto-check passed
  • Image Visual Check

    jjjkkkjjj/Matft

    Procedure for adding tests for Matft's image processing (Matft.image., indexing or channel swapping on images, etc.), generating comparison images that put the result next to an OpenCV reference…

    147 GitHub stars~2.3k tokensUpdated 12 days ago
    DevelopmentAuto-check passed

More from adamayoung/TMDb

All 18 skills in this repo
  • Diagnoses a failing scheduled TMDb Integration run, re-runs transient failures, and fixes real API drift on its own branch with a PR, merging it only when told to.

    178 GitHub stars~2.7k tokensUpdated 5 days ago
    Auto-check passed
  • Drives an approved plan to completion test-first, deriving a Canon TDD test list, showing it before any code and stopping only when every item is written, passing and green.

    178 GitHub stars~4.5k tokensUpdated 5 days ago
    Auto-check passed
  • TMDb Backlog Triager

    adamayoung/TMDb

    Grooms the Backlog column of a GitHub project board by re-verifying each issue against current main, closing dead ones, promoting actionable ones to Ready and naming the decision the rest need.

    178 GitHub stars~5k tokensUpdated 5 days ago
    Auto-check passed
  • Canon TDD Workflow

    adamayoung/TMDb

    Has your agent build features and fix bugs in Canon TDD order: write a test list, then one failing test, make it pass, refactor, and repeat until the list is empty.

    178 GitHub stars~1.3k tokensUpdated 5 days ago
    Auto-check passed
  • Capture Knowledge

    adamayoung/TMDb

    Records non-obvious lessons from a finished task, such as gotchas, API quirks and design decisions, into a project's knowledge folder before a pull request opens.

    178 GitHub stars~2.3k tokensUpdated 5 days ago
    Auto-check passed
  • Cut Release

    adamayoung/TMDb

    Cut a new TMDb release — work out the next SemVer version from the evidence, do the pre-tag housekeeping a tag would otherwise freeze in place, draft release notes, then tag and publish the GitHub…

    178 GitHub stars~3k tokensUpdated 5 days ago
    Auto-check passed

Works with

Questions about Swift DocC Documentation

What does Swift DocC Documentation do?

Writes and maintains DocC /// comments for the public API of the TMDb Swift package, following the project's summary patterns and comment structure. The skill is the project's single source of truth for documentation style, applied while each declaration is written, because a public symbol without a /// comment is unfinished and make build-docs treats warnings as errors. It covers only public declarations, every one of them with no self-explanatory exceptions, uses /// rather than block comments and keeps lines to 100 characters.

When should I use Swift DocC Documentation?

Swift DocC Documentation fits situations like: adding a public protocol, struct or method to the TMDb package; fixing missing documentation warnings in the DocC build; documenting a model's properties and initializers; keeping the DocC catalog in sync after an API change.

How do I install Swift DocC Documentation in Claude Code?

Run `npx skills add adamayoung/TMDb --skill document-swift -a claude-code`. Or copy the skill folder (.claude/skills/document-swift in adamayoung/TMDb) into .claude/skills/document-swift in your project. Claude Code loads it when a task matches its description.

How do I install Swift DocC Documentation in Codex?

Run `npx skills add adamayoung/TMDb --skill document-swift -a codex`. Or copy the skill folder (.claude/skills/document-swift in adamayoung/TMDb) into .agents/skills/document-swift in your project. Codex loads it when a task matches its description.

Can I use Swift DocC Documentation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add adamayoung/TMDb --skill document-swift -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/document-swift, .gemini/skills/document-swift, .github/skills/document-swift and .opencode/skills/document-swift in your project.

What does Swift DocC Documentation need to run?

Going by SKILL.md and its folder, Swift DocC Documentation needs the command-line tools its instructions call (make). Our summary lists: The TMDb Swift package with its make build-docs target.

Does Swift DocC Documentation access the network?

SKILL.md names 1 domain. In commands or code: developer.themoviedb.org; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Swift DocC Documentation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Swift DocC Documentation use?

Swift DocC Documentation is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Swift DocC Documentation use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Swift DocC Documentation?

Skills that share tags, products or a category with Swift DocC Documentation: Generating Swift Package Docs (johnrogers/claude-swift-engineering, 231 stars), Swift Concurrency (henrypldev/react-native-nitro-mlx, 100 stars), Core Data Expert (AvdLee/Core-Data-Agent-Skill, 315 stars) and Swift Concurrency (nimblehq/ios-templates, 110 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Swift DocC Documentation?

adamayoung (a GitHub user) maintains it in adamayoung/TMDb, which has 178 GitHub stars. The repository holds 18 skills in this directory. The repository was last updated on October 3, 2026.

Source: adamayoung/TMDb on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.