Compose Multiplatform Patterns
monta-app/ocpp-emulator
Compose Multiplatform and Jetpack Compose patterns for KMP projects — state management, navigation, theming, performance, and platform-specific UI.
A skill your agent uses when writing or reviewing Kotlin branching and control flow: when expressions, guard conditions, sealed type exhaustiveness, smart casts, nullable branching, early returns…
$ npx skills add chrisbanes/skills --skill kotlin-control-flow -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install chrisbanes/skills kotlin-control-flow --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/chrisbanes/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/kotlin-control-flow .claude/skills/kotlin-control-flow && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "kotlin-control-flow" agent skill from https://github.com/chrisbanes/skills/tree/main/skills/kotlin-control-flow into .claude/skills/kotlin-control-flow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "kotlin-control-flow", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/chrisbanes/skills/tree/main/skills/kotlin-control-flowType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add chrisbanes/skills --skill kotlin-control-flow -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install chrisbanes/skills kotlin-control-flow --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/chrisbanes/skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/kotlin-control-flow .agents/skills/kotlin-control-flow && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "kotlin-control-flow" agent skill from https://github.com/chrisbanes/skills/tree/main/skills/kotlin-control-flow into .agents/skills/kotlin-control-flow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "kotlin-control-flow", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add chrisbanes/skills --skill kotlin-control-flow -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install chrisbanes/skills kotlin-control-flow --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/chrisbanes/skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/kotlin-control-flow .cursor/skills/kotlin-control-flow && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "kotlin-control-flow" agent skill from https://github.com/chrisbanes/skills/tree/main/skills/kotlin-control-flow into .cursor/skills/kotlin-control-flow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "kotlin-control-flow", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/chrisbanes/skills.git --path skills/kotlin-control-flow--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add chrisbanes/skills --skill kotlin-control-flow -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install chrisbanes/skills kotlin-control-flow --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/chrisbanes/skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/kotlin-control-flow .gemini/skills/kotlin-control-flow && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "kotlin-control-flow" agent skill from https://github.com/chrisbanes/skills/tree/main/skills/kotlin-control-flow into .gemini/skills/kotlin-control-flow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "kotlin-control-flow", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install chrisbanes/skills kotlin-control-flowInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add chrisbanes/skills --skill kotlin-control-flow -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/chrisbanes/skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/kotlin-control-flow .github/skills/kotlin-control-flow && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "kotlin-control-flow" agent skill from https://github.com/chrisbanes/skills/tree/main/skills/kotlin-control-flow into .github/skills/kotlin-control-flow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "kotlin-control-flow", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add chrisbanes/skills --skill kotlin-control-flow -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install chrisbanes/skills kotlin-control-flow --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/chrisbanes/skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/kotlin-control-flow .opencode/skills/kotlin-control-flow && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "kotlin-control-flow" agent skill from https://github.com/chrisbanes/skills/tree/main/skills/kotlin-control-flow into .opencode/skills/kotlin-control-flow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "kotlin-control-flow", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
kotlin-control-flowA skill your agent uses when writing or reviewing Kotlin branching and control flow: when expressions, guard conditions, sealed type exhaustiveness, smart casts, nullable branching, early returns…
Kotlin Control Flow is an agent skill from chrisbanes/skills. Use when writing or reviewing Kotlin branching and control flow: when expressions, guard conditions, sealed type exhaustiveness, smart casts, nullable branching, early returns, or replacing complex if/else chains.
Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Mobile, covering Android development. It works with Kotlin. The repository describes itself as: Skills for Kotlin, Jetpack Compose, and Android development. The licence is Apache-2.0.
7 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 00bda52. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are kotlin).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Kotlin Control Flow loads about 1.2k tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 544 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from chrisbanes/skills at commit 00bda52, republished under its Apache-2.0 licence (© chrisbanes). 544 words, ~1,165 tokens.
.claude/skills/kotlin-control-flow/SKILL.md (or your agent's skills folder).Make the classified value obvious, keep branch-local predicates on their branch, and let the compiler prove closed-domain coverage.
Name the value being classified. If every branch tests it, use
when (subject); otherwise keep a subjectless when or if chain.
Choose the branch shape:
| Code shape | Prefer |
|---|---|
| One classified value | when (subject) |
| Unrelated boolean conditions | Subjectless when or if/else |
| Primary case plus a branch-local predicate | Guard condition |
| Invalid input before the main path | Early return, require, or check |
| Closed value-returning domain | Exhaustive when expression |
| Open input or deliberate fallback | Explicit else |
Use a guard only on a subject when, after a primary condition, when the
extra predicate belongs to that branch and an unguarded branch still handles
the primary condition. Put the guarded branch first. Split comma-separated
conditions instead of guarding one of them.
For a closed enum, Boolean, sealed type, or nullable closed type, name every
case and omit else. Match objects by value and class/data-class subtypes
with is. When a data-bearing sealed case is collapsed by a catch-all, show
the branch-level use in the review:
is Outcome.Failed -> safeFailureLabel(outcome.reason)The is check smart-casts outcome, so the branch can use reason without
a cast. The helper name is illustrative; choose a safe mapping for the
caller contract. Do not replace this branch-level explanation with a note
that unspecified callers can inspect the original result. If the input is
an open server/platform value or needs real fallback/logging, keep else.
Use an early return only when it removes invalid or nullable state from the main path. Keep nesting that expresses cleanup, transaction, or error handling.
Verify smart casts still work without as, !!, mutable temporaries, or
duplicate casts. If they do not, keep the original shape or take a smaller
refactor.
Compile and test. On failure, return to the smallest applicable earlier step or retain the prior shape. In a review of a closed sealed mapping, when a data-bearing subtype affects the mapping or its safe handling, put the typed branch and member access in the finding itself, not only in analysis or as a general note to add explicit cases. Use this pseudocode template with the actual subtype and payload member substituted:
is <DataSubtype> -> map(result.<payload>)This is a template, not literal Kotlin: the is test smart-casts result,
and the member access shows how the branch uses its payload. If the public
value stays generic, state how the branch handles the detail or why it is
deliberately discarded. Naming cases alone or sending callers to inspect the
original value is not complete branch guidance. Apply this only to closed,
data-bearing cases; retain else for open-world values or real fallbacks.
Finish when the subject, fallbacks, and relevant branch data are obvious to a
reader and the resulting shape is easier to scan.
Use guarded branches to refine one case, rather than nesting an if:
return when (event) {
is Event.Message if event.isUnread -> Row.Highlighted(event.message)
is Event.Message -> Row.Normal(event.message)
Event.Empty -> Row.Empty
}Use a subject when when repeated conditions classify one value, and include
null as a branch when it is one case in a larger classification:
return when (val selected = selection) {
null -> SelectionUi.None
is Selection.Single if selected.item.isArchived -> SelectionUi.Archived(selected.item)
is Selection.Single -> SelectionUi.Active(selected.item)
is Selection.Multiple -> SelectionUi.Count(selected.items.size)
}Do not introduce guards on unsupported Kotlin versions, force unrelated boolean
checks into a subject when, remove an open-world fallback, or flatten code
that obscures cleanup, transactions, or errors.
© chrisbanes, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/kotlin-control-flow of chrisbanes/skills.
Open the folder on GitHubat commit 00bda52
Kotlin Control Flow next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Kotlin Control Flow this skillchrisbanes/skills | 1.1k | — | ~1.2k | Automated safety check: Pass | Apache-2.0 | |
| Compose Multiplatform Patternsmonta-app/ocpp-emulator | 180 | 5 repos | ~2k | Automated safety check: Pass | Apache-2.0 | |
| Kotlin Patternsgetknit/knit | 132 | 5 repos | ~4.7k | Automated safety check: Pass | GPL-3.0 | |
| Summoncodeyousef/summon | 167 | — | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| Add JSON Schemayontrack/yontrack | 102 | — | ~883 | Automated safety check: Pass | MIT | |
| Add Ktnip Parameter Strategyvendelieu/telegram-bot | 249 | — | ~613 | Automated safety check: Pass | Apache-2.0 |
monta-app/ocpp-emulator
Compose Multiplatform and Jetpack Compose patterns for KMP projects — state management, navigation, theming, performance, and platform-specific UI.
getknit/knit
Idiomatic Kotlin patterns, best practices, and conventions for building robust, efficient, and maintainable Kotlin applications with coroutines, null safety, and DSL builders.
codeyousef/summon
A skill your agent uses when developing applications with the Summon Kotlin Multiplatform UI framework.
yontrack/yontrack
Add a new downloadable JSON schema to the Resources page — Kotlin provider class only, auto-discovered by Spring.
vendelieu/telegram-bot
Adds a new parameter resolution strategy to the ktnip KSP processor.
cometchat/cometchat-skills
Builds chat on Android with your own UI against the headless CometChat Chat SDK v5, covering install, Jetifier conflicts, credentials and init-before-login ordering.
chrisbanes/skills
A skill your agent uses when planning to execute Gradle through gradle, ./gradlew, or a custom gradlew wrapper script, or diagnosing a Gradle build, compact workflow ledger, repeated failure…
chrisbanes/skills
A skill your agent uses when writing or reviewing Jetpack Compose motion: visibility enter/exit, animating one property toward a target, color or size transitions, multiple properties from one…
chrisbanes/skills
A skill your agent uses when writing or reviewing Jetpack Compose UI tests, screenshot tests or baseline-recording evidence, previews, semantics assertions, fake image loading, keyboard input, focus…
chrisbanes/skills
A skill your agent uses when preparing, publishing, or checking readiness for a Kotlin library release, including verifying its gradle-maven-publish-plugin prerequisite, reconciling changelogs and…
chrisbanes/skills
A skill your agent uses when asked to set up, review, or operate a repository's GitHub Project workflow, including ready claims, role-labelled human work, unknown remote mutation outcomes, Todo…
chrisbanes/skills
A skill your agent uses when designing or reviewing reusable Jetpack Compose component APIs with modifier parameters, root layout placement, caller-provided variable content, primitive content…
Works with
Categories
A skill your agent uses when writing or reviewing Kotlin branching and control flow: when expressions, guard conditions, sealed type exhaustiveness, smart casts, nullable branching, early returns…. Kotlin Control Flow is an agent skill from chrisbanes/skills. Use when writing or reviewing Kotlin branching and control flow: when expressions, guard conditions, sealed type exhaustiveness, smart casts, nullable branching, early returns, or replacing complex if/else chains.
Kotlin Control Flow fits situations like: reviewing Kotlin branching and control flow: when expressions; guard conditions; sealed type exhaustiveness; nullable branching.
Run `npx skills add chrisbanes/skills --skill kotlin-control-flow -a claude-code`. Or copy the skill folder (skills/kotlin-control-flow in chrisbanes/skills) into .claude/skills/kotlin-control-flow in your project. Claude Code loads it when a task matches its description.
Run `npx skills add chrisbanes/skills --skill kotlin-control-flow -a codex`. Or copy the skill folder (skills/kotlin-control-flow in chrisbanes/skills) into .agents/skills/kotlin-control-flow in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add chrisbanes/skills --skill kotlin-control-flow -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/kotlin-control-flow, .gemini/skills/kotlin-control-flow, .github/skills/kotlin-control-flow and .opencode/skills/kotlin-control-flow in your project.
SKILL.md names no scripts, command-line tools or credentials: Kotlin Control Flow is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Kotlin Control Flow is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.2k tokens (SKILL.md is roughly 4.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Kotlin Control Flow: Compose Multiplatform Patterns (monta-app/ocpp-emulator, 180 stars), Kotlin Patterns (getknit/knit, 132 stars), Summon (codeyousef/summon, 167 stars) and Add JSON Schema (yontrack/yontrack, 102 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
chrisbanes (a GitHub user) maintains it in chrisbanes/skills, which has 1,093 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 8, 2026.
Source: chrisbanes/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.