Skip to main content
skill CX Codex

kotlin-best-practices — Claude Code skill: Kotlin standards

A skill that pins down Kotlin conventions: null safety, Either instead of thrown exceptions, coroutines, and Exposed ORM patterns. Useful while writing or reviewing Kotlin.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add c0x12c/ai-toolkit --skill kotlin-best-practices -a claude-code
Open on GitHub

What kotlin-best-practices does

The skill spells out how Kotlin should look in a project. !! is out; use ?., ?:, or a null check that lets the compiler smart cast. Managers hand back Either<ClientException, T> rather than throwing, and controllers pull the value out with .throwOrValue(). Enum values are never written as raw strings — call EnumName.VALUE.value.

Database work follows the same tone. Tables extend UUIDTable, not Table, and columns use text() instead of varchar(). Deletes are soft: update the deletedAt timestamp, and every query carries a deletedAt.isNull() filter. Reads hit db.replica, writes go to db.primary. When a change touches more than one table, it belongs in a single transaction block so everything commits or nothing does.

DTOs keep their own conversion: companion object { fun from(entity) } sits inside the Response DTO, and separate mapper files are not created. Each section points to code-patterns.md for the full examples, though that file is not part of the skill — you get the short rules only. The skill runs with Read, Write, Edit, Glob, and Grep.

What it helps with

  • write Kotlin without !! or thrown exceptions
  • unwrap Either in a controller with .throwOrValue()
  • soft delete rows instead of removing them
  • split reads and writes across db.replica and db.primary
  • keep entity conversion inside the Response DTO, not a mapper file

Example prompts for the agent

  • Write this Kotlin repository following the skill: a UUIDTable, with deletedAt.isNull() in every query
  • Review this manager — it should return Either instead of throwing
  • Add an update that writes to two tables in one transaction via db.primary

How to install kotlin-best-practices

1Skills CLI (Vercel)

npx skills add c0x12c/ai-toolkit --skill kotlin-best-practices -a claude-code

2Manually: put the files in place

~/.claude/skills/kotlin-best-practices/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/kotlin-best-practices/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about kotlin-best-practices

How do I install kotlin-best-practices in Claude Code?

Run npx skills add c0x12c/ai-toolkit --skill kotlin-best-practices -a claude-code. The skill lands at ~/.claude/skills/kotlin-best-practices/SKILL.md.

What does kotlin-best-practices do?

It gives the agent Kotlin conventions to follow: no !!, managers returning Either, soft deletes in Exposed ORM, reads and writes split between replica and primary, and conversion kept inside Response DTOs.

Which platforms support the skill?

Besides Claude, there are install paths for Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode.

Similar skills

All skills for Programming languages →

From the same set11

terraform-review Walks Terraform changes through an 8-category checklist and returns a verdict: Approved, Needs Changes or Blocked. Useful before merging an infrastructure PR. CX Codex +1 ★ 109repo stars startup-pipeline Moves a startup idea through four stages: brainstorm, validation, market research and pitch materials. Gates between stages stop weak ideas early. CX Codex +1 ★ 109repo stars python-testing-strategies A skill that tells your coding agent how to test FastAPI apps: pytest-asyncio, httpx AsyncClient, data factories and the checks every endpoint needs. CX Codex +1 ★ 109repo stars ops-oncall-log Pulls alerts from your monitoring platform and writes a structured on-call log to the team wiki. Useful at the end of a shift or during a review. CX Codex +1 ★ 109repo stars investor-materials A skill for producing investor-facing documents: a pitch deck, one-pager, memo and financial model. Useful when the numbers and the story have to line up across every file. CX Codex +1 ★ 109repo stars design-intelligence Bootstraps a design system from scratch: palette, type scale, spacing, radii and a component inventory in three formats. CX Codex +1 ★ 109repo stars database-patterns Hands your agent a fixed set of database rules: column types, UUID keys, soft deletes and migration templates. Useful when it writes tables or repositories. CX Codex +1 ★ 109repo stars ci-cd-patterns A skill with GitHub Actions templates, PR checks and deployment steps. Handy when CI breaks or you are wiring it up from scratch. CX Codex +1 ★ 109repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor