datagsm-server: Agent for Claude Code

.claude/agents/kotlin-convention-validator.md

kotlin-convention-validator is an agent for Claude Code from themoment-team/datagsm-server. It costs 175 tokens per session (948 once invoked), scanned B, original, MIT.

A Kotlin code checker that reviews changed Kotlin files against the project's written coding rules and fixes violations. It stops when the change contains no Kotlin files.

In plain words
What is it for?
It checks and corrects patterns such as annotation targets, logging style, exception messages, and mutable versus read-only variables in changed `.kt` files.
Why use it?
It removes the need to remember and manually enforce conventions spread across rule and contribution documents. It also keeps fixes consistent with the project's stated priorities.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions AGENTS.md.

This is themoment-team/datagsm-server's own configuration. It tells Claude Code how to work on datagsm-server 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 datagsm-server configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/themoment-team/datagsm-server/master/.claude/agents/kotlin-convention-validator.md
Clone the repo
git clone --depth 1 https://github.com/themoment-team/datagsm-server

Made for: Claude Code.

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-convention-validator

README.md
[![agentmods](https://agentmods.dev/badge/agents/themoment-team/datagsm-server/kotlin-convention-validator/github.svg)](https://agentmods.dev/agents/themoment-team/datagsm-server/kotlin-convention-validator)
Your own site
<a href="https://agentmods.dev/agents/themoment-team/datagsm-server/kotlin-convention-validator"><img src="https://agentmods.dev/badge/agents/themoment-team/datagsm-server/kotlin-convention-validator/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-convention-validator

Your own site · 80×15
<a href="https://agentmods.dev/agents/themoment-team/datagsm-server/kotlin-convention-validator"><img src="https://agentmods.dev/badge/agents/themoment-team/datagsm-server/kotlin-convention-validator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 175 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 948 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00175 $0.00948
Opus 5.5 $0.00070 $0.00379
Sonnet 5.5 $0.00035 $0.00190
Haiku 4.5 $0.00017 $0.00095

Measured 19d ago against content hash ed6fe9b84206, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

kotlin-convention-validator 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
.claude/agents/kotlin-convention-validator.md · 91 lines

How it starts

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

You are a Kotlin/Spring Boot convention enforcement agent. Your job is to detect and fix convention violations in changed files, then report what was changed.

Step 1: Collect Changed Files

Run the following command to get changed Kotlin files:

git diff HEAD --name-only --diff-filter=ACMR | grep '\.kt$'

If no Kotlin files are changed, report that there is nothing to check and exit.

Step 2: Load Rules

Discover all rule files dynamically — do not rely on a hardcoded list:

# Discover all rule files
find .claude/rules -name "*.md" 2>/dev/null

Read AGENTS.md, then each coding rule whose paths match the changed files. Rules without paths apply unless their body limits them to another tool.

Priority when rules conflict: AGENTS.md > applicable .claude/rules/** > .gemini/styleguide.md > CONTRIBUTING.md

These rule files are the authoritative source. The concrete fixes in Step 3 (e.g., @field: annotation targets, English {}-placeholder logging, Korean 합쇼체 + period for ExpectedException) reflect this project's default conventions. When a rule file contradicts a default, follow the rule file.

Step 3: Fix Violations

For each violation found, fix it directly using the Edit tool:

  1. DTO annotations: Replace @param:JsonProperty → @field:JsonProperty, fix @param:Schema on ResDto files
  2. Logging: Rewrite log messages to English verb-led sentences with {} placeholders
  3. ExpectedException: Remove dynamic data from message strings (keep Korean 합쇼체 + period)
  4. Kotlin style: Convert var to val where safe; refactor field injection to constructor injection
  5. Transactional: Move class-level @Transactional to method level; add readOnly = true to read methods

After all edits, run:

./gradlew ktlintFormat

to apply final formatting cleanup.

Step 4: Output Report

After fixing, output a structured report:

## Convention Validation Report

### Fixed Files (N files)

#### src/main/kotlin/.../SomeFile.kt
- [DTO Annotation] @param:JsonProperty → @field:JsonProperty (2 occurrences)
  ```diff
  - @param:JsonProperty("student_name")
  + @field:JsonProperty("student_name")
  • [Logging] Rewrote log message to English with {} placeholder
    - logger.error("에러 발생: $message")
    + logger.error("Failed to process {}", message)
    

Requires Manual Review (auto-fix not safe)

  • List any ambiguous cases here with explanation

No Violations

  • List files that were clean

Read the full file on GitHub · 91 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. 19d ago Changed · +7 tokens per session ed6fe9b84206
  2. 29d ago First seen · 91 lines · 168 tokens per session scan B e1b94a5f5095

Subscribe to this mod's changes

kotlin-convention-validator is an agent published in the GitHub repository themoment-team/datagsm-server (29 stars, last pushed yesterday), licensed MIT. It adds 175 tokens to every session and 948 once invoked, about $0.0007 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.

Related

kotlin-convention-validator compared with agents from other repositories

kotlin-convention-validator next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
kotlin-convention-validatorthemoment-team/datagsm-serverAgent29yesterdayMITB175Claude Code
java-refactor-expertgiuseppe-trisciuoglio/developer-kitAgent3671mo agoMITA61Claude Code
python-refactor-expertgiuseppe-trisciuoglio/developer-kitAgent3671mo agoMITA58Claude Code
typescript-refactor-expertgiuseppe-trisciuoglio/developer-kitAgent3671mo agoMITA63Claude Code
python-code-review-expertgiuseppe-trisciuoglio/developer-kitAgent3671mo agoMITA63Claude Code
typescript-software-architect-reviewgiuseppe-trisciuoglio/developer-kitAgent3671mo agoMITA89Claude Code
spring-boot-code-review-expertgiuseppe-trisciuoglio/developer-kitAgent3671mo agoMITA55Claude Code