agentleFS
kelvinkosbabkelvinkosbab/KozBon/.claude/skills/swift-docc-pro/SKILL.md

swift-docc-pro

Skill5 starsChanged 11 days agoMITView on GitHub

Reviews and improves Swift documentation comments (DocC) for correctness, completeness, and clarity. Use when writing or reviewing public API documentation in Swift packages.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Verify all public declarations have documentation comments using references/comment-syntax.md.

    line 14
  2. Very specific:

    Check symbol linking syntax (Type) using references/symbol-linking.md.

    line 16
  3. Distinctive:

    If doing a partial review, load only the relevant reference files.

    line 20
  4. Very specific:

    Use triple-slash /// for declaration documentation, not / */ block comments.

    line 26
  5. Very specific:

    Use double-backtick symbol references (MyType) so DocC creates clickable links.

    line 29
  6. Very specific:

    Don't repeat the obvious — public init() doesn't need "Initializes the type." Add docs only when they convey useful information.

    line 31

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Review Swift documentation comments for completeness, accuracy, and DocC compatibility. Report only genuine problems - do not nitpick or invent issues.

Review process:

  1. Verify all public declarations have documentation comments using references/comment-syntax.md.
  2. Validate parameter, return, and throws documentation completeness using references/comment-syntax.md.
  3. Check symbol linking syntax (Type) using references/symbol-linking.md.
  4. Validate code example formatting using references/code-examples.md.
  5. Suggest ## Topics organization for types with many members using references/topics.md.

If doing a partial review, load only the relevant reference files.

Core Instructions

  • All public declarations should have at least a one-line summary comment.
  • Use triple-slash /// for declaration documentation, not /** */ block comments.
  • Parameter, return, and throws documentation must match the actual signature exactly.
  • Code examples in doc comments should be valid, compilable Swift.
  • Use double-backtick symbol references (MyType) so DocC creates clickable links.
  • Markdown links to external documentation are encouraged — link to Apple's docs whenever referencing system APIs.
  • Don't repeat the obvious — public init() doesn't need "Initializes the type." Add docs only when they convey useful information.

Output Format

Organize findings by file. For each issue:

  1. State the file and relevant line(s).
  2. Name the rule being violated.
  3. Show a brief before/after code fix.

Skip files with no issues. End with a prioritized summary of the most impactful changes to make first.

Example output:

Sources/Retry/Retry.swift

Line 23: Missing - Throws: documentation for throwing function.

// Before
/// Retries an async operation with the configured strategy.
/// - Parameter operation: The async work to retry.
/// - Returns: The successful result of the operation.
public func retry<T>(
    _ operation: () async throws -> T
) async throws -> T

// After
/// Retries an async operation with the configured strategy.
/// - Parameter operation: The async work to retry.
/// - Returns: The successful result of the operation.
/// - Throws: The last error thrown by `operation` if all retry attempts are exhausted.
public func retry<T>(
    _ operation: () async throws -> T
) async throws -> T

Line 45: Use double-backtick to link to symbol instead of single backtick.

// Before
/// See `BackoffStrategy` for available strategies.

// After
/// See ``BackoffStrategy`` for available strategies.

Summary

  1. Completeness (high): 4 throwing public functions in Sources/Retry/ are missing - Throws: documentation.
  2. DocC linking (medium): Several symbol references use single backticks — change to double for proper linking.

End of example.

References

  • references/comment-syntax.md — /// triple-slash syntax, - Parameter, - Returns, - Throws, - Note, - Warning.
  • references/symbol-linking.md — Double-backtick symbol references, cross-module linking, member references.
  • references/code-examples.md — Code blocks in doc comments, language hints, runnable examples.
  • references/topics.md — ## Topics sections, grouping related symbols, top-level overviews.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.