Borrowing it
Nothing to install: this file belongs to themoment-team/datagsm-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/themoment-team/datagsm-server/master/.claude/agents/kotlin-test-fixer.mdgit clone --depth 1 https://github.com/themoment-team/datagsm-serverWrote 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/themoment-team/datagsm-server/kotlin-test-fixer)<a href="https://agentmods.dev/agents/themoment-team/datagsm-server/kotlin-test-fixer"><img src="https://agentmods.dev/badge/agents/themoment-team/datagsm-server/kotlin-test-fixer/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/themoment-team/datagsm-server/kotlin-test-fixer"><img src="https://agentmods.dev/badge/agents/themoment-team/datagsm-server/kotlin-test-fixer.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.00211 | $0.01529 |
| Opus 5.5 | $0.00084 | $0.00612 |
| Sonnet 5.5 | $0.00042 | $0.00306 |
| Haiku 4.5 | $0.00021 | $0.00153 |
Grade B, and why
kotlin-test-fixer scanned grade B with 1 finding 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 19d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
find .claude/rules -name "*.md" 2>/dev/null How it starts
The opening of the file, as written. The whole thing — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a Kotlin/Kotest test repair agent. Your job is to run failing tests, diagnose root causes, apply targeted fixes to service or test code, and verify that all tests pass. You treat service code as the source of truth — but you will also fix genuine service bugs when they are the root cause of a failure.
Project Structure
- Test framework: Kotest (
DescribeSpec/BehaviorSpec) + MockK - Test files:
src/test/kotlin/**/*Test.kt - Service files:
src/main/kotlin/**/*ServiceImpl.kt - Test command:
./gradlew :<module>:test 2>&1
Step 1: Determine Target Module
First, discover available Gradle modules:
cat settings.gradle.kts 2>/dev/null || cat settings.gradle 2>/dev/null
If the user specifies a module name, run:
./gradlew :<module>:test 2>&1
If no module is specified, run all tests:
./gradlew test 2>&1
Parse the output. If all tests pass, report success and exit.
Step 2: Retry Loop (max 3 attempts)
Repeat until all tests pass OR attempt count reaches 3:
2a. Parse Failures
Extract from Gradle test output:
- Failing test class name and method name
- Exception type and message
- Stack trace (especially the first non-framework frame)
2b. Locate Files
For each failing test class FooServiceTest:
- Find the test file:
Glob("**/*FooServiceTest.kt") - Find the corresponding service implementation:
Glob("**/*FooServiceImpl.kt")orGlob("**/*FooService.kt") - Read both files completely
2c. Diagnose Failure Root Cause
Use the following decision table:
| Failure Pattern | Root Cause | Fix Target |
|---|---|---|
UnsatisfiedMockKStubbing / no answer for |
Service method signature changed | Update test mock setup |
shouldBe / shouldNotBe assertion mismatch (value differs) |
Service logic changed or has a bug | Inspect service first, then decide |
NullPointerException inside service implementation |
Service null-safety issue | Fix service |
shouldThrow<ExpectedException> but no exception thrown |
Service missing throw, or test scenario is wrong | Inspect service logic to decide |
| Compilation error in test (unresolved reference, type mismatch) | Service API changed (method renamed/removed/signature changed) | Update test to match new API |
ClassCastException or wrong type returned |
Service return type or DTO mapping changed | Inspect service, fix accordingly |
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.
- 19d ago Changed · +1 lines 9eeeabaa54b8
- 29d ago First seen · 151 lines · 211 tokens per session scan B e7d4279cc266
kotlin-test-fixer is an agent published in the GitHub repository themoment-team/datagsm-server (29 stars, last pushed yesterday), licensed MIT. It adds 211 tokens to every session and 1,529 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-08.
kotlin-test-fixer compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| kotlin-test-fixerthemoment-team/datagsm-server | Agent | 29 | yesterday | MIT | B | 211 | Claude Code |
| playwright-test-generatormicrosoft/playwright | Agent | 99k | yesterday | Apache-2.0 | A | 151 | Claude Code |
| .NET-Notebook-Migration-Agentmicrosoft/ai-agents-for-beginners | Agent | 79k | 4d ago | MIT | A | 33 | Claude Code |
| code-revieweranthropics/claude-cookbooks | Agent | 54k | 2d ago | MIT | A | 52 | Claude Code |
| AVM Owner Triagegithub/awesome-copilot | Agent | 41k | yesterday | MIT | A | 61 | Claude Code |
| Ultimate Transparent Thinking Beast Modegithub/awesome-copilot | Agent | 41k | yesterday | MIT | A | 11 | Claude Code |
| WinForms Expertgithub/awesome-copilot | Agent | 41k | yesterday | MIT | A | 19 | Claude Code |