@chrisbanes/kotlin-flow-state-event-modeling

Use when writing or reviewing Kotlin Flow state and event APIs with StateFlow, MutableStateFlow.update, SharedFlow, Channel, stateIn, SharingStarted, .value, receiveAsFlow, one-shot events, or sentinel initial values.

View in AI SkillSafe app
Scanned · no findings
0 downloads
0 stars
0 demos
SKILL.md

Skills

A set of skills for Kotlin, Jetpack Compose, and Android development.

Install

With the skills CLI:

npx skills add chrisbanes/skills

Or install as a Claude Code plugin:

/plugin marketplace add chrisbanes/skills
/plugin install chrisbanes-skills@chrisbanes-skills

Or install as a Codex plugin:

codex plugin marketplace add chrisbanes/skills --ref main
codex plugin add chrisbanes-skills@chrisbanes-skills

Or install as an OpenCode plugin:

{
  "plugin": ["chrisbanes-skills@git+https://github.com/chrisbanes/skills.git"]
}

See .opencode/INSTALL.md for details.

Skills

Start here

Routing

Jetpack Compose

State and side effects

  • compose-state-authoring — author Compose local mutable state and read-only composable accessors correctly.
  • compose-state-hoisting — decide whether Compose UI element state belongs in local remember state, hoisted parameters, a plain state holder class, or a screen-level state holder.
  • compose-state-holder-ui-split — split Compose state-holder wiring from plain-state UI for previewable and testable screens.
  • compose-side-effects — choose and key Compose effect APIs for event Flow collection, callbacks, cleanup, navigation, snackbar, analytics, and other side effects.

Performance

UI API design and layout

  • compose-modifier-and-layout-style — keep Compose layout APIs caller-placeable and modifier chains readable.
  • compose-slot-api-pattern — design reusable Compose components whose variable visual regions are caller-provided slots.
  • compose-animations — choose Compose animation APIs for visibility, value targets, coordinated transitions, and content swaps; align with official quick guide and decision tree.
  • compose-focus-navigation — design and test keyboard, TV, D-pad, and focus-first Compose navigation behavior.

Testing

  • compose-ui-testing-patterns — choose between plain UI tests, semantics assertions, key/focus tests, interaction state tests with MutableInteractionSource, screenshot tests, and integration tests.

Kotlin

  • kotlin-coroutines-structured-concurrency — review coroutine scope ownership, init and fire-and-forget boundaries, cancellation handling, and blocking boundaries.
  • kotlin-control-flow — write and review Kotlin branching with subject when, guard conditions, sealed exhaustiveness, smart casts, nullable branching, and early returns.
  • kotlin-flow-state-event-modeling — model StateFlow, SharedFlow, Channel, stateIn, sharing policy, and one-shot events without lossy defaults.
  • kotlin-functions - choose the correct owner for member, top-level, extension, factory, and service functions; avoid extensions on primitive and common types by default.
  • kotlin-multiplatform-expect-actual — design semantic expect/actual and interface boundaries for Kotlin Multiplatform platform interop.
  • kotlin-types-value-class — choose @JvmInline value class over data class for single-field domain types, including Compose stability implications.

Workflows

  • to-plan — publish a repository-aware implementation plan for one ready GitHub issue with a provider-neutral implementation handoff.
  • run-github-project — plan and execute the next authorized issue or drain a configured GitHub Project through one planning lane and a bounded three-slot parallel implementation, CI, and review pipeline. Requires tdd and supports preferred review providers without depending on them.
  • shepherd — autonomously poll open PRs and MRs, triage review comments, detect and fix CI failures, and keep PRs moving forward.

Contributing

Skills live at skills/<skill-name>/SKILL.md, flat (no language nesting). The name: in the SKILL.md frontmatter must match the directory name.

Frontmatter is validated against skills.schema.jsonname and description are required, name must be kebab-case.

Releases

Release versions use SemVer-compatible CalVer: YYYY.M.D without zero-padded month or day values, for example 2026.6.17.

Keep .claude-plugin/plugin.json, .codex-plugin/plugin.json, and new Git release tags on the same version. Existing zero-padded tags from before this policy map to the non-padded manifest version, so 2026.06.16 maps to 2026.6.16. Only bump versions when publishing an installable release.

To publish a release, run the Release workflow from GitHub Actions. Leave the version input empty to use today's UTC YYYY.M.D version, or provide a specific non-zero-padded CalVer value. Use the dry-run option to validate without creating a commit, tag, or GitHub release.

Before pushing, lint skills (frontmatter schema + markdown):

npm install
npm run lint

This also runs on CI for all PRs.

License

Apache 2.0

Embed badges

Add these to your README to show the skill's verification status.

SkillSafe verified badge
Verified badge
[![SkillSafe verified badge](https://api.skillsafe.ai/v1/badge/@chrisbanes/kotlin-flow-state-event-modeling/verified)](https://skillsafe.ai/skill/@chrisbanes/kotlin-flow-state-event-modeling/)
Installs badge
Installs badge
[![Installs badge](https://api.skillsafe.ai/v1/badge/@chrisbanes/kotlin-flow-state-event-modeling/installs)](https://skillsafe.ai/skill/@chrisbanes/kotlin-flow-state-event-modeling/)
Scan badge
Scan badge
[![Scan badge](https://api.skillsafe.ai/v1/badge/@chrisbanes/kotlin-flow-state-event-modeling/scan)](https://skillsafe.ai/skill/@chrisbanes/kotlin-flow-state-event-modeling/)
Eval pass rate badge
Eval pass rate
[![Eval pass rate badge](https://api.skillsafe.ai/v1/badge/@chrisbanes/kotlin-flow-state-event-modeling/eval)](https://skillsafe.ai/skill/@chrisbanes/kotlin-flow-state-event-modeling/)