datagsm-server: Skill for Claude Code

.agents/skills/kotlin-spring-arch/SKILL.md

kotlin-spring-arch is a skill for Claude Code, Codex from themoment-team/datagsm-server. It costs 49 tokens per session (534 once invoked), scanned A, original, MIT.

An architecture guide for Kotlin and Spring Boot applications, covering the roles of controllers, services, and repositories. It also explains database transactions, avoiding repeated database queries, and converting between entities and data-transfer objects.

In plain words
What is it for?
Use it when adding or reviewing endpoints, business logic, database access, transaction settings, and entity-to-DTO conversions.
Why use it?
It clarifies where each kind of code belongs and helps prevent inefficient database access and inconsistent HTTP responses.

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 themoment-team/datagsm-server's own configuration. It tells Claude Code and Codex 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/.agents/skills/kotlin-spring-arch/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/themoment-team/datagsm-server

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-spring-arch

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/themoment-team/datagsm-server/kotlin-spring-arch"><img src="https://agentmods.dev/badge/skills/themoment-team/datagsm-server/kotlin-spring-arch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 534 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.00049 $0.00534
Opus 5.5 $0.00020 $0.00214
Sonnet 5.5 $0.00010 $0.00107
Haiku 4.5 $0.00005 $0.00053

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

Security

Grade A, and why

kotlin-spring-arch 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 29d 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.

.agents/skills/kotlin-spring-arch/SKILL.md · 88 lines

What it actually says

Kotlin + Spring Boot Architecture Guide

Layer Structure

Controller

  • Role: Request validation, DTO conversion, HTTP response
  • Annotations: @RestController, @RequestMapping
  • Validation: @Valid, @Validated
  • Response: Return DTO directly — the framework auto-wraps it with CommonApiResponse
// CORRECT — return DTO directly
fun getStudent(): StudentResDto = queryStudentService.execute(id)

// WRONG — do not wrap manually
fun getStudent(): CommonApiResponse<StudentResDto> = CommonApiResponse(queryStudentService.execute(id))

Service

  • Role: Business logic, transaction management
  • Pattern: interface + implementation
  • Transaction:
    • Read: @Transactional(readOnly = true)
    • Write: @Transactional
  • Dependencies: Inject Repository via constructor injection

Repository

  • Role: Data access
  • JPA: Extend JpaRepository
  • QueryDSL: Complex queries
  • Avoid N+1: Fetch Join, @EntityGraph

Transaction Strategy

Read-only Optimization

@Transactional(readOnly = true)
fun findApiKeys(): List<ApiKeyResDto> {
    return repository.findAll()
        .map { it.toResDto() }
}

N+1 Problem Resolution

// ❌ N+1 occurs
repository.findAll() // 1 query
entity.relatedEntity // N queries

// ✅ Fetch Join
@Query("SELECT e FROM Entity e JOIN FETCH e.relatedEntity")
fun findAllWithRelated(): List<Entity>

Exception Handling

Use ExpectedException Directly

val student = studentRepository.findById(id).orElseThrow {
    ExpectedException("학생을 찾을 수 없습니다.", HttpStatus.NOT_FOUND)
}

Do not create custom exception subclasses extending ExpectedException.

Global Handler

Locate with: find . -name "GlobalExceptionHandler.kt" ! -path "*/build/*"

DTO Conversion Pattern

// Entity → ResDto
fun Entity.toResDto() = EntityResDto(
    id = this.id,
    name = this.name
)

// ReqDto → Entity
fun EntityReqDto.toEntity() = Entity(
    name = this.name
)
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. 29d ago First seen · 88 lines · 49 tokens per session scan A e642ba1bab3a

Subscribe to this mod's changes

kotlin-spring-arch is a skill published in the GitHub repository themoment-team/datagsm-server (29 stars, last pushed yesterday), licensed MIT. It adds 49 tokens to every session and 534 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-10-08.

Related

kotlin-spring-arch compared with skills from other repositories

kotlin-spring-arch next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
kotlin-spring-archthemoment-team/datagsm-serverSkill29yesterdayMITA49Claude Code, Codex
spring-ecosystem-docspledgeandgrow/pledge-skillsSkill103mo agoMITA43Claude Code, Codex
java-cacheducpm2303/claude-java-pluginsSkill177mo agononeA46Claude Code
kotlin-backend-jpa-entity-mappingKotlin/kotlin-agent-skillsSkill1.1k7d agoApache-2.0A104Claude Code, Codex
zhihu-searchitwanger/toBeBetterJavaerSkill18k2d agononeA103Claude Code, Codex
redis-docs-mcpredis/agent-skillsSkill174yesterdayMITA132Claude Code
spring-mcp-contractsexplyt/spring-pluginSkill167yesterdayApache-2.0A102Claude Code, Codex