RIPDPI: Skill for Claude Code

.agents/skills/kotlin-test-patterns/SKILL.md

kotlin-test-patterns is a skill for Claude Code, Codex from po4yka/RIPDPI. It costs 59 tokens per session (2,868 once invoked), scanned A, original, BSD-3-Clause.

A collection of Kotlin test patterns for Android, Jetpack Compose, dependency injection, and coroutines. It covers fakes, dispatcher setup, event testing, screenshot comparisons, and contract checks.

In plain words
What is it for?
Use it when writing or repairing ViewModel, Compose UI, screenshot, serialization, service, and native-bridge tests in Kotlin.
Why use it?
It helps tests run with the correct Android or coroutine setup and distinguishes local unit tests from device-based integration tests. TDD, or test-driven development, is a separate workflow here.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is po4yka/RIPDPI's own configuration. It tells Claude Code and Codex how to work on RIPDPI itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything RIPDPI configures →

Reuse

Borrowing it

Nothing to install: this file belongs to po4yka/RIPDPI. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/po4yka/RIPDPI/main/.agents/skills/kotlin-test-patterns/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/po4yka/RIPDPI

Made for: Claude Code, Codex.

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-test-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/po4yka/ripdpi/kotlin-test-patterns/github.svg)](https://agentmods.dev/skills/po4yka/ripdpi/kotlin-test-patterns)
Your own site
<a href="https://agentmods.dev/skills/po4yka/ripdpi/kotlin-test-patterns"><img src="https://agentmods.dev/badge/skills/po4yka/ripdpi/kotlin-test-patterns/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-test-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/po4yka/ripdpi/kotlin-test-patterns"><img src="https://agentmods.dev/badge/skills/po4yka/ripdpi/kotlin-test-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,868 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.
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.00059 $0.02868
Opus 5.5 $0.00024 $0.01147
Sonnet 5.5 $0.00012 $0.00574
Haiku 4.5 $0.00006 $0.00287

Measured yesterday against content hash 425147790b58, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

kotlin-test-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 yesterday.

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.

.agents/skills/kotlin-test-patterns/SKILL.md · 290 lines

How it starts

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

Kotlin Test Patterns -- RIPDPI

1. Test Module Layout

Source set Runner Purpose
app/src/test/ Robolectric + JUnit 4 ViewModel, Compose UI, screenshot, pure logic
app/src/androidTest/ AndroidJUnitRunner + Hilt Instrumented integration, E2E service lifecycle
core/data/src/test/ JUnit 4 (no Android) Data model serialization, settings validation
core/engine/src/test/ JUnit 4 Native bridge fakes, golden contract telemetry
core/diagnostics/src/test/ Robolectric Scan pipeline, contract governance, archive export
core/service/src/test/ JUnit 4 VPN/proxy runtime coordination, policy resolution

Test deps bundle in gradle/libs.versions.toml: junit, kotlinx-coroutines-test, turbine, robolectric. Additional: androidx-compose-ui-test-junit4, roborazzi, hilt-android-testing.

2. MainDispatcherRule

Located at app/src/test/kotlin/com/poyka/ripdpi/util/MainDispatcherRule.kt. Calls Dispatchers.setMain(UnconfinedTestDispatcher()) in starting() and Dispatchers.resetMain() in finished(). Required in every ViewModel test:

@OptIn(ExperimentalCoroutinesApi::class)
@RunWith(RobolectricTestRunner::class)
class MainViewModelTest {
    @get:Rule val mainDispatcherRule = MainDispatcherRule()

    @Test
    fun `initialize is explicit and idempotent`() = runTest {
        val viewModel = createViewModel(initialize = false)
        val collector = backgroundScope.launch { viewModel.uiState.collect {} }
        advanceUntilIdle()
        viewModel.initialize()
        runCurrent()
        // assert...
        collector.cancel()
    }
}

3. ViewModel Testing Pattern

  1. Create fakes for all dependencies (see Section 6).
  2. Call createViewModel(...) or createDiagnosticsViewModel(...) factory.
  3. Launch a background collector: backgroundScope.launch { viewModel.uiState.collect {} }.
  4. Trigger actions, call advanceUntilIdle(), assert state.
  5. Cancel the collector.

Read the full file on GitHub · 290 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. yesterday First seen · 290 lines · 59 tokens per session scan A 425147790b58

Subscribe to this mod's changes

kotlin-test-patterns is a skill published in the GitHub repository po4yka/RIPDPI (85 stars, last pushed yesterday), licensed BSD-3-Clause. It adds 59 tokens to every session and 2,868 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-11-07.

Related

kotlin-test-patterns compared with skills from other repositories

kotlin-test-patterns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
kotlin-test-patternspo4yka/RIPDPISkill85yesterdayBSD-3-ClauseA59Claude Code, Codex
kotlin-testingalmasumdev/awesome-kotlin-android-agent-skillsSkill36mo agononeA41Claude Code, Codex
compose-animationschrisbanes/skillsSkill1.1k2d agoApache-2.0A64Claude Code
compose-focus-navigationchrisbanes/skillsSkill1.1k2d agoApache-2.0A41Claude Code
kotlin-androidericrisco/rsc-harnessSkill5293d agoMITA78Claude Code, Codex
using-chrisbanes-skillschrisbanes/skillsSkill1.1k2d agoApache-2.0A38Claude Code
kotlin-concurrency-and-flowchrisbanes/skillsSkill1.1k2d agoApache-2.0A60Claude Code