kotlin-rules

kotlin-rules is a skill for Claude Code from softspark/ai-toolkit. It costs 45 tokens per session (3,046 once invoked), scanned A, original, Apache-2.0.

A set of coding rules for Kotlin, a programming language used for Android apps, backend services, and other software.

In plain words
What is it for?
Use it when writing or reviewing Kotlin, Ktor, Jetpack Compose, coroutine, or Gradle Kotlin code.
Why use it?
It helps keep Kotlin code consistent and avoids common problems with null values, mutable data, naming, and unsafe assertions.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the ai-toolkit plugin — 115 skills, 44 agents, 14 hooks shipped together

Good fit Use it when writing or reviewing Kotlin, Ktor, Jetpack Compose, coroutine, or Gradle Kotlin code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/softspark/ai-toolkit/kotlin-rules
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add softspark/ai-toolkit --skill kotlin-rules
Clone the repo
git clone --depth 1 https://github.com/softspark/ai-toolkit

Made for: Claude Code.

Or install ai-toolkit, the plugin that ships this one along with the rest of its 115 skills, 44 agents, 14 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for kotlin-rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/softspark/ai-toolkit/kotlin-rules/github.svg)](https://agentmods.dev/skills/softspark/ai-toolkit/kotlin-rules)
Your own site
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/kotlin-rules"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/kotlin-rules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for kotlin-rules

Your own site · 80×15
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/kotlin-rules"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/kotlin-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,046 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.03046
Opus 5 $0.00023 $0.01523
Sonnet 5 $0.00009 $0.00609
Haiku 4.5 $0.00005 $0.00305

Measured 9d ago against content hash 5f5e4ec6cc70, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

kotlin-rules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

app/skills/kotlin-rules/SKILL.md · 272 lines

How it starts

The opening of the file, as written. The whole thing — 272 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Kotlin Rules

These rules come from app/rules/kotlin/ in ai-toolkit. They cover the project's standards for coding style, frameworks, patterns, security, and testing in Kotlin. Apply them when writing or reviewing Kotlin code.

Kotlin Coding Style

Naming

  • PascalCase: classes, interfaces, objects, type aliases, enum entries.
  • camelCase: functions, properties, local variables, parameters.
  • UPPER_SNAKE: compile-time constants (const val), top-level val constants.
  • Backing properties: prefix with _ (private val _items, val items: List<T>).
  • Package names: lowercase, no underscores (com.company.project.feature).

Null Safety

  • Use nullable types only when nullability is semantically meaningful.
  • Prefer ?.let { }, ?: (Elvis), and safe calls over !!.
  • Never use !! except in tests or when null is truly impossible.
  • Use requireNotNull() and require() for preconditions at public API boundaries.
  • Use checkNotNull() and check() for state assertions.

Data Classes

  • Use data class for DTOs, value objects, and state containers.
  • Use copy() for immutable updates. Avoid mutable var in data classes.
  • Use sealed class / sealed interface for restricted hierarchies.
  • Use value class (inline class) for type-safe wrappers with zero overhead.
  • Use object for singletons and namespace-like utility groupings.

Functions

  • Use expression body (= expr) for single-expression functions.
  • Use named arguments for functions with >2 parameters of the same type.
  • Use default parameter values instead of overloaded functions.
  • Use extension functions to add behavior without inheritance.
  • Use suspend functions for async operations, not callbacks.

Collections

  • Prefer listOf, mapOf, setOf (immutable) over mutableListOf.
  • Use collection operators: map, filter, groupBy, associate.
  • Use sequence {} for lazy evaluation on large collections.
  • Prefer firstOrNull() over first() for safe access.
  • Use destructuring: val (name, age) = user.

Read the full file on GitHub · 272 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 272 lines · 45 tokens per session scan A 5f5e4ec6cc70

Subscribe to this mod's changes

kotlin-rules is a skill published in the GitHub repository softspark/ai-toolkit (174 stars, last pushed 2d ago), licensed Apache-2.0. It adds 45 tokens to every session and 3,046 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

android-kotlin-advisor

Développement Android natif avec Kotlin et Jetpack Compose — architecture MVVM/MVI, UI Compose, Hilt, Room, Coroutines, Flow, tests, Gradle KTS, Play Store. Se déclenche avec "Android", "Kotlin", "Jetpack Compose", "Android Studio", "Gradle", "Room", "Hilt", "Coroutines", "Play Store". Also triggers on "Android with…

khalilbenaz/claude-skills-collection · 100 tokens

gradle-build-expert

Expert en configuration et optimisation Gradle pour Android Kotlin. Gère build.gradle, Kotlin DSL, dépendances, flavours, variants, performance, CI/CD et troubleshooting avancé. Se déclenche avec "gradle", "build error", "dépendance", "build config". Also triggers on "Gradle build", "Kotlin DSL build script", "speed…

khalilbenaz/claude-skills-collection · 83 tokens

kotlin-testing

Kotlin testing patterns with Kotest, MockK, coroutine testing, property-based testing, and Kover coverage. Follows TDD methodology with idiomatic Kotlin practices.

affaan-m/ECC · 38 tokens

swift

Swift development: concurrency patterns, async/await, actors, testing with XCTest and Swift Testing framework.

notque/vexjoy-agent · 22 tokens

swift-development

You MUST activate this skill when working on Swift projects.

sammcj/agentic-coding · 13 tokens

generators

Code generator skills that produce production-ready Swift code for common app components. Use when user wants to add logging, analytics, onboarding, review prompts, networking, authentication, paywalls, settings, persistence, error monitoring, CI/CD pipelines, localization, push notifications, deep linking, testing…

rshankras/claude-code-apple-skills · 176 tokens