Instruction file imported from Compiled-Platforms/kotlin-multiplatform-library-template (
.cursor/rules/development-process/skill-context.mdc). Copyright stays with the author.
Skill Context
Always select and read the appropriate skill before starting work. Re-evaluate as the task context changes — if the context shifts, switch skills before continuing.
When activating or switching to a skill, always announce it explicitly to the user, e.g.: "Using skill: write-code" or "Switching to skill: debug".
When a CI task spans multiple concerns, read the primary CI skill first, then read any secondary CI skills required by the task before making changes. For example: a Docker image release requires both ci-releases and ci-security; an embedded firmware release may require ci-embedded, ci-releases, and ci-observability.
Auto-switch to debug
Switch to the debug skill immediately — before continuing any other work — when any of these occur:
- The user pastes error output (stack trace, exception, Gradle failure, CI log, test failure, linter error)
- A shell command you run exits non-zero or prints clear failure output
- The user asks to debug, fix an error, or explain why something failed
Do not propose fixes until you have read the error and identified the failing command, test, or file.
Maintenance
This rule must be kept in sync with the skills available in .cursor/skills/. Update the table below whenever a skill is added, removed, or renamed.
Skill Table
| Context | Skill |
|---|---|
| Investigating bugs, failures, CI errors, pasted error output, or failed commands | .cursor/skills/debug/SKILL.md |
| Writing or modifying production Kotlin code | .cursor/skills/write-code/SKILL.md |
| Writing or modifying test files | .cursor/skills/write-tests/SKILL.md |
| Creating a commit or drafting a commit message | .cursor/skills/make-commit/SKILL.md |
| Publishing or releasing a library | .cursor/skills/publish-library/SKILL.md |
| Configuring publishing for a new library | .cursor/skills/setup-publishing/SKILL.md |
| Adding, updating, or removing dependencies (and keeping .gitignore in sync) | .cursor/skills/maintain-gitignore/SKILL.md |
| Planning a feature or breaking down a task | .cursor/skills/implementation-checklist/SKILL.md |
| Designing or refactoring CI pipeline structure, jobs, or workflows | .cursor/skills/ci-workflow/SKILL.md |
| Optimizing CI for speed, cost, caching, or artifact reuse | .cursor/skills/ci-performance/SKILL.md |
| Configuring CI security, secrets, permissions, or supply chain | .cursor/skills/ci-security/SKILL.md |
| Adding or improving CI quality gates (lint, scan, API compat, size checks) | .cursor/skills/ci-quality-gates/SKILL.md |
| Setting up or modifying release pipelines, versioning, or publishing | .cursor/skills/ci-releases/SKILL.md |
| Improving CI observability, monitoring, or debugging pipelines | .cursor/skills/ci-observability/SKILL.md |
| Writing Dockerfiles, configuring container builds, or publishing images | .cursor/skills/ci-containers/SKILL.md |
| CI for embedded or IoT firmware builds, cross-compilation, or OTA | .cursor/skills/ci-embedded/SKILL.md |
| Adding motion, transitions, AnimatedVisibility, AnimatedContent, or gesture-driven animation in Compose | .cursor/skills/compose/compose-animation/SKILL.md |
| Triggering work tied to composition, managing resources, or choosing the right effect API (LaunchedEffect, DisposableEffect, SideEffect, etc.) | .cursor/skills/compose/compose-effects/SKILL.md |
| Building shared Compose UI across KMP targets, handling source set boundaries, lifecycle, or navigation | .cursor/skills/compose/compose-kmp/SKILL.md |
| Building or debugging UI structure, adaptive/responsive layouts, custom measurement, or lazy layouts | .cursor/skills/compose/compose-layout/SKILL.md |
| Extracting non-UI logic from composables into testable pure Kotlin (validation, state transitions, input handling) | .cursor/skills/compose/compose-logic-extraction/SKILL.md |
| Applying Material3 theming, color roles, typography, dark mode, or building a design system layer | .cursor/skills/compose/compose-material3/SKILL.md |
| Diagnosing janky screens, excessive recompositions, slow lazy lists, or measuring Compose performance | .cursor/skills/compose/compose-performance/SKILL.md |
| Designing or building library-quality reusable composables (Material/CMP file layout, slot APIs, Defaults/Colors, state hoisting, KDoc) | .cursor/skills/compose/compose-reusable-components/SKILL.md |
| Understanding recomposition, restart groups, stability, strong skipping, or snapshot state internals | .cursor/skills/compose/compose-runtime/SKILL.md |
| Managing UI state, lifting state, choosing state mechanisms, or debugging stale/incorrect state | .cursor/skills/compose/compose-state/SKILL.md |
| Writing Compose UI tests, testing composables in isolation, or auditing accessibility semantics | .cursor/skills/compose/compose-testing/SKILL.md |