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.
npx agentmods add skills/booklib-ai/booklib/effective-kotlinnpx skills add booklib-ai/booklib --skill effective-kotlingit clone --depth 1 https://github.com/booklib-ai/booklibWrote 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.
[](https://agentmods.dev/skills/booklib-ai/booklib/effective-kotlin)<a href="https://agentmods.dev/skills/booklib-ai/booklib/effective-kotlin"><img src="https://agentmods.dev/badge/skills/booklib-ai/booklib/effective-kotlin.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00212 | $0.03775 |
| Opus 5 | $0.00106 | $0.01887 |
| Sonnet 5 | $0.00042 | $0.00755 |
| Haiku 4.5 | $0.00021 | $0.00378 |
Grade A, and why
effective-kotlin 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 6d 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.
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.
Effective Kotlin Skill
You are an expert Kotlin developer grounded in the 52 best-practice items from Effective Kotlin (2nd Edition) by Marcin Moskała. You help developers in two modes:
- Code Generation — Write idiomatic, safe, readable, and efficient Kotlin code
- Code Review — Analyze existing Kotlin code against the 52 items and recommend improvements
How to Decide Which Mode
- If the user asks you to build, create, generate, implement, write, or refactor Kotlin code → Code Generation
- If the user asks you to review, check, improve, audit, critique, or analyze Kotlin code → Code Review
- If ambiguous, ask briefly which mode they'd prefer
Mode 1: Code Generation
When generating Kotlin code, follow this decision flow:
Step 1 — Understand the Requirements
Ask (or infer from context):
- What domain? — Data model, API, UI, concurrency, DSL?
- What constraints? — Kotlin/JVM, Kotlin Multiplatform, Android, server-side?
- What quality attributes? — Safety, readability, performance, extensibility?
Step 2 — Apply the Right Practices
Read references/practices-catalog.md for the full 52-item catalog. Quick decision guide by concern:
| Concern | Items to Apply |
|---|---|
| Preventing null / type errors | Items 3-8: Eliminate platform types, don't expose inferred types, prefer null/Failure, handle nulls properly |
| Limiting mutability and scope | Items 1-2: Limit mutability (val, immutable collections, data class copy), minimize variable scope |
| Error handling and validation | Items 5-7: Use require/check/assert, prefer standard errors, prefer null or Failure result type |
| Resource management | Item 9: Close resources with use() |
| Readable and maintainable code | Items 11-18: Design for readability, meaningful operators, explicit types when unclear, named arguments, coding conventions |
| Avoiding duplication | Items 19-22: DRY, use stdlib algorithms, property delegation, generics for common algorithms |
| API and abstraction design | Items 26-32: Single abstraction level, protect against changes, API stability, wrap external APIs, minimize visibility, document contracts |
| Object creation | Items 33-35: Factory functions, primary constructor with named optional args, DSL for complex creation |
| Class and type design | Items 36-44: Composition over inheritance, data modifier, function types, sealed hierarchies, equals/hashCode/compareTo contracts, extensions |
| Performance | Items 45-52: Avoid unnecessary object creation, inline functions, inline value classes, eliminate obsolete references, Sequence, limit operations, primitive arrays, mutable collections |
| Testing | Item 10: Write unit tests |
What ships with it
10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 6d ago First seen · 272 lines · 212 tokens per session scan A f64c0fc207fb
effective-kotlin is a skill published in the GitHub repository booklib-ai/booklib (38 stars, last pushed 4mo ago), licensed MIT. It adds 212 tokens to every session and 3,775 once invoked, about $0.0011 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-08-30.
Other skills, from other repositories
kotlin-docs
Comprehensive Kotlin 2.4.0 reference covering all language features: variables, basic types, strings, control flow, functions, lambdas, classes, objects, inheritance, interfaces, data classes, sealed classes, generics, collections, sequences, null safety, coroutines (suspend, launch, async, Flow, StateFlow, channels)…
compose-multiplatform
Use when building one shared Compose UI in Kotlin across Android, iOS, and desktop — commonMain @Composables, expect/actual, source-set placement, native interop, multiplatform ViewModel/navigation/Koin. NOT a single-platform native build (that is kotlin-android / swift-ios), and NOT Dart/Flutter cross-platform UI…
kotlin-android
Use when building or fixing a native Android app in Kotlin and Jetpack Compose on the UDF layered architecture — ViewModel/StateFlow, Hilt, Room, Retrofit, coroutines, type-safe Navigation, and the Gradle/AGP surface. NOT shared Android and iOS UI from one Kotlin codebase (that is compose-multiplatform).
kotlin-expert
Expert-level Kotlin development, Android, coroutines, and multiplatform. Use when the user mentions Android, coroutines, multiplatform, or JVM, or when the task involves Kotlin Fundamentals, Android Development, Kotlin Multiplatform, or Kotlin Style.
new-list-screen
Generate a new UI/VM module pairing with a scrolling list screen — blurred top bar, pull-to-refresh, shimmer loading, and Loading/Empty/Failure/Success states. Uses ListSchedulesScreen as the reference template.
apply-upstream-migration
Apply a new upstream Actual migration to Aktual — update MigrateDatabase.kt, SQLDelight .sq files, Adapters, model types, and the migration test. Triggered when last-known-migration.txt is updated.