kotlin-specialist
Use when writing idiomatic Kotlin — coroutines and Flow, KMP, Compose, Ktor, DSLs. Triggers on: "Kotlin coroutines", "코루틴", "코틀린으로 전환", "Flow 취소 처리". Not for Spring Java backends or Android XML layouts.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- kotlin-specialist
- license
- MIT
- metadata
- { "role": "specialist", "scope": "implementation", "domain": "language", "version": "1.1.0", "triggers": "Kotlin, coroutines, suspend function, Flow, KMP, Kotlin Multiplatform, Compose, Ktor, Android Kotlin", "output-format": "code", "related-skills": "test-master, spring-boot-engineer" }
- scenarios
- [ "Help me write idiomatic Kotlin code using coroutines for async processing", "Convert this Java class to Kotlin and apply Kotlin best practices", "Design a Kotlin DSL for our configuration system", "코틀린으로 코루틴 기반 비동기 처리를 구현해줘", "자바 코드를 코틀린으로 전환하고 관용구를 적용해줘" ]
- description
- Use when writing idiomatic Kotlin — coroutines and Flow, KMP, Compose, Ktor, DSLs. Triggers on: "Kotlin coroutines", "코루틴", "코틀린으로 전환", "Flow 취소 처리". Not for Spring Java backends or Android XML layouts.
- compatibility
- { "optional": [ "think-tool" ], "recommended": [], "remote_mcp_note": "think-tool이 있으면 코루틴 스코프 설계와 취소 전파 전략을 더 체계적으로 검토합니다. Claude 설정 → MCP Servers에서 remote SSE 엔드포인트를 추가하세요." }
02 资源文件 69
- 参考文档AGENTS.md79.8 KB
- 参考文档agents/lint-qa.md1.0 KB
- 参考文档README.md3.3 KB
- 参考文档references/android-compose.md5.4 KB
- 参考文档references/coroutines-flow.md5.9 KB
- 参考文档references/dsl-idioms.md5.1 KB
- 参考文档references/key-patterns.md1.5 KB
- 参考文档references/ktor-server.md5.1 KB
- 参考文档references/multiplatform-kmp.md4.9 KB
- 参考文档rules/_sections.md1.5 KB
- 参考文档rules/_template.md631 B
- 参考文档rules/advanced-event-handler-refs.md1.4 KB
- 参考文档rules/advanced-init-once.md958 B
- 参考文档rules/advanced-use-latest.md1.0 KB
- 参考文档rules/async-api-routes.md1.1 KB
- 参考文档rules/async-defer-await.md2.0 KB
- 参考文档rules/async-dependencies.md1.3 KB
- 参考文档rules/async-parallel.md654 B
- 参考文档rules/async-suspense-boundaries.md2.5 KB
- 参考文档rules/bundle-barrel-imports.md2.3 KB
- 参考文档rules/bundle-conditional.md949 B
- 参考文档rules/bundle-defer-third-party.md920 B
- 参考文档rules/bundle-dynamic-imports.md791 B
- 参考文档rules/bundle-preload.md1.1 KB
- 参考文档rules/client-event-listeners.md1.9 KB
- 参考文档rules/client-localstorage-schema.md1.9 KB
- 参考文档rules/client-passive-event-listeners.md1.6 KB
- 参考文档rules/client-swr-dedup.md1.1 KB
- 参考文档rules/interaction-queryspec-registration.md6.5 KB
- 参考文档rules/js-batch-dom-css.md3.2 KB
- 参考文档rules/js-cache-function-results.md1.9 KB
- 参考文档rules/js-cache-property-access.md532 B
- 参考文档rules/js-cache-storage.md1.6 KB
- 参考文档rules/js-combine-iterations.md753 B
- 参考文档rules/js-early-exit.md1.1 KB
- 参考文档rules/js-hoist-regexp.md1.0 KB
- 参考文档rules/js-index-maps.md837 B
- 参考文档rules/js-length-check-first.md1.7 KB
- 参考文档rules/js-min-max-loop.md2.2 KB
- 参考文档rules/js-set-map-lookups.md532 B
- 参考文档rules/js-tosorted-immutable.md1.7 KB
- 参考文档rules/rendering-activity.md564 B
- 参考文档rules/rendering-animate-svg-wrapper.md1.2 KB
- 参考文档rules/rendering-conditional-render.md980 B
- 参考文档rules/rendering-content-visibility.md815 B
- 参考文档rules/rendering-hoist-jsx.md1.0 KB
- 参考文档rules/rendering-hydration-no-flicker.md2.3 KB
- 参考文档rules/rendering-hydration-suppress-warning.md872 B
- 参考文档rules/rendering-svg-precision.md588 B
- 参考文档rules/rendering-usetransition-loading.md2.0 KB
- 参考文档rules/rerender-defer-reads.md973 B
- 参考文档rules/rerender-dependencies.md824 B
- 参考文档rules/rerender-derived-state-no-effect.md1.2 KB
- 参考文档rules/rerender-derived-state.md728 B
- 参考文档rules/rerender-functional-setstate.md2.9 KB
- 参考文档rules/rerender-lazy-state-init.md2.0 KB
- 参考文档rules/rerender-memo-with-default-value.md1.1 KB
- 参考文档rules/rerender-memo.md1.1 KB
- 参考文档rules/rerender-move-effect-to-event.md1.2 KB
- 参考文档rules/rerender-simple-expression-in-memo.md1018 B
- 参考文档rules/rerender-transitions.md1.0 KB
- 参考文档rules/rerender-use-ref-transient-values.md1.7 KB
- 参考文档rules/server-after-nonblocking.md2.0 KB
- 参考文档rules/server-auth-actions.md2.6 KB
- 参考文档rules/server-cache-lru.md1.3 KB
- 参考文档rules/server-cache-react.md2.2 KB
- 参考文档rules/server-dedup-props.md2.0 KB
- 参考文档rules/server-parallel-fetching.md1.5 KB
- 参考文档rules/server-serialization.md996 B
03 SKILL.md 正文
Standing Mandates
- NEVER call code idiomatic, null-safe or cancellation-safe by reading it. A cancellation bug shows only when a scope
is cancelled mid-flight, so run
detekt,ktlintand arunTestthat cancels the scope, and quote the results. A tool you could not run is writtennot run: <tool>. - NEVER launch from
GlobalScopeor keep a scope alive past its owner: the coroutine outlives the screen or request that started it and its failures reach nobody. - NEVER swallow
CancellationException(a barecatch (e: Exception)around a suspend call does): the cancelled coroutine keeps running. Rethrow it. - NEVER write
!!without a comment stating the contract, and NEVER callrunBlockingoutsidemainand tests: the first turns a type-checked null into a runtime crash, the second blocks a thread the dispatcher needs. - Missing facts (target platforms, Kotlin and coroutines versions, shared-code boundary) are read from the build files
first; what stays unknown is written
[확인 필요: ○○], never assumed. - Goal: the change passes
detektandktlint, every scope it opens has a cancellation test, and the closing tally recounts to a grep of the touched files.
Kotlin Specialist
Not for a Spring Boot Java backend (develop:spring-boot-engineer), Android XML layouts (this skill covers
Compose), a full coverage plan (develop:test-master), or a failing build with an unknown cause
(develop:bug-diagnoser).
Process
- Analyze — read the build files; establish target platforms, where concurrency lives, how much code is shared.
- Model — sealed hierarchies, data classes, nullability in the types (
references/key-patterns.md). - Implement — coroutines, Flow, extension functions; each scope has a named owner that cancels it on teardown.
- Lint — run
detektandktlint(agent contract:agents/lint-qa.md); fix every violation. - Optimize — value classes, sequences, inlining, only where a measurement supports them.
- Test —
runTestplus Turbine for Flow emissions, one test that cancels each scope; run every KMP target. - Recount — grep the touched files for
GlobalScope,runBlocking,!!, and scope builders (CoroutineScope(,launch,async); match each scope to a cancellingrunTest; fix the tally if it differs.
Output Template
## <task>
1. Models: sealed hierarchies, data classes
2. Implementation: coroutine / Flow code
3. Tests: runTest + Turbine, including cancellation
4. Idioms applied: one line each, with why
Open: [확인 필요: ○○] ...
Verified: detekt <n> violations · ktlint <n> · tests <pass>/<total> · scopes <s>, cancellation-tested <c>
Left: GlobalScope <n> · runBlocking <n> · `!!` without contract <n>
What Claude Does / What You Do
| Claude | You |
|---|---|
| Writes coroutine and Flow scaffolding with owned scopes | Provide domain logic and requirements |
| Designs sealed state hierarchies | Confirm they match the real UI states |
| Lays out KMP expect/actual structure | Run tests on each platform target |
Flags !!, GlobalScope, swallowed cancellation |
Decide domain null contracts |
Reference Guide
| Topic | File | Read it when |
|---|---|---|
| Core patterns | references/key-patterns.md |
Sealed state, Flow in a repository, catching around suspend, null safety |
| Language idioms | references/dsl-idioms.md |
@DslMarker builders, scope functions, delegation, value classes, inline |
| Concurrency | references/coroutines-flow.md |
Scope ownership, dispatchers, cancellation, hot/cold flows, runTest |
| Server-side | references/ktor-server.md |
Modules, routes, status pages, JWT, Exposed, WebSockets, testApplication |
| Shared code | references/multiplatform-kmp.md |
Source sets, Gradle targets, expect/actual vs interfaces, iOS, publishing |
| Android UI | references/android-compose.md |
State hoisting, ViewModel, effects, lazy lists, navigation, theming |
Related Skills
develop:spring-boot-engineer— Kotlin used inside a Spring Boot servicedevelop:test-master— coverage plan for Kotlin/KMP modulesdevelop:bug-diagnoser— a coroutine bug whose cause is not yet proven
04 同仓库更多 Skills
diagram
Use when something must be drawn as a checked figure, not Mermaid: page layout, B-tree, lock timeline, ER, benchmark chart, architecture, sequence. SVG + PNG. Triggers: "도식화해줘", "그림으로 그려줘", "책에 넣을 그림", "시퀀스 다이어그램", "draw this as a figure".
test-master
Use when writing, improving, or auditing tests, or writing case specs with expected results from a spec. Triggers: "테스트 작성", "테스트 케이스 작성", "test case writing", "단위 테스트", "커버리지 분석", "test plan", "defect report".
sre-engineer
Use when setting up production reliability practices. Triggers on: "SLO 정하고 싶어", "에러 버짓", "알람 피로", "반복 작업(toil) 줄이기", "golden signals dashboard", "burn-rate alert". Not for active incidents or chaos tests.
sql-pro
Use when someone needs help writing or rewriting SQL — authoring complex joins, CTEs, window functions, or recursive queries — or designing a schema from scratch, normalizing an existing one, or migrating queries between database dialects.
spring-boot-engineer
Use when building or extending a Spring Boot 3.x Java backend — REST, Spring Security, JPA, WebFlux, Actuator. Triggers on: "Spring Boot API", "스프링 시큐리티 설정", "JPA 연동". Not for service decomposition or query tuning.
spec-driven-development
Use when a feature should be specified before it is coded — stories, acceptance criteria, tasks, a per-criterion check. Triggers: "스펙 먼저", "명세부터 쓰고 구현", "수용 기준 먼저", "spec first", "spec-driven development".