KDoc Documentation Writer

VerifiedSafe

Write concise KDoc documentation for Kotlin classes and functions, focusing on essential summaries without unnecessary metadata.

Sby Skills Guide Bot
DocumentationIntermediate
506/2/2026
Claude Code
#kdoc#kotlin#documentation#code-commenting

Recommended for

Our review

Generates concise KDoc documentation for Kotlin classes and functions, focusing on essential summaries and skipping trivial or obvious declarations.

Strengths

  • Enforces consistent minimal documentation style
  • Avoids clutter by skipping properties, private members, and getters/setters
  • Focuses on public API documentation only
  • Follows KDoc best practices with verb-first summaries

Limitations

  • Does not document private or internal functions, which may be needed in some projects
  • May not infer complex return value descriptions from function names alone
  • The decision to skip obvious functions is subjective
When to use it

When you need to quickly add standard KDoc to Kotlin files without extensive manual writing.

When not to use it

When you need comprehensive documentation including all parameters, exceptions, and versioning details.

Security analysis

Safe
Quality score85/100

The skill only reads and edits Kotlin files using safe tools (Read, Edit, Glob, Grep). It does not execute any code, network requests, or system commands. There is no risk of data exfiltration, destruction, or safety bypass.

No concerns found

Examples

Add KDoc to file
Add KDoc to the Kotlin file src/main/kotlin/com/example/GameManager.kt
Document class and methods
Write KDoc for the AuthService interface and its methods in AuthService.kt
Fix missing KDoc
Check if there are any undocumented public functions in the PlayerRepository.kt file and add KDoc to them

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