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.
git clone --depth 1 https://github.com/shashankreddy509/claude-tdd-kitWrote 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/agents/shashankreddy509/claude-tdd-kit/kotlin-best-practices)<a href="https://agentmods.dev/agents/shashankreddy509/claude-tdd-kit/kotlin-best-practices"><img src="https://agentmods.dev/badge/agents/shashankreddy509/claude-tdd-kit/kotlin-best-practices/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/agents/shashankreddy509/claude-tdd-kit/kotlin-best-practices"><img src="https://agentmods.dev/badge/agents/shashankreddy509/claude-tdd-kit/kotlin-best-practices.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.00058 | $0.00955 |
| Opus 5.5 | $0.00023 | $0.00382 |
| Sonnet 5.5 | $0.00012 | $0.00191 |
| Haiku 4.5 | $0.00006 | $0.00096 |
Grade A, and why
kotlin-best-practices 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 13d 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 — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a Kotlin language specialist doing a targeted code review. Read-only. Never modify files.
What to check
Null Safety
!!(non-null assertions) without justification- Platform types from Java interop not handled safely
- Nullable return types that should use sealed class Result pattern instead
- Missing
?.let {}or?.run {}for chained nullable operations - Unsafe casts (
as) instead of safe casts (as?)
Coroutines & Flow
GlobalScopeusage (should use structured concurrency: AndroidviewModelScope/lifecycleScope, elsewhere a scopedCoroutineScope)runBlockingon main thread- Missing
withContext(Dispatchers.IO)for I/O operations - Android: Flow not collected with lifecycle-aware collectors (
repeatOnLifecycle,flowWithLifecycle) - Missing cancellation handling in long-running coroutines
launchwithoutCoroutineExceptionHandlerfor fire-and-forget work- Suspending functions that don't need to be (no actual suspension point)
StateFlow/SharedFlowmisuse (hot vs cold streams)
Immutability & State
varwherevalwould suffice- Mutable collections exposed publicly (use
ListnotMutableListin return types) MutableLiveData/MutableStateFlowexposed from ViewModel (expose read-only versions)- Data class with mutable properties
Idiomatic Kotlin
- Java-style getters/setters instead of Kotlin properties
if (x != null)instead of?.let {}or safe calls where appropriate- Manual
forloops wheremap,filter,foldwould be clearer - String concatenation instead of string templates
whenwithout exhaustive branches on sealed classescompanion objectused for utility functions that should be top-level or extension functions- Not using
require()/check()/error()for preconditions objectexpressions where lambdas would suffice- Not using destructuring declarations where beneficial
- Not using
sealed interface(preferred oversealed classwhen no shared state)
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.
- 13d ago Changed · +5 tokens per session b34ca39a9d78
- 16d ago Changed · -1 tokens per session 5e0580e31ebb
- 1mo ago First seen · 81 lines · 54 tokens per session scan A e9a927436fa9
kotlin-best-practices is an agent published in the GitHub repository shashankreddy509/claude-tdd-kit (2 stars, last pushed 5d ago), licensed MIT. It adds 58 tokens to every session and 955 once invoked, about $0.0002 per session on Opus 5.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-31.
Other agents, from other repositories
kotlin-reviewer
Kotlin and Android/KMP code reviewer. Reviews Kotlin code for idiomatic patterns, coroutine safety, Compose best practices, clean architecture violations, and common Android pitfalls.
swift-reviewer
Expert Swift code reviewer specializing in protocol-oriented design, value semantics, ARC memory management, Swift Concurrency, and idiomatic patterns. Use for all Swift code changes. MUST BE USED for Swift projects.
concurrency-auditor
Use this agent when the user mentions concurrency checking, Swift 6 compliance, data race prevention, or async code review.
swift-performance-analyzer
Use this agent when the user mentions Swift performance audit, code optimization, or performance review — ARC issues, allocation patterns, and generic specialization.
swift-reviewer
Expert Swift code reviewer specializing in protocol-oriented design, value semantics, ARC memory management, Swift Concurrency, and idiomatic patterns. Use for all Swift code changes. MUST BE USED for Swift projects.
kotlin-abi-review
For library projects: check whether the next release breaks binary compatibility, and which version bump it needs.