Agent skill

kdoc

Add KDoc documentation to Kotlin public API. Use whenever the user asks to document Kotlin code, add KDoc, generate API docs, mentions undocumented public declarations, or wants to improve existing documentation. Also trigger when the user says 'add docs', 'document this class/file/module', 'write KDoc', or asks about missing documentation in Kotlin code.

Stars 1,331
Forks 207

Install this agent skill to your Project

npx add-skill https://github.com/modelcontextprotocol/kotlin-sdk/tree/main/.claude/skills/kdoc

SKILL.md

KDoc Generator

Add KDoc comments to public Kotlin API declarations.

What to document

All public declarations (no explicit private/internal/protected):

  • Classes, interfaces, objects, sealed classes/interfaces
  • Functions, extension functions
  • Properties
  • Enum classes and entries
  • Type aliases, annotation classes

Include @Deprecated elements.

Context

Read the implementation, not just the signature, to write accurate descriptions. Understanding what the code actually does prevents superficial or misleading documentation.

KDoc format

Class/interface example:

kotlin
/**
 * Manages active client sessions and their lifecycle.
 *
 * Sessions are created on first connection and cleaned up
 * when the transport closes.
 *
 * @property maxSessions upper limit on concurrent sessions
 * @property timeout idle timeout before a session is evicted
 */

Function example:

kotlin
/**
 * Registers a new tool with the given handler.
 *
 * Example:
 * ```kotlin
 * server.addTool(
 *     name = "echo",
 *     description = "Echoes input back",
 * ) { request ->
 *     CallToolResult(content = listOf(TextContent("Echo: ${request.arguments}")))
 * }
 * ```
 *
 * @param name unique tool identifier
 * @param description human-readable tool description
 * @param handler suspend function invoked when the tool is called
 * @return the registered tool definition
 */

Rules

  • Summary: concise first sentence starting with a third-person verb ("Creates", "Returns", "Represents"). Expand to 2-3 sentences only when genuinely complex
  • @property in class-level KDoc for all public properties (never as individual KDoc on the property); @param for function parameters
  • @return for non-Unit return types
  • Example block: add for DSL builders, complex functions, extension functions with non-obvious usage. Skip for trivial one-liners and simple getters
  • DSL builders: always include an Example showing full usage with the receiver scope — this is critical for discoverability
  • KDoc links ([ClassName], [methodName]): only where it adds clear navigational value
  • No @throws — don't document exceptions
  • No suspend notes — coroutine nature is visible from the signature
  • Existing KDoc: rewrite if incomplete (missing @param/@return/@property) or low quality

Expand your agent's capabilities with these related and highly-rated skills.

modelcontextprotocol/kotlin-sdk

mcp-docs

Fetch live MCP specification and docs from modelcontextprotocol.io. Training data may be outdated — default to using this skill when the query touches MCP protocol in any way. Trigger for: implementing or debugging MCP features (sampling, elicitation, completion, tools, resources, prompts, transports); SEPs or spec requirements; MCP transport behavior (SSE, Streamable HTTP, reconnection, retry); authorization/OAuth; conformance test failures; capability negotiation; message schemas. Skip only for pure Kotlin, build system, or refactoring tasks with zero MCP protocol dependency. When in doubt, trigger.

1,331 207
Explore
modelcontextprotocol/ext-apps

convert-web-app

This skill should be used when the user asks to "add MCP App support to my web app", "turn my web app into a hybrid MCP App", "make my web page work as an MCP App too", "wrap my existing UI as an MCP App", "convert iframe embed to MCP App", "turn my SPA into an MCP App", or needs to add MCP App support to an existing web application while keeping it working standalone. Provides guidance for analyzing existing web apps and creating a hybrid web + MCP App with server-side tool and resource registration.

1,985 246
Explore
modelcontextprotocol/ext-apps

add-app-to-server

This skill should be used when the user asks to "add an app to my MCP server", "add UI to my MCP server", "add a view to my MCP tool", "enrich MCP tools with UI", "add interactive UI to existing server", "add MCP Apps to my server", or needs to add interactive UI capabilities to an existing MCP server that already has tools. Provides guidance for analyzing existing tools and adding MCP Apps UI resources.

1,985 246
Explore
modelcontextprotocol/ext-apps

migrate-oai-app

This skill should be used when the user asks to "migrate from OpenAI Apps SDK", "convert OpenAI App to MCP", "port from window.openai", "migrate from skybridge", "convert openai/outputTemplate", or needs guidance on converting OpenAI Apps SDK applications to MCP Apps SDK. Provides step-by-step migration guidance with API mapping tables.

1,985 246
Explore
modelcontextprotocol/ext-apps

create-mcp-app

This skill should be used when the user asks to "create an MCP App", "add a UI to an MCP tool", "build an interactive MCP View", "scaffold an MCP App", or needs guidance on MCP Apps SDK patterns, UI-resource registration, MCP App lifecycle, or host integration. Provides comprehensive guidance for building MCP Apps with interactive UIs.

1,985 246
Explore
modelcontextprotocol/modelcontextprotocol

search-mcp-github

Search MCP PRs, issues, and discussions across the modelcontextprotocol GitHub org

7,778 1,436
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results