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/skydoves/android-testing-skills/mocking-with-mockknpx skills add skydoves/android-testing-skills --skill mocking-with-mockkgit clone --depth 1 https://github.com/skydoves/android-testing-skillsWrote 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/skydoves/android-testing-skills/mocking-with-mockk)<a href="https://agentmods.dev/skills/skydoves/android-testing-skills/mocking-with-mockk"><img src="https://agentmods.dev/badge/skills/skydoves/android-testing-skills/mocking-with-mockk.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.00261 | $0.04247 |
| Opus 5 | $0.00130 | $0.02124 |
| Sonnet 5 | $0.00052 | $0.00849 |
| Haiku 4.5 | $0.00026 | $0.00425 |
Grade A, and why
mocking-with-mockk 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 — 316 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Mocking with MockK — The Kotlin-First Mocking Stack
MockK is the Kotlin-first alternative to Mockito. Its headline wins are native suspend support (coEvery / coVerify with no runBlocking dance), first-class singleton / object / static / constructor mocking, and Kotlin-native syntax (every { … } returns x). The trade-off: androidx itself does NOT use MockK (a grep -r "io.mockk" over the AOSP checkout returns zero hits — see ../mocking-with-mockito/SKILL.md for the dominant pattern). New Kotlin code outside Google often picks MockK; new Kotlin code inside Google or matching AOSP conventions picks Mockito. Both are valid.
When to use this skill
- The codebase is Kotlin-only and dominated by suspend functions / coroutines, and the user wants ergonomic suspend stubbing.
- The user needs to mock a Kotlin
object(singleton), companion object, top-level function (Kt-suffixed file), or every newly-constructed instance of a class. - The user wants strict-by-default verification with the option to opt out per-mock via
relaxed = true/relaxUnitFun = true. - The user wants
slot<T>()capture withslot.captured(cleaner than Mockito'sArgumentCaptor). - The user is writing tests for
viewModelScope,Flowcollectors,LaunchedEffect-style suspend collaborators.
When NOT to use this skill
- The codebase is mixed Java/Kotlin or already standardized on Mockito. Use
../mocking-with-mockito/SKILL.md. Do not migrate without a reason — both frameworks are valid. - The user is matching AOSP / androidx conventions (which are Mockito-only). Use
../mocking-with-mockito/SKILL.md. - Behaviour matters more than interactions, e.g. a
Repositorywith caching logic — write a fake instead. See../../../fundamentals/doubles/picking-test-doubles/SKILL.md(Google explicitly prefers fakes per /test-doubles). - The runner / Gradle matrix isn't set up yet — start with
../../runner/configuring-junit4-on-android/SKILL.md. - The user is testing
Flowemissions over time — pair MockK with Turbine. See../../coroutines/testing-flows-with-turbine/SKILL.md. - The user needs
runTestsemantics — see../../coroutines/testing-coroutines-with-runtest/SKILL.md.
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 · 316 lines · 261 tokens per session scan A b01e860ae2f5
mocking-with-mockk is a skill published in the GitHub repository skydoves/android-testing-skills (318 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 261 tokens to every session and 4,247 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
swift-testing-pro
Writes, reviews, and improves Swift Testing code using modern APIs and best practices. Use when reading, writing, or reviewing projects that use Swift Testing.
swift
Swift development: concurrency patterns, async/await, actors, testing with XCTest and Swift Testing framework.
add-ktnip-ksp-tests
Adds tests for the ktnip KSP processor. Use when adding tests for a new collector, testing processor behavior with new annotations, or verifying KSP code generation for the telegram-bot library.
modernize-tests
Modernize test suites to use modern Swift Testing features or migrate from XCTest.
swift-testing-expert
Expert guidance for Swift Testing: test structure, #expect/#require macros, traits and tags, parameterized tests, test plans, parallel execution, async waiting patterns, and XCTest migration. Use when writing new Swift tests, modernizing XCTest suites, debugging flaky tests, or improving test quality and…
test
Run all TMDb unit tests (Swift Testing, the TMDb test plan). Use after code changes and before a PR to verify unit tests pass — delegates the run to the tooling-runner agent (Haiku) and returns total/passed/failed counts plus each failure as Suite/test with file:line. For the live-API suite, use /integration-test.