kotlin-conventions

Enforce Kotlin coding conventions for Gradle plugin projects.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/ClankerGuru/opsx --skill kotlin-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-conventions
Source: https://github.com/ClankerGuru/opsx/tree/main/cli/src/main/resources/content/skills/kotlin-conventions
Command: npx skills add https://github.com/ClankerGuru/opsx --skill kotlin-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Kotlin conventions skill enforces project-specific Kotlin coding standards for the Gradle plugin codebase, preventing stylistic drift and ensuring consistent patterns across the repository.

Core Features & Use Cases

  • Enforces runCatching usage for error handling and discourages traditional try/catch patterns, improving reliability and readability.
  • Enforces no println or System.err and directs output to Gradle's logging API for consistent user-facing messages.
  • Prohibits wildcard imports and promotes explicit, strongly-typed Kotlin constructs to improve maintainability.
  • Recommends value-class style usage and consistent DSL and Gradle Kotlin DSL practices for plugin development.
  • Use Case: A large Gradle plugin project migrating from ad-hoc error handling to a consistent Kotlin convention suite.

Quick Start

Run the Kotlin conventions check on your Gradle plugin project to enforce the rules.

Frequently Asked Questions about kotlin-conventions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce Kotlin conventions in a Gradle plugin project?

You can enforce Kotlin conventions in a Gradle plugin project by applying static-analysis checks during development, code review, and CI pipelines to standardize style and error handling across modules.

What is the best way to standardize error handling in Kotlin Gradle plugins?

Standardizing error handling in Kotlin Gradle plugins is best achieved by enforcing runCatching usage and discouraging traditional try/catch patterns, which improves code reliability and readability across the repository.

How do I stop println and System.err usage in Kotlin codebases?

To stop println and System.err usage in Kotlin codebases, enforce coding rules that direct output to Gradle's logging API, ensuring consistent user-facing messages and standardized console output.

Does this Kotlin conventions check prohibit wildcard imports?

Yes, the Kotlin conventions check prohibits wildcard imports and promotes explicit, strongly-typed Kotlin constructs to improve maintainability and ensure consistent DSL practices across your project.

Can I use static analysis to enforce Gradle Kotlin DSL best practices during CI?

Yes, you can use static analysis to enforce Gradle Kotlin DSL best practices during CI pipelines, ensuring consistent patterns like value-class style usage and explicit typings across all modules.

When do I need to run Kotlin conventions checks on my codebase?

You need to run Kotlin conventions checks on your codebase when migrating from ad-hoc error handling to a consistent Kotlin convention suite or preventing stylistic drift in large Gradle plugin projects.