[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-jetbrains-kotlin-engineer":3,"mdc-n4te06-key":32,"related-org-jetbrains-kotlin-engineer":996,"related-repo-jetbrains-kotlin-engineer":1127},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":22,"repoUrl":23,"updatedAt":24,"license":25,"forks":26,"topics":27,"repo":28,"sourceUrl":30,"mdContent":31},"kotlin-engineer","write and refactor Kotlin code","Kotlin 2.x policy and pitfalls. Use when writing, reviewing, or refactoring Kotlin code — enforces coroutine-safety, Flow correctness, null-safety, and API-design rules that LLMs frequently get wrong.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"jetbrains","JetBrains","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fjetbrains.png",[12,16,19],{"name":13,"slug":14,"type":15},"Kotlin","kotlin","tag",{"name":17,"slug":18,"type":15},"Code Review","code-review",{"name":20,"slug":21,"type":15},"Engineering","engineering",18,"https:\u002F\u002Fgithub.com\u002FJetBrains\u002Fjunie-extensions","2026-07-13T06:45:30.911318",null,1,[],{"repoUrl":23,"stars":22,"forks":26,"topics":29,"description":25},[],"https:\u002F\u002Fgithub.com\u002FJetBrains\u002Fjunie-extensions\u002Ftree\u002FHEAD\u002Fextensions\u002Fkotlin-engineer\u002Fskills\u002Fkotlin","---\nname: kotlin-engineer\ndescription: Kotlin 2.x policy and pitfalls. Use when writing, reviewing, or refactoring Kotlin code — enforces coroutine-safety, Flow correctness, null-safety, and API-design rules that LLMs frequently get wrong.\n---\n\n# Kotlin — policy & pitfalls\n\nBaseline Kotlin knowledge (data\u002Fsealed\u002Fvalue classes, scope functions, null-safety operators, extension functions, `suspend`, `Flow`, `when` exhaustiveness) is assumed. This skill does not teach the language — it encodes the project policy and the traps that keep appearing in code review.\n\n## Setup Check (run first)\n\nBefore writing non-trivial code:\n\n1. **Kotlin version** — target 2.x when possible. Check `build.gradle(.kts)` (`kotlin(\"jvm\") version \"2.x\"`) or `libs.versions.toml`.\n2. **JDK target** — `kotlin { jvmToolchain(21) }` or `compileOptions { targetCompatibility = JavaVersion.VERSION_21 }`. Matters for virtual threads (21+) and records interop (17+).\n3. **Compiler plugins** — `kotlin(\"plugin.spring\")`, `kotlin(\"plugin.jpa\")`, `kotlinx-serialization`, `kotlin(\"kapt\")` vs `com.google.devtools.ksp`. Missing `plugin.spring` → final Spring classes can't be proxied. Missing `plugin.jpa` → `InstantiationException: No default constructor`.\n4. **Lint** — `detekt` \u002F `ktlint` configured? Follow the existing rules; don't introduce new violations.\n5. **Build wrapper** — use `.\u002Fgradlew`\n\n## MUST DO\n\n- **Null-safety via `?`, `?.`, `?:`, `let`, `requireNotNull`.** Use `!!` only when null is a true contract violation — document why on the same line.\n- **Sealed hierarchies** for closed result \u002F state types (`sealed interface Result { data class Success(...); data class Failure(...) }`) + exhaustive `when` without `else`.\n- **Value classes (`@JvmInline value class`)** for domain identifiers (`UserId`, `Email`) — zero-overhead type-safety.\n- **`data class` only for pure value types.** Not for entities, services, or anything with behavior \u002F lifecycle.\n- **Structured concurrency** — inject `CoroutineScope`, use `coroutineScope { }` \u002F framework scopes (`viewModelScope`). Never `GlobalScope.launch`.\n- **Always rethrow `CancellationException`** in generic `catch (e: Exception)` blocks — swallowing it disables cancellation.\n- **Expose read-only Flow types** — `val state: StateFlow\u003CX> = _state.asStateFlow()`. Never leak `MutableStateFlow` \u002F `MutableSharedFlow` from an API.\n- **`withContext(Dispatchers.IO)` \u002F `Default`** for blocking \u002F CPU work inside suspend. Encapsulate dispatcher choice in the repository \u002F data-source layer — not at call sites.\n- **Immutability by default** — `val` over `var`, `List` over `MutableList` in public API, `copy()` on data classes instead of mutation.\n- **Named arguments for 3+ parameters** — prevents silent argument swaps at call sites.\n\n## MUST NOT DO\n\n- **No `!!`** without a commented reason. Refactor to `?.let { }` \u002F `requireNotNull(x) { \"why\" }`.\n- **No `runBlocking` in production** — only in `main` and tests. Inside a suspend function it's always a bug.\n- **No `GlobalScope.launch` \u002F `GlobalScope.async`** — leaks, no structured cancellation.\n- **No swallowing `CancellationException`.** `try\u002Fcatch(Exception)` without a cancellation rethrow silently disables cancellation.\n- **No `.first()` \u002F `.single()` on a hot `Flow`** without a timeout — a source that never emits hangs the coroutine forever.\n- **No `async { }.await()` sequentially** when you want parallelism — it's the same as calling `suspend` directly. Use `coroutineScope { val a = async { .. }; val b = async { .. }; a.await() + b.await() }`.\n- **No `Dispatchers.Main` \u002F `Dispatchers.IO` references from common \u002F multiplatform code** unless the module is JVM-only.\n- **No platform-type leaks (`String!`)** in public API — annotate Java interop returns with `@NotNull` \u002F `@Nullable` on the Java side, or cast explicitly.\n- **No catching `Throwable`** — you'll catch `OutOfMemoryError`, `StackOverflowError`, and cancellation. Use `Exception` and rethrow cancellation.\n- **No `lateinit var` on primitives or nullable types** — compile error. Use `Delegates.notNull()` for primitives.\n\n## Reference Guide\n\n| Load when | File |\n|---|---|\n| Async \u002F reactive code — coroutines, Flow, StateFlow\u002FSharedFlow, cancellation, testing | `references\u002Fcoroutines.md` |\n| API design — scope functions, value\u002Fdata\u002Fsealed classes, extension functions, inline\u002Freified, delegates, `Result\u003CT>` | `references\u002Fidioms.md` |\n| Gradle \u002F tooling — Kotlin DSL, version catalogs, KSP vs kapt, multi-module layout, compiler plugins | `references\u002Fbuild-setup.md` |\n\n## Output Format\n\nWhen producing code:\n\n1. A short plan (1–3 bullets) of what's changing.\n2. The code.\n3. A checklist of the non-obvious MUST rules applied.\n\nWhen reviewing code: call out MUST-DO \u002F MUST-NOT violations explicitly and suggest the minimal fix.\n",{"data":33,"body":34},{"name":4,"description":6},{"type":35,"children":36},"root",[37,46,76,83,88,264,270,583,589,871,877,962,968,973,991],{"type":38,"tag":39,"props":40,"children":42},"element","h1",{"id":41},"kotlin-policy-pitfalls",[43],{"type":44,"value":45},"text","Kotlin — policy & pitfalls",{"type":38,"tag":47,"props":48,"children":49},"p",{},[50,52,59,61,67,68,74],{"type":44,"value":51},"Baseline Kotlin knowledge (data\u002Fsealed\u002Fvalue classes, scope functions, null-safety operators, extension functions, ",{"type":38,"tag":53,"props":54,"children":56},"code",{"className":55},[],[57],{"type":44,"value":58},"suspend",{"type":44,"value":60},", ",{"type":38,"tag":53,"props":62,"children":64},{"className":63},[],[65],{"type":44,"value":66},"Flow",{"type":44,"value":60},{"type":38,"tag":53,"props":69,"children":71},{"className":70},[],[72],{"type":44,"value":73},"when",{"type":44,"value":75}," exhaustiveness) is assumed. This skill does not teach the language — it encodes the project policy and the traps that keep appearing in code review.",{"type":38,"tag":77,"props":78,"children":80},"h2",{"id":79},"setup-check-run-first",[81],{"type":44,"value":82},"Setup Check (run first)",{"type":38,"tag":47,"props":84,"children":85},{},[86],{"type":44,"value":87},"Before writing non-trivial code:",{"type":38,"tag":89,"props":90,"children":91},"ol",{},[92,128,154,223,248],{"type":38,"tag":93,"props":94,"children":95},"li",{},[96,102,104,110,112,118,120,126],{"type":38,"tag":97,"props":98,"children":99},"strong",{},[100],{"type":44,"value":101},"Kotlin version",{"type":44,"value":103}," — target 2.x when possible. Check ",{"type":38,"tag":53,"props":105,"children":107},{"className":106},[],[108],{"type":44,"value":109},"build.gradle(.kts)",{"type":44,"value":111}," (",{"type":38,"tag":53,"props":113,"children":115},{"className":114},[],[116],{"type":44,"value":117},"kotlin(\"jvm\") version \"2.x\"",{"type":44,"value":119},") or ",{"type":38,"tag":53,"props":121,"children":123},{"className":122},[],[124],{"type":44,"value":125},"libs.versions.toml",{"type":44,"value":127},".",{"type":38,"tag":93,"props":129,"children":130},{},[131,136,138,144,146,152],{"type":38,"tag":97,"props":132,"children":133},{},[134],{"type":44,"value":135},"JDK target",{"type":44,"value":137}," — ",{"type":38,"tag":53,"props":139,"children":141},{"className":140},[],[142],{"type":44,"value":143},"kotlin { jvmToolchain(21) }",{"type":44,"value":145}," or ",{"type":38,"tag":53,"props":147,"children":149},{"className":148},[],[150],{"type":44,"value":151},"compileOptions { targetCompatibility = JavaVersion.VERSION_21 }",{"type":44,"value":153},". Matters for virtual threads (21+) and records interop (17+).",{"type":38,"tag":93,"props":155,"children":156},{},[157,162,163,169,170,176,177,183,184,190,192,198,200,206,208,214,216,222],{"type":38,"tag":97,"props":158,"children":159},{},[160],{"type":44,"value":161},"Compiler plugins",{"type":44,"value":137},{"type":38,"tag":53,"props":164,"children":166},{"className":165},[],[167],{"type":44,"value":168},"kotlin(\"plugin.spring\")",{"type":44,"value":60},{"type":38,"tag":53,"props":171,"children":173},{"className":172},[],[174],{"type":44,"value":175},"kotlin(\"plugin.jpa\")",{"type":44,"value":60},{"type":38,"tag":53,"props":178,"children":180},{"className":179},[],[181],{"type":44,"value":182},"kotlinx-serialization",{"type":44,"value":60},{"type":38,"tag":53,"props":185,"children":187},{"className":186},[],[188],{"type":44,"value":189},"kotlin(\"kapt\")",{"type":44,"value":191}," vs ",{"type":38,"tag":53,"props":193,"children":195},{"className":194},[],[196],{"type":44,"value":197},"com.google.devtools.ksp",{"type":44,"value":199},". Missing ",{"type":38,"tag":53,"props":201,"children":203},{"className":202},[],[204],{"type":44,"value":205},"plugin.spring",{"type":44,"value":207}," → final Spring classes can't be proxied. Missing ",{"type":38,"tag":53,"props":209,"children":211},{"className":210},[],[212],{"type":44,"value":213},"plugin.jpa",{"type":44,"value":215}," → ",{"type":38,"tag":53,"props":217,"children":219},{"className":218},[],[220],{"type":44,"value":221},"InstantiationException: No default constructor",{"type":44,"value":127},{"type":38,"tag":93,"props":224,"children":225},{},[226,231,232,238,240,246],{"type":38,"tag":97,"props":227,"children":228},{},[229],{"type":44,"value":230},"Lint",{"type":44,"value":137},{"type":38,"tag":53,"props":233,"children":235},{"className":234},[],[236],{"type":44,"value":237},"detekt",{"type":44,"value":239}," \u002F ",{"type":38,"tag":53,"props":241,"children":243},{"className":242},[],[244],{"type":44,"value":245},"ktlint",{"type":44,"value":247}," configured? Follow the existing rules; don't introduce new violations.",{"type":38,"tag":93,"props":249,"children":250},{},[251,256,258],{"type":38,"tag":97,"props":252,"children":253},{},[254],{"type":44,"value":255},"Build wrapper",{"type":44,"value":257}," — use ",{"type":38,"tag":53,"props":259,"children":261},{"className":260},[],[262],{"type":44,"value":263},".\u002Fgradlew",{"type":38,"tag":77,"props":265,"children":267},{"id":266},"must-do",[268],{"type":44,"value":269},"MUST DO",{"type":38,"tag":271,"props":272,"children":273},"ul",{},[274,327,359,392,408,449,473,505,526,573],{"type":38,"tag":93,"props":275,"children":276},{},[277,317,319,325],{"type":38,"tag":97,"props":278,"children":279},{},[280,282,288,289,295,296,302,303,309,310,316],{"type":44,"value":281},"Null-safety via ",{"type":38,"tag":53,"props":283,"children":285},{"className":284},[],[286],{"type":44,"value":287},"?",{"type":44,"value":60},{"type":38,"tag":53,"props":290,"children":292},{"className":291},[],[293],{"type":44,"value":294},"?.",{"type":44,"value":60},{"type":38,"tag":53,"props":297,"children":299},{"className":298},[],[300],{"type":44,"value":301},"?:",{"type":44,"value":60},{"type":38,"tag":53,"props":304,"children":306},{"className":305},[],[307],{"type":44,"value":308},"let",{"type":44,"value":60},{"type":38,"tag":53,"props":311,"children":313},{"className":312},[],[314],{"type":44,"value":315},"requireNotNull",{"type":44,"value":127},{"type":44,"value":318}," Use ",{"type":38,"tag":53,"props":320,"children":322},{"className":321},[],[323],{"type":44,"value":324},"!!",{"type":44,"value":326}," only when null is a true contract violation — document why on the same line.",{"type":38,"tag":93,"props":328,"children":329},{},[330,335,337,343,345,350,352,358],{"type":38,"tag":97,"props":331,"children":332},{},[333],{"type":44,"value":334},"Sealed hierarchies",{"type":44,"value":336}," for closed result \u002F state types (",{"type":38,"tag":53,"props":338,"children":340},{"className":339},[],[341],{"type":44,"value":342},"sealed interface Result { data class Success(...); data class Failure(...) }",{"type":44,"value":344},") + exhaustive ",{"type":38,"tag":53,"props":346,"children":348},{"className":347},[],[349],{"type":44,"value":73},{"type":44,"value":351}," without ",{"type":38,"tag":53,"props":353,"children":355},{"className":354},[],[356],{"type":44,"value":357},"else",{"type":44,"value":127},{"type":38,"tag":93,"props":360,"children":361},{},[362,375,377,383,384,390],{"type":38,"tag":97,"props":363,"children":364},{},[365,367,373],{"type":44,"value":366},"Value classes (",{"type":38,"tag":53,"props":368,"children":370},{"className":369},[],[371],{"type":44,"value":372},"@JvmInline value class",{"type":44,"value":374},")",{"type":44,"value":376}," for domain identifiers (",{"type":38,"tag":53,"props":378,"children":380},{"className":379},[],[381],{"type":44,"value":382},"UserId",{"type":44,"value":60},{"type":38,"tag":53,"props":385,"children":387},{"className":386},[],[388],{"type":44,"value":389},"Email",{"type":44,"value":391},") — zero-overhead type-safety.",{"type":38,"tag":93,"props":393,"children":394},{},[395,406],{"type":38,"tag":97,"props":396,"children":397},{},[398,404],{"type":38,"tag":53,"props":399,"children":401},{"className":400},[],[402],{"type":44,"value":403},"data class",{"type":44,"value":405}," only for pure value types.",{"type":44,"value":407}," Not for entities, services, or anything with behavior \u002F lifecycle.",{"type":38,"tag":93,"props":409,"children":410},{},[411,416,418,424,426,432,434,440,442,448],{"type":38,"tag":97,"props":412,"children":413},{},[414],{"type":44,"value":415},"Structured concurrency",{"type":44,"value":417}," — inject ",{"type":38,"tag":53,"props":419,"children":421},{"className":420},[],[422],{"type":44,"value":423},"CoroutineScope",{"type":44,"value":425},", use ",{"type":38,"tag":53,"props":427,"children":429},{"className":428},[],[430],{"type":44,"value":431},"coroutineScope { }",{"type":44,"value":433}," \u002F framework scopes (",{"type":38,"tag":53,"props":435,"children":437},{"className":436},[],[438],{"type":44,"value":439},"viewModelScope",{"type":44,"value":441},"). Never ",{"type":38,"tag":53,"props":443,"children":445},{"className":444},[],[446],{"type":44,"value":447},"GlobalScope.launch",{"type":44,"value":127},{"type":38,"tag":93,"props":450,"children":451},{},[452,463,465,471],{"type":38,"tag":97,"props":453,"children":454},{},[455,457],{"type":44,"value":456},"Always rethrow ",{"type":38,"tag":53,"props":458,"children":460},{"className":459},[],[461],{"type":44,"value":462},"CancellationException",{"type":44,"value":464}," in generic ",{"type":38,"tag":53,"props":466,"children":468},{"className":467},[],[469],{"type":44,"value":470},"catch (e: Exception)",{"type":44,"value":472}," blocks — swallowing it disables cancellation.",{"type":38,"tag":93,"props":474,"children":475},{},[476,481,482,488,490,496,497,503],{"type":38,"tag":97,"props":477,"children":478},{},[479],{"type":44,"value":480},"Expose read-only Flow types",{"type":44,"value":137},{"type":38,"tag":53,"props":483,"children":485},{"className":484},[],[486],{"type":44,"value":487},"val state: StateFlow\u003CX> = _state.asStateFlow()",{"type":44,"value":489},". Never leak ",{"type":38,"tag":53,"props":491,"children":493},{"className":492},[],[494],{"type":44,"value":495},"MutableStateFlow",{"type":44,"value":239},{"type":38,"tag":53,"props":498,"children":500},{"className":499},[],[501],{"type":44,"value":502},"MutableSharedFlow",{"type":44,"value":504}," from an API.",{"type":38,"tag":93,"props":506,"children":507},{},[508,524],{"type":38,"tag":97,"props":509,"children":510},{},[511,517,518],{"type":38,"tag":53,"props":512,"children":514},{"className":513},[],[515],{"type":44,"value":516},"withContext(Dispatchers.IO)",{"type":44,"value":239},{"type":38,"tag":53,"props":519,"children":521},{"className":520},[],[522],{"type":44,"value":523},"Default",{"type":44,"value":525}," for blocking \u002F CPU work inside suspend. Encapsulate dispatcher choice in the repository \u002F data-source layer — not at call sites.",{"type":38,"tag":93,"props":527,"children":528},{},[529,534,535,541,543,549,550,556,557,563,565,571],{"type":38,"tag":97,"props":530,"children":531},{},[532],{"type":44,"value":533},"Immutability by default",{"type":44,"value":137},{"type":38,"tag":53,"props":536,"children":538},{"className":537},[],[539],{"type":44,"value":540},"val",{"type":44,"value":542}," over ",{"type":38,"tag":53,"props":544,"children":546},{"className":545},[],[547],{"type":44,"value":548},"var",{"type":44,"value":60},{"type":38,"tag":53,"props":551,"children":553},{"className":552},[],[554],{"type":44,"value":555},"List",{"type":44,"value":542},{"type":38,"tag":53,"props":558,"children":560},{"className":559},[],[561],{"type":44,"value":562},"MutableList",{"type":44,"value":564}," in public API, ",{"type":38,"tag":53,"props":566,"children":568},{"className":567},[],[569],{"type":44,"value":570},"copy()",{"type":44,"value":572}," on data classes instead of mutation.",{"type":38,"tag":93,"props":574,"children":575},{},[576,581],{"type":38,"tag":97,"props":577,"children":578},{},[579],{"type":44,"value":580},"Named arguments for 3+ parameters",{"type":44,"value":582}," — prevents silent argument swaps at call sites.",{"type":38,"tag":77,"props":584,"children":586},{"id":585},"must-not-do",[587],{"type":44,"value":588},"MUST NOT DO",{"type":38,"tag":271,"props":590,"children":591},{},[592,621,646,667,691,720,751,775,807,846],{"type":38,"tag":93,"props":593,"children":594},{},[595,605,607,613,614,620],{"type":38,"tag":97,"props":596,"children":597},{},[598,600],{"type":44,"value":599},"No ",{"type":38,"tag":53,"props":601,"children":603},{"className":602},[],[604],{"type":44,"value":324},{"type":44,"value":606}," without a commented reason. Refactor to ",{"type":38,"tag":53,"props":608,"children":610},{"className":609},[],[611],{"type":44,"value":612},"?.let { }",{"type":44,"value":239},{"type":38,"tag":53,"props":615,"children":617},{"className":616},[],[618],{"type":44,"value":619},"requireNotNull(x) { \"why\" }",{"type":44,"value":127},{"type":38,"tag":93,"props":622,"children":623},{},[624,636,638,644],{"type":38,"tag":97,"props":625,"children":626},{},[627,628,634],{"type":44,"value":599},{"type":38,"tag":53,"props":629,"children":631},{"className":630},[],[632],{"type":44,"value":633},"runBlocking",{"type":44,"value":635}," in production",{"type":44,"value":637}," — only in ",{"type":38,"tag":53,"props":639,"children":641},{"className":640},[],[642],{"type":44,"value":643},"main",{"type":44,"value":645}," and tests. Inside a suspend function it's always a bug.",{"type":38,"tag":93,"props":647,"children":648},{},[649,665],{"type":38,"tag":97,"props":650,"children":651},{},[652,653,658,659],{"type":44,"value":599},{"type":38,"tag":53,"props":654,"children":656},{"className":655},[],[657],{"type":44,"value":447},{"type":44,"value":239},{"type":38,"tag":53,"props":660,"children":662},{"className":661},[],[663],{"type":44,"value":664},"GlobalScope.async",{"type":44,"value":666}," — leaks, no structured cancellation.",{"type":38,"tag":93,"props":668,"children":669},{},[670,681,683,689],{"type":38,"tag":97,"props":671,"children":672},{},[673,675,680],{"type":44,"value":674},"No swallowing ",{"type":38,"tag":53,"props":676,"children":678},{"className":677},[],[679],{"type":44,"value":462},{"type":44,"value":127},{"type":44,"value":682}," ",{"type":38,"tag":53,"props":684,"children":686},{"className":685},[],[687],{"type":44,"value":688},"try\u002Fcatch(Exception)",{"type":44,"value":690}," without a cancellation rethrow silently disables cancellation.",{"type":38,"tag":93,"props":692,"children":693},{},[694,718],{"type":38,"tag":97,"props":695,"children":696},{},[697,698,704,705,711,713],{"type":44,"value":599},{"type":38,"tag":53,"props":699,"children":701},{"className":700},[],[702],{"type":44,"value":703},".first()",{"type":44,"value":239},{"type":38,"tag":53,"props":706,"children":708},{"className":707},[],[709],{"type":44,"value":710},".single()",{"type":44,"value":712}," on a hot ",{"type":38,"tag":53,"props":714,"children":716},{"className":715},[],[717],{"type":44,"value":66},{"type":44,"value":719}," without a timeout — a source that never emits hangs the coroutine forever.",{"type":38,"tag":93,"props":721,"children":722},{},[723,735,737,742,744,750],{"type":38,"tag":97,"props":724,"children":725},{},[726,727,733],{"type":44,"value":599},{"type":38,"tag":53,"props":728,"children":730},{"className":729},[],[731],{"type":44,"value":732},"async { }.await()",{"type":44,"value":734}," sequentially",{"type":44,"value":736}," when you want parallelism — it's the same as calling ",{"type":38,"tag":53,"props":738,"children":740},{"className":739},[],[741],{"type":44,"value":58},{"type":44,"value":743}," directly. Use ",{"type":38,"tag":53,"props":745,"children":747},{"className":746},[],[748],{"type":44,"value":749},"coroutineScope { val a = async { .. }; val b = async { .. }; a.await() + b.await() }",{"type":44,"value":127},{"type":38,"tag":93,"props":752,"children":753},{},[754,773],{"type":38,"tag":97,"props":755,"children":756},{},[757,758,764,765,771],{"type":44,"value":599},{"type":38,"tag":53,"props":759,"children":761},{"className":760},[],[762],{"type":44,"value":763},"Dispatchers.Main",{"type":44,"value":239},{"type":38,"tag":53,"props":766,"children":768},{"className":767},[],[769],{"type":44,"value":770},"Dispatchers.IO",{"type":44,"value":772}," references from common \u002F multiplatform code",{"type":44,"value":774}," unless the module is JVM-only.",{"type":38,"tag":93,"props":776,"children":777},{},[778,790,792,798,799,805],{"type":38,"tag":97,"props":779,"children":780},{},[781,783,789],{"type":44,"value":782},"No platform-type leaks (",{"type":38,"tag":53,"props":784,"children":786},{"className":785},[],[787],{"type":44,"value":788},"String!",{"type":44,"value":374},{"type":44,"value":791}," in public API — annotate Java interop returns with ",{"type":38,"tag":53,"props":793,"children":795},{"className":794},[],[796],{"type":44,"value":797},"@NotNull",{"type":44,"value":239},{"type":38,"tag":53,"props":800,"children":802},{"className":801},[],[803],{"type":44,"value":804},"@Nullable",{"type":44,"value":806}," on the Java side, or cast explicitly.",{"type":38,"tag":93,"props":808,"children":809},{},[810,821,823,829,830,836,838,844],{"type":38,"tag":97,"props":811,"children":812},{},[813,815],{"type":44,"value":814},"No catching ",{"type":38,"tag":53,"props":816,"children":818},{"className":817},[],[819],{"type":44,"value":820},"Throwable",{"type":44,"value":822}," — you'll catch ",{"type":38,"tag":53,"props":824,"children":826},{"className":825},[],[827],{"type":44,"value":828},"OutOfMemoryError",{"type":44,"value":60},{"type":38,"tag":53,"props":831,"children":833},{"className":832},[],[834],{"type":44,"value":835},"StackOverflowError",{"type":44,"value":837},", and cancellation. Use ",{"type":38,"tag":53,"props":839,"children":841},{"className":840},[],[842],{"type":44,"value":843},"Exception",{"type":44,"value":845}," and rethrow cancellation.",{"type":38,"tag":93,"props":847,"children":848},{},[849,861,863,869],{"type":38,"tag":97,"props":850,"children":851},{},[852,853,859],{"type":44,"value":599},{"type":38,"tag":53,"props":854,"children":856},{"className":855},[],[857],{"type":44,"value":858},"lateinit var",{"type":44,"value":860}," on primitives or nullable types",{"type":44,"value":862}," — compile error. Use ",{"type":38,"tag":53,"props":864,"children":866},{"className":865},[],[867],{"type":44,"value":868},"Delegates.notNull()",{"type":44,"value":870}," for primitives.",{"type":38,"tag":77,"props":872,"children":874},{"id":873},"reference-guide",[875],{"type":44,"value":876},"Reference Guide",{"type":38,"tag":878,"props":879,"children":880},"table",{},[881,900],{"type":38,"tag":882,"props":883,"children":884},"thead",{},[885],{"type":38,"tag":886,"props":887,"children":888},"tr",{},[889,895],{"type":38,"tag":890,"props":891,"children":892},"th",{},[893],{"type":44,"value":894},"Load when",{"type":38,"tag":890,"props":896,"children":897},{},[898],{"type":44,"value":899},"File",{"type":38,"tag":901,"props":902,"children":903},"tbody",{},[904,922,945],{"type":38,"tag":886,"props":905,"children":906},{},[907,913],{"type":38,"tag":908,"props":909,"children":910},"td",{},[911],{"type":44,"value":912},"Async \u002F reactive code — coroutines, Flow, StateFlow\u002FSharedFlow, cancellation, testing",{"type":38,"tag":908,"props":914,"children":915},{},[916],{"type":38,"tag":53,"props":917,"children":919},{"className":918},[],[920],{"type":44,"value":921},"references\u002Fcoroutines.md",{"type":38,"tag":886,"props":923,"children":924},{},[925,936],{"type":38,"tag":908,"props":926,"children":927},{},[928,930],{"type":44,"value":929},"API design — scope functions, value\u002Fdata\u002Fsealed classes, extension functions, inline\u002Freified, delegates, ",{"type":38,"tag":53,"props":931,"children":933},{"className":932},[],[934],{"type":44,"value":935},"Result\u003CT>",{"type":38,"tag":908,"props":937,"children":938},{},[939],{"type":38,"tag":53,"props":940,"children":942},{"className":941},[],[943],{"type":44,"value":944},"references\u002Fidioms.md",{"type":38,"tag":886,"props":946,"children":947},{},[948,953],{"type":38,"tag":908,"props":949,"children":950},{},[951],{"type":44,"value":952},"Gradle \u002F tooling — Kotlin DSL, version catalogs, KSP vs kapt, multi-module layout, compiler plugins",{"type":38,"tag":908,"props":954,"children":955},{},[956],{"type":38,"tag":53,"props":957,"children":959},{"className":958},[],[960],{"type":44,"value":961},"references\u002Fbuild-setup.md",{"type":38,"tag":77,"props":963,"children":965},{"id":964},"output-format",[966],{"type":44,"value":967},"Output Format",{"type":38,"tag":47,"props":969,"children":970},{},[971],{"type":44,"value":972},"When producing code:",{"type":38,"tag":89,"props":974,"children":975},{},[976,981,986],{"type":38,"tag":93,"props":977,"children":978},{},[979],{"type":44,"value":980},"A short plan (1–3 bullets) of what's changing.",{"type":38,"tag":93,"props":982,"children":983},{},[984],{"type":44,"value":985},"The code.",{"type":38,"tag":93,"props":987,"children":988},{},[989],{"type":44,"value":990},"A checklist of the non-obvious MUST rules applied.",{"type":38,"tag":47,"props":992,"children":993},{},[994],{"type":44,"value":995},"When reviewing code: call out MUST-DO \u002F MUST-NOT violations explicitly and suggest the minimal fix.",{"items":997,"total":1126},[998,1014,1023,1032,1043,1053,1066,1075,1084,1094,1103,1116],{"slug":999,"name":999,"fn":1000,"description":1001,"org":1002,"tags":1003,"stars":1011,"repoUrl":1012,"updatedAt":1013},"mps-aspect-accessories","configure JetBrains MPS module dependencies","Wire MPS module and model dependencies, used languages, used devkits, extended languages, runtime solutions, accessory models, and language\u002Fdependency versions. Use when adding\u002Fremoving module dependencies, importing languages or devkits into a model, declaring runtime solutions, or shipping accessory content visible to consumers without explicit import.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1004,1007,1010],{"name":1005,"slug":1006,"type":15},"Architecture","architecture",{"name":1008,"slug":1009,"type":15},"Configuration","configuration",{"name":20,"slug":21,"type":15},1650,"https:\u002F\u002Fgithub.com\u002FJetBrains\u002FMPS","2026-07-17T06:06:57.311661",{"slug":1015,"name":1015,"fn":1016,"description":1017,"org":1018,"tags":1019,"stars":1011,"repoUrl":1012,"updatedAt":1022},"mps-aspect-actions","define and edit MPS node factories","Use when defining or editing MPS node factories (the \"actions\" aspect) — `NodeFactories` roots, per-concept `NodeFactory` setup functions that initialize a freshly created node and optionally copy data from a replaced `sampleNode`, plus the actions aspect's `CopyPasteHandlers` and `PasteWrappers` roots. Reach for this skill when a substitution, side transform, completion replacement, or `add new initialized(...)` should preserve fields from the node it is replacing, or when defaults set in a constructor are not enough.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1020,1021],{"name":1005,"slug":1006,"type":15},{"name":20,"slug":21,"type":15},"2026-07-17T06:04:48.066901",{"slug":1024,"name":1024,"fn":1025,"description":1026,"org":1027,"tags":1028,"stars":1011,"repoUrl":1012,"updatedAt":1031},"mps-aspect-behavior","define and edit MPS concept behavior","Use when defining or editing MPS `ConceptBehavior` — per-concept methods (non-virtual \u002F virtual \u002F abstract \u002F static \u002F virtual static), constructors, virtual dispatch (MRO), super and interface-default calls (`super\u003CInterface>.method`), overriding methods from `lang.core.behavior` interfaces such as `ScopeProvider.getScope` \u002F `INamedConcept.getName` \u002F `BaseConcept.getPresentation`, calling sibling methods (`LocalBehaviorMethodCall`) and behavior methods from other aspects via `node.method(...)`. Reach for this skill whenever the task involves authoring or modifying `\u003Clang>\u002FlanguageModels\u002Fbehavior.mps`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1029,1030],{"name":1005,"slug":1006,"type":15},{"name":20,"slug":21,"type":15},"2026-07-13T06:45:21.757084",{"slug":1033,"name":1033,"fn":1034,"description":1035,"org":1036,"tags":1037,"stars":1011,"repoUrl":1012,"updatedAt":1042},"mps-aspect-constraints","define JetBrains MPS language constraints","Use when defining or editing MPS language constraints — property validators \u002F setters \u002F getters, referent search scopes (imperative or inherited via `ScopeProvider.getScope`), `referentSetHandler` side effects, default-scope blocks, `canBeChild` \u002F `canBeParent` \u002F `canBeAncestor` \u002F `canBeRoot` placement rules, `defaultConcreteConcept` for abstract concepts, `set \u003Cread-only>` and `{name}` aliasing, and scope helpers (`SimpleRoleScope`, `ListScope`, `CompositeScope`, `HidingByNameScope`). Reach for this skill whenever the task involves authoring or modifying `\u003Clang>\u002FlanguageModels\u002Fconstraints.mps`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1038,1039],{"name":1005,"slug":1006,"type":15},{"name":1040,"slug":1041,"type":15},"Code Analysis","code-analysis","2026-07-23T05:41:33.639365",{"slug":1044,"name":1044,"fn":1045,"description":1046,"org":1047,"tags":1048,"stars":1011,"repoUrl":1012,"updatedAt":1052},"mps-aspect-dataflow","define and debug MPS dataflow builders","Use when defining or debugging MPS dataflow builders for a concept — control\u002Fdata flow declarations that drive reachability analysis and variable-use checking. Covers DataFlowBuilderDeclaration, BuilderBlock, emit instructions (code for, jump, ifjump, label, read, write, ret, mayBeUnreachable), positions (AfterPosition, BeforePosition, LabelPosition), the jetbrains.mps.lang.dataFlow language, the NodeParameter implicit, BL+smodel usage inside builder bodies, and IBuilderMode for advanced analyses such as nullable\u002Fnon-null tracking.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1049],{"name":1050,"slug":1051,"type":15},"Data Analysis","data-analysis","2026-07-13T06:45:19.114674",{"slug":1054,"name":1054,"fn":1055,"description":1056,"org":1057,"tags":1058,"stars":1011,"repoUrl":1012,"updatedAt":1065},"mps-aspect-editor","define MPS editor layouts","Use when creating or changing MPS editor definitions — the overall workflow from scaffolding a `ConceptEditorDeclaration` through componentizing reusable `EditorComponentDeclaration`s, refining cell models and cell layouts, applying style sheets and indent-layout style items, wiring smart references, leveraging inheritance via super-concepts and interfaces, inspecting (`print_node_json`, `show_node_representation`) and validating (`check_root_node_problems`). Covers `jetbrains.mps.lang.editor` cell models (`CellModel_RefNode`\u002F`CellModel_RefNodeList`\u002F`CellModel_RefCell`\u002F`CellModel_Property`\u002F`CellModel_Constant`), layout choices, and JSON blueprints for common editor shapes. For the non-layout side (action maps, keymaps, transformation\u002Fsubstitute menus) use `mps-aspect-editor-menus-and-keymaps`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1059,1062],{"name":1060,"slug":1061,"type":15},"Design","design",{"name":1063,"slug":1064,"type":15},"UI Components","ui-components","2026-07-23T05:41:56.638151",{"slug":1067,"name":1067,"fn":1068,"description":1069,"org":1070,"tags":1071,"stars":1011,"repoUrl":1012,"updatedAt":1074},"mps-aspect-editor-menus-and-keymaps","author MPS editor menus and keymaps","Use when authoring the **non-layout** parts of the MPS editor aspect — what happens when the user types, presses a key, triggers completion, pastes, or invokes a context action. Covers action maps (`CellActionMapDeclaration`), cell keymaps (`CellKeyMapDeclaration`), transformation menus (`TransformationMenu_Default` \u002F `_Named` \u002F `_Contribution`), substitute menus (`SubstituteMenu_Default` \u002F `SubstituteMenu` \u002F contributions), side transforms (LEFT\u002FRIGHT), legacy cell menus, paste wrappers and copy-paste handlers (in the actions language), completion styling, reference presentation, two-step deletion, and the editor selection API. Trigger terms: `actionMap`, `keyMap`, `delete_action_id`, `transformationMenu`, `substituteMenu`, `Ctrl+Space`, `Ctrl+Alt+B`, side transform, paste wrapper, completion styling, `PasteWrappers`, `CopyPasteHandlers`. For the **layout** side (cells, layouts, style sheets) use `mps-aspect-editor` instead.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1072,1073],{"name":20,"slug":21,"type":15},{"name":1063,"slug":1064,"type":15},"2026-07-23T05:41:49.666535",{"slug":1076,"name":1076,"fn":1077,"description":1078,"org":1079,"tags":1080,"stars":1011,"repoUrl":1012,"updatedAt":1083},"mps-aspect-generation-plan","modify MPS generation plans","Use when defining or modifying an MPS generation plan — explicit ordering of generators, checkpoints for cross-model reference resolution, forks for parallel branches, IncludePlan composition, conditional PlanContribution activation, ParameterEquals\u002FConceptListSelector fork selectors, and InitModelAttributes for targetFacet routing. Apply when working with @genplan models, the jetbrains.mps.lang.generator.plan language, attaching plans via DevKits or the Custom generation facet, or debugging cross-model mapping label resolution.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1081,1082],{"name":1005,"slug":1006,"type":15},{"name":20,"slug":21,"type":15},"2026-07-13T06:44:59.507855",{"slug":1085,"name":1085,"fn":1086,"description":1087,"org":1088,"tags":1089,"stars":1011,"repoUrl":1012,"updatedAt":1093},"mps-aspect-generator","define JetBrains MPS generator rules","Use when defining or modifying MPS generators — author a generator module, add or edit root\u002Freduction\u002Fweaving\u002Fpattern mapping rules, attach template macros ($COPY_SRC, $LOOP, $IF, $PROPERTY, $REF, $SWITCH, $MAP_SRC, $WEAVE, $INSERT, $LABEL, $TRACE, $VAR), wire mapping labels, build template switches, write pre\u002Fpost mapping scripts, navigate `genContext`, or debug \"rule didn't fire\", missing references, empty output, infinite reduction loops, and generated-Java compile failures.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1090,1091,1092],{"name":1005,"slug":1006,"type":15},{"name":1040,"slug":1041,"type":15},{"name":20,"slug":21,"type":15},"2026-07-17T06:06:58.042999",{"slug":1095,"name":1095,"fn":1096,"description":1097,"org":1098,"tags":1099,"stars":1011,"repoUrl":1012,"updatedAt":1102},"mps-aspect-intentions","define and edit MPS intentions","Use when defining or editing MPS intentions (the Alt+Enter context-action aspect) — adding `IntentionDeclaration` roots, parameterized or surround-with variants, description\u002FisApplicable\u002Fexecute blocks, child-filter functions, factory-initialized AST splicing, or debugging why an intention is not offered. Lives in the language's `intentions` model and uses `jetbrains.mps.lang.intentions`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1100,1101],{"name":1005,"slug":1006,"type":15},{"name":20,"slug":21,"type":15},"2026-07-23T05:41:48.692899",{"slug":1104,"name":1104,"fn":1105,"description":1106,"org":1107,"tags":1108,"stars":1011,"repoUrl":1012,"updatedAt":1115},"mps-aspect-migrations","author and debug MPS migration scripts","Use when authoring or debugging MPS migration scripts that upgrade user models after a language definition changes — covers jetbrains.mps.lang.migration (MigrationScript class-based, PureMigrationScript declarative, MoveConcept\u002FMoveContainmentLink\u002FMoveReferenceLink\u002FMoveProperty, ordering via OrderDependency, data exchange via putData\u002FgetData, RefactoringLog, ConceptMigrationReference) and jetbrains.mps.lang.script Enhancement Scripts (MigrationScript with MigrationScriptPart_Instance, ExtractInterfaceMigration, FactoryMigrationScriptPart, CommentMigrationScriptPart) — when a model needs version-gated upgrade, concept rename or removal, link or property rename, instance-level transformation, or composition of migration steps.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1109,1112],{"name":1110,"slug":1111,"type":15},"Debugging","debugging",{"name":1113,"slug":1114,"type":15},"Migration","migration","2026-07-13T06:45:20.372122",{"slug":1117,"name":1117,"fn":1118,"description":1119,"org":1120,"tags":1121,"stars":1011,"repoUrl":1012,"updatedAt":1125},"mps-aspect-structure-concepts","define concepts in MPS structure aspect","Define concepts, interface concepts, enumerations, and constrained data types in an MPS language's `structure` aspect. Covers smart-reference detection, alias rules, cardinality, INamedConcept usage, bulk creation, and the full `mps_mcp_alter_structure` \u002F `mps_mcp_query_structure` reference. Use when authoring or modifying a language's structure model.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1122],{"name":1123,"slug":1124,"type":15},"Data Modeling","data-modeling","2026-07-23T05:41:30.705975",188,{"items":1128,"total":1221},[1129,1143,1159,1171,1177,1194,1204],{"slug":1130,"name":1130,"fn":1131,"description":1132,"org":1133,"tags":1134,"stars":22,"repoUrl":23,"updatedAt":1142},"android","build Android applications with Kotlin","Senior Android engineer workflows — Kotlin-first (Java legacy supported), Jetpack Compose + View system, MVVM, Coroutines\u002FFlow, Room, Retrofit, Hilt, plus device orchestration via plugin tools (device management, logcat, crash reports, app run) and mobile-mcp for UI interaction (element tree, taps, swipes). Use when implementing features, debugging crashes, fixing builds, writing tests, reviewing Android code, or running QA on an emulator.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1135,1137,1138,1139],{"name":1136,"slug":1130,"type":15},"Android",{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"name":1140,"slug":1141,"type":15},"Mobile","mobile","2026-07-13T06:45:38.239419",{"slug":1144,"name":1144,"fn":1145,"description":1146,"org":1147,"tags":1148,"stars":22,"repoUrl":23,"updatedAt":1158},"context7","search library and framework documentation","Up-to-date library and framework documentation via Context7 MCP. Use when setup, API, or version-specific questions require current documentation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1149,1152,1155],{"name":1150,"slug":1151,"type":15},"Documentation","documentation",{"name":1153,"slug":1154,"type":15},"MCP","mcp",{"name":1156,"slug":1157,"type":15},"Reference","reference","2026-07-17T06:07:06.49579",{"slug":1160,"name":1160,"fn":1161,"description":1162,"org":1163,"tags":1164,"stars":22,"repoUrl":23,"updatedAt":1170},"java-engineer","write and refactor modern Java code","Java 17–25 policy and pitfalls. Use when writing, reviewing, or refactoring Java code — enforces idioms around records, sealed types, switch exhaustiveness, Optional, virtual threads, and null-safety that LLMs frequently get wrong.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1165,1166,1167],{"name":1040,"slug":1041,"type":15},{"name":20,"slug":21,"type":15},{"name":1168,"slug":1169,"type":15},"Java","java","2026-07-13T06:45:44.594223",{"slug":4,"name":4,"fn":5,"description":6,"org":1172,"tags":1173,"stars":22,"repoUrl":23,"updatedAt":24},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1174,1175,1176],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":1178,"name":1178,"fn":1179,"description":1180,"org":1181,"tags":1182,"stars":22,"repoUrl":23,"updatedAt":1193},"laravel-engineer","build and architect Laravel applications","Use when working on Laravel projects. Covers architecture decisions (Services vs Actions), thin controllers, Form Requests, API Resources, and API versioning. Enforces Larastan verification after code generation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1183,1186,1187,1190],{"name":1184,"slug":1185,"type":15},"Backend","backend",{"name":20,"slug":21,"type":15},{"name":1188,"slug":1189,"type":15},"Laravel","laravel",{"name":1191,"slug":1192,"type":15},"PHP","php","2026-07-13T06:45:47.16012",{"slug":1195,"name":1195,"fn":1196,"description":1197,"org":1198,"tags":1199,"stars":22,"repoUrl":23,"updatedAt":1203},"php-engineer","write and refactor modern PHP code","Modern PHP 8.x policy and pitfalls. Use when writing, reviewing, or refactoring PHP code — enforces strict types, enum\u002Freadonly\u002Fmatch\u002FDNF policy, PHPStan discipline, and catches the subtle traps (type coercion, mixed abuse, readonly mutation through references, enum serialization, fiber lifecycle, PDO emulation) that LLMs get wrong by default.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1200,1201,1202],{"name":1040,"slug":1041,"type":15},{"name":20,"slug":21,"type":15},{"name":1191,"slug":1192,"type":15},"2026-07-13T06:45:32.210657",{"slug":1205,"name":1205,"fn":1206,"description":1207,"org":1208,"tags":1209,"stars":22,"repoUrl":23,"updatedAt":1220},"redis-best-practices","implement Redis best practices","Redis policy & pitfalls — key naming, atomicity, TTL strategy, distributed locks, cache patterns, production traps. Use when designing Redis-backed caches, locks, queues, rate limiters, or sessions. Covers the traps LLMs get wrong by default: SETNX + EX (deprecated), KEYS on production, Pub\u002FSub no-persistence, HGETALL on big hashes, maxmemory-policy defaults, cluster hash tags, RDB fork memory.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1210,1213,1214,1217],{"name":1211,"slug":1212,"type":15},"Database","database",{"name":20,"slug":21,"type":15},{"name":1215,"slug":1216,"type":15},"Performance","performance",{"name":1218,"slug":1219,"type":15},"Redis","redis","2026-07-13T06:45:48.502742",9]