run-module-tests

run-module-tests is a skill for Claude Code, Codex from jonapoul/aktual. It costs 26 tokens per session (925 once invoked), scanned A, original, Apache-2.0.

A guide for choosing and running the correct Gradle test task for a project module based on its source sets and plugin type.

In plain words
What is it for?
Finding test source sets and running shared, Android host, desktop, or standard JVM tests for a selected module.
Why use it?
It avoids running the wrong tests or missing platform-specific tests in a Kotlin Multiplatform project.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/jonapoul/aktual/run-module-tests
Any agent
npx skills add jonapoul/aktual --skill run-module-tests
Clone the repo
git clone --depth 1 https://github.com/jonapoul/aktual

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 run-module-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/jonapoul/aktual/run-module-tests.svg)](https://agentmods.dev/skills/jonapoul/aktual/run-module-tests)
Your own site
<a href="https://agentmods.dev/skills/jonapoul/aktual/run-module-tests"><img src="https://agentmods.dev/badge/skills/jonapoul/aktual/run-module-tests.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 925 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00026 $0.00925
Opus 5 $0.00013 $0.00463
Sonnet 5 $0.00005 $0.00185
Haiku 4.5 $0.00003 $0.00093

Measured 3d ago against content hash fffe2aa583bd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

run-module-tests 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.

.claude/skills/run-module-tests/SKILL.md · 84 lines

How it starts

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

Run the correct test task(s) for a Gradle module in this KMP project.

Arguments

  • $ARGUMENTS should be the Gradle module path (e.g., aktual-api, aktual-account:vm, aktual-app:desktop)
    • If omitted, infer it from the most recently discussed or edited module in conversation context

Step-by-Step Process

1. Determine what test source sets exist

Check which test source set directories exist for the module under src/:

src/commonTest/     -> shared tests (run by both androidHostTest and desktopTest tasks)
src/androidHostTest/ -> Android-specific tests (Robolectric, runs on host JVM)
src/desktopTest/    -> JVM/Desktop-specific tests
src/test/           -> Standard JVM test (JVM-only modules)

Use Glob to check: <module-path>/src/*test*/ and <module-path>/src/*Test*/

The module path on disk uses / separators (e.g., aktual-core/api/src/commonTest), but the Gradle path uses : (e.g., :aktual-api).

2. Determine the module type

Check the module's build.gradle.kts for which convention plugin it uses:

Plugin Module Type Available Test Tasks
aktual.module.kotlin KMP allTests, testAndroidHostTest, desktopTest
aktual.module.compose KMP + Compose allTests, testAndroidHostTest, desktopTest
aktual.module.viewmodel KMP + Compose + VM allTests, testAndroidHostTest, desktopTest
aktual.module.di KMP + DI allTests, testAndroidHostTest, desktopTest
aktual.module.jvm JVM-only test

3. Choose the right task

For KMP modules (kotlin/compose/viewmodel/di plugins):

Source Sets Present Recommended Task Why
Only commonTest testAndroidHostTest commonTest is compiled into both androidHostTest and desktopTest; pick one to avoid running twice. androidHostTest is preferred as it includes Robolectric support.
Only androidHostTest (with or without commonTest) testAndroidHostTest Runs commonTest + androidHostTest together
Only desktopTest (with or without commonTest) desktopTest Runs commonTest + desktopTest together
Both androidHostTest and desktopTest allTests Need both targets to cover all tests
commonTest + androidHostTest + desktopTest allTests Need both targets

Read the full file on GitHub · 84 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. 3d ago First seen · 84 lines · 26 tokens per session scan A fffe2aa583bd

Subscribe to this mod's changes

run-module-tests is a skill published in the GitHub repository jonapoul/aktual (33 stars, last pushed yesterday), licensed Apache-2.0. It adds 26 tokens to every session and 925 once invoked, about $0.0001 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-01.