ECC is a toolkit that organizes and improves how coding agents work through skills, memory, security checks, research practices, and related extensions. It is for developers using agents such as Claude Code, Codex, OpenCode, and Cursor.
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 affaan-m/ECC --skill kotlin-patternsgit clone --depth 1 https://github.com/affaan-m/ECCWrote 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/affaan-m/ecc/kotlin-patterns)<a href="https://agentmods.dev/skills/affaan-m/ecc/kotlin-patterns"><img src="https://agentmods.dev/badge/skills/affaan-m/ecc/kotlin-patterns.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.00037 | $0.04693 |
| Opus 5 | $0.00018 | $0.02346 |
| Sonnet 5 | $0.00007 | $0.00939 |
| Haiku 4.5 | $0.00004 | $0.00469 |
Grade A, and why
kotlin-patterns 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 3d 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.
Copies of this mod
8 near-identical copies found in the catalogue:
- kotlin-patterns — 100% identical, 0 lines differ
- kotlin-patterns — 100% identical, 2 lines differ
- kotlin-patterns — 100% identical, 0 lines differ
- kotlin-patterns — 97% identical, 3 lines differ
- kotlin-patterns — 97% identical, 2 lines differ
- kotlin-patterns — 97% identical, 5 lines differ
- kotlin-patterns — 97% identical, 5 lines differ
- kotlin-patterns — 97% identical, 3 lines differ
How it starts
The opening of the file, as written. The whole thing — 712 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Kotlin Development Patterns
Idiomatic Kotlin patterns and best practices for building robust, efficient, and maintainable applications.
When to Use
- Writing new Kotlin code
- Reviewing Kotlin code
- Refactoring existing Kotlin code
- Designing Kotlin modules or libraries
- Configuring Gradle Kotlin DSL builds
How It Works
This skill enforces idiomatic Kotlin conventions across seven key areas: null safety using the type system and safe-call operators, immutability via val and copy() on data classes, sealed classes and interfaces for exhaustive type hierarchies, structured concurrency with coroutines and Flow, extension functions for adding behaviour without inheritance, type-safe DSL builders using @DslMarker and lambda receivers, and Gradle Kotlin DSL for build configuration.
Examples
Null safety with Elvis operator:
fun getUserEmail(userId: String): String {
val user = userRepository.findById(userId)
return user?.email ?: "[email protected]"
}
Sealed class for exhaustive results:
sealed class Result<out T> {
data class Success<T>(val data: T) : Result<T>()
data class Failure(val error: AppError) : Result<Nothing>()
data object Loading : Result<Nothing>()
}
Structured concurrency with async/await:
suspend fun fetchUserWithPosts(userId: String): UserProfile =
coroutineScope {
val user = async { userService.getUser(userId) }
val posts = async { postService.getUserPosts(userId) }
UserProfile(user = user.await(), posts = posts.await())
}
Core Principles
1. Null Safety
Kotlin's type system distinguishes nullable and non-nullable types. Leverage it fully.
// Good: Use non-nullable types by default
fun getUser(id: String): User {
return userRepository.findById(id)
?: throw UserNotFoundException("User $id not found")
}
// Good: Safe calls and Elvis operator
fun getUserEmail(userId: String): String {
val user = userRepository.findById(userId)
return user?.email ?: "[email protected]"
}
// Bad: Force-unwrapping nullable types
fun getUserEmail(userId: String): String {
val user = userRepository.findById(userId)
return user!!.email // Throws NPE if null
}
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.
- 3d ago First seen · 712 lines · 37 tokens per session scan A b98d254f9f0c
kotlin-patterns is a skill published in the GitHub repository affaan-m/ECC (250,130 stars, last pushed yesterday), licensed MIT. It adds 37 tokens to every session and 4,693 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.
Other skills, from other repositories
codebase-architecture
Designs module contracts, deepens existing boundaries, and installs enforceable repository guardrails. Use when asked to "design the architecture", "simplify our modules", or "harden the repo". For one feature plan use planning; for diff cleanup use tidy; for tenancy use multi-tenant-architecture.
scaffold-cli
Scaffolds a TypeScript CLI and npm package with the house toolchain, dual tsdown outputs, CLI contracts, changesets, and publishing templates. Use when asked to "scaffold a CLI" or "start an npm package". For an existing package release use autoship; for existing API ergonomics use dx-audit.
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.
bitcoin-libraries-bdk
Bitcoin Dev Kit (BDK): high-level Rust wallet library. Descriptor-based wallets, multiple chain backends (Esplora, Electrum, RPC), PSBT, fee estimation, coin selection. Bindings to Swift / Kotlin / Python / Flutter. USE WHEN: building wallets in Rust or via BDK bindings, integrating descriptor wallets into apps.
bitcoin-libraries-bitcoinj
Java/Kotlin Bitcoin library. Long-standing (since 2011). Used in many JVM-based wallets.
bitcoin-libraries-bdk-jvm
Skill "bitcoin-libraries-bdk-jvm" from claude-dev-suite/claude-dev-suite, covering bdk-jvm / bdk-android, install, quick example (kotlin), bindings and use cases.