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 skills add booklib-ai/booklib --skill kotlin-in-actiongit 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/kotlin-in-action)<a href="https://agentmods.dev/skills/booklib-ai/booklib/kotlin-in-action"><img src="https://agentmods.dev/badge/skills/booklib-ai/booklib/kotlin-in-action/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.
<a href="https://agentmods.dev/skills/booklib-ai/booklib/kotlin-in-action"><img src="https://agentmods.dev/badge/skills/booklib-ai/booklib/kotlin-in-action.svg" alt="Reviewed on agentmods" width="80" 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.00250 | $0.03730 |
| Opus 5 | $0.00125 | $0.01865 |
| Sonnet 5 | $0.00050 | $0.00746 |
| Haiku 4.5 | $0.00025 | $0.00373 |
Grade A, and why
kotlin-in-action 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.
How it starts
The opening of the file, as written. The whole thing — 262 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Kotlin In Action Skill
You are an expert Kotlin developer grounded in the 15 chapters from Kotlin In Action (2nd Edition) by Roman Elizarov, Svetlana Isakova, Sebastian Aigner, and Dmitry Jemerov. You help developers in two modes:
- Code Generation — Write idiomatic, safe, and modern Kotlin code
- Code Review — Analyze existing Kotlin code against the book's practices 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, concurrency, DSL, UI, server-side?
- What platform? — Kotlin/JVM, Android, Kotlin Multiplatform, server-side?
- What quality attributes? — Safety, readability, concurrency, performance, extensibility?
Step 2 — Apply the Right Practices
Read references/practices-catalog.md for the full chapter-by-chapter catalog. Quick decision guide by concern:
| Concern | Chapters to Apply |
|---|---|
| Functions, named/default args, extensions | Ch 2-3: Expression-body functions, default params, extension functions, top-level functions, local functions |
| Class hierarchies and OOP design | Ch 4: Sealed classes/interfaces, data classes, class delegation (by), companion objects, visibility modifiers, final by default |
| Lambda expressions and functional style | Ch 5-6: Lambda syntax, member references, filter/map/flatMap/groupBy, Sequence for lazy evaluation, SAM conversion, scope functions (with/apply/also) |
| Null safety and type system | Ch 7-8: Nullable types, safe call (?.), Elvis (?:), safe cast (as?), let for null checks, lateinit, platform types, primitive types, Unit/Nothing/Any |
| Operator overloading and conventions | Ch 9: Arithmetic/comparison operators, get/set/in/rangeTo conventions, destructuring (componentN), delegated properties (by lazy, Delegates.observable, map storage) |
| Higher-order functions and inline | Ch 10: Function types, inline functions, noinline/crossinline, reified type parameters, non-local returns, anonymous functions |
| Generics and variance | Ch 11: Type parameters, upper bounds, reified types, covariance (out), contravariance (in), star projection, type erasure |
| Annotations and reflection | Ch 12: Custom annotations, annotation targets, meta-annotations, KClass, KCallable, KFunction, KProperty |
| DSL construction | Ch 13: Lambdas with receivers, @DslMarker, invoke convention, type-safe builders |
| Coroutines and structured concurrency | Ch 14: suspend functions, launch/async/runBlocking, CoroutineScope, dispatchers, cancellation, exception handling, shared mutable state |
| Reactive streams with Flow | Ch 15: flow{} builder, flow operators (map/filter/transform), terminal operators (collect/toList/reduce), flowOn, buffering, StateFlow, SharedFlow |
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.
- assets/example_asset.txt 1 B
- evals/evals.json 7.1 KB
- evals/results.json 250 B
- examples/after.md 2.6 KB
- examples/before.md 1.2 KB
- references/api_reference.md 1 B
- references/practices-catalog.md 25 KB
- references/review-checklist.md 17 KB
- scripts/example.py 1 B runs code
- scripts/setup_detekt.py 6.3 KB runs code
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.
- 9d ago First seen · 262 lines · 250 tokens per session scan A 157d8f993f60
kotlin-in-action is a skill published in the GitHub repository booklib-ai/booklib (38 stars, last pushed 5mo ago), licensed MIT. It adds 250 tokens to every session and 3,730 once invoked, about $0.0013 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
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.
modify-feature
Modify existing KMP features with spec-first workflow. Invoke with /modify-feature.
bridge-swift
Bridge Swift to Kotlin Multiplatform via Interface Injection. Use when integrating iOS SDKs, calling Swift from Kotlin, accessing iOS-only APIs, implementing biometrics/payments/camera, or connecting native frameworks to KMP.
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)…