KDoc Documentation Writer

VerifiedSafe

Writes concise KDoc documentation for Kotlin classes and functions, focusing on short summaries without metadata or variable documentation. Helps when adding KDoc to Kotlin files while skipping private or obvious members.

Sby Skills Guide Bot
DocumentationBeginner
1606/2/2026
Claude Code
#kdoc#kotlin#documentation

Recommended for

Our review

Automatically generates concise KDoc documentation for Kotlin classes and functions.

Strengths

  • Follows official KDoc conventions
  • Avoids redundancy by skipping properties and private members
  • Produces readable, consistent one-liner comments

Limitations

  • Does not document complex private functions
  • Does not generate docs for trivial parameters
  • May omit important @throws for public APIs
When to use it

When you need to quickly add consistent KDoc documentation to an existing Kotlin file.

When not to use it

If you expect exhaustive documentation covering all parameters, exceptions, and metadata.

Security analysis

Safe
Quality score92/100

The skill uses only Read, Edit, Glob, and Grep tools to read and document Kotlin files. It does not execute external commands, access networks, or perform any destructive operations. No security risks are present.

No concerns found

Examples

Document a Kotlin class and its methods
Add KDoc to the Kotlin file src/main/kotlin/com/example/GameManager.kt
Document only public functions
Write KDoc comments for all public functions in UserService.kt, skipping variables and private methods
Concise documentation for an interface
Add one-line KDoc to the AuthService interface and its abstract methods

name: kdoc description: Write concise KDoc documentation for Kotlin classes and functions. Use when user wants to add KDoc to Kotlin files. Focuses on short summaries without version info or variable docs. allowed-tools:

  • Read
  • Edit
  • Glob
  • Grep

KDoc Documentation Writer

Write short, concise KDoc documentation for Kotlin files focusing on class and function summaries only.

Rules

  1. Class/Interface/Object KDoc

    • Single sentence describing purpose
    • No @author, @version, @since, or other metadata
    • No @property for class properties
  2. Function KDoc

    • One-liner summary of what function does
    • @param only if parameter purpose isn't obvious from name
    • @return only if return value needs clarification
    • Skip @throws unless critical for API consumers
  3. DO NOT Document

    • Variables/properties (neither class nor local)
    • Private functions (unless complex logic)
    • Getters/setters
    • Obvious functions (e.g., fun getId(): String)
    • Companion object members
  4. Style

    • Start with verb (Returns, Creates, Handles, Processes)
    • No period at end of single-line KDoc
    • Max 80 chars per line
    • Use /** ... */ format

Examples

Class KDoc

/** Manages game session state and lifecycle */
class GameManager { ... }

/** Handles user authentication via OAuth and email */
interface AuthService { ... }

Function KDoc

/** Loads questions from remote API and caches locally */
suspend fun loadQuestions(): List<Question>

/** @param difficulty Filter questions by difficulty level */
fun getQuestionsByDifficulty(difficulty: Difficulty): List<Question>

/**
 * Validates answer and updates score
 * @return true if answer correct
 */
fun submitAnswer(questionId: String, answer: String): Boolean

Skip These

// NO KDoc needed
private fun calculateInternalScore(): Int
val currentScore: Int
fun getUsername(): String
companion object { const val TAG = "Game" }

Workflow

  1. Read target Kotlin file
  2. Identify public classes, interfaces, objects
  3. Identify public/internal functions needing docs
  4. Write minimal KDoc using Edit tool
  5. Skip variables, private members, obvious code
Related skills