kotlin-best-practices
Kotlin coding standards including null safety, Either error handling, coroutines, and Exposed ORM patterns. Use when writing Kotlin code, reviewing code quality, or learning project patterns.
Works with
---
name: kotlin-best-practices
description: Kotlin coding standards including null safety, Either error handling, coroutines, and Exposed ORM patterns. Use when writing Kotlin code, reviewing code quality, or learning project patterns.
license: MIT
---
# Kotlin Best Practices — Quick Reference
## Null Safety
`!!` is banned. Use `?.`, `?:`, or null check for smart cast.
> See code-patterns.md for all null safety examples.
## Either Error Handling
Managers return `Either<ClientException, T>` -- never throw. Controllers unwrap with `.throwOrValue()`.
> See code-patterns.md for manager + controller examples.
## Enum Usage
Never hardcode strings when an enum exists. Use `EnumName.VALUE.value` everywhere.
> See code-patterns.md for enum definition and usage patterns.
## Exposed ORM Patterns
Extend `UUIDTable`, use `text()` not `varchar()`. Always filter `deletedAt.isNull()`. Soft delete via timestamp update, never hard delete.
> See code-patterns.md for table, query, and soft delete examples.
## Transaction Rules
Reads use `db.replica`, writes use `db.primary`. Multi-table writes go in one transaction block -- all succeed or all rollback.
> See code-patterns.md for transaction examples.
## Conversion Pattern
Put `companion object { fun from(entity) }` inside Response DTOs. Never create separate mapper files.
> See code-patterns.md for the full pattern.
## What to Avoid
- `!!` -- always use `?.`, `?:`, or null check
- `@Suppress` -- fix the root cause
- Throwing exceptions -- return `Either.left()` instead
- `VARCHAR` in SQL -- use `TEXT`
- Hardcoded strings for enum values
- `Table` base class -- use `UUIDTable`
- Field injection -- use constructor injectionMore Mobile skills
animation-vocabulary
emilkowalski/skills
Reverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one.
cross-border-ecommerce
nexscope-ai/ecommerce-skills
Cross-border e-commerce expansion advisor. Scores target markets on 8 weighted dimensions (market size, ecommerce penetration, competition, regulatory complexity, logistics infrastructure, payment ecosystem, cultural distance, IP protection), compares 5 fulfillment models with cost and transit data, provides country-by-country tax/duty compliance guides (EU VAT/IOSS, UK VAT, US sales tax, CA GST, AU GST, JP consumption tax), maps local payment preferences by market, and builds a phased expansion roadmap. No API key required.
developing-genkit-dart
firebase/agent-skills
Generates code and provides documentation for the Genkit Dart SDK. Use when the user asks to build AI agents in Dart, use Genkit flows, or integrate LLMs into Dart/Flutter applications.

