understanding-hot-reload-limits

Diagnoses which Kotlin and Compose changes hot-reload under Compose HotSwan and which force rebuilds.

Updated May 31, 2026
One-click install
npx skills add https://github.com/decoutkhanqindev/Lich-Viet-Loc-Phat --skill understanding-hot-reload-limits-decoutkhanqindev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: understanding-hot-reload-limits
Source: https://github.com/decoutkhanqindev/Lich-Viet-Loc-Phat/tree/main/.claude/skills/understanding-hot-reload-limits
Command: npx skills add https://github.com/decoutkhanqindev/Lich-Viet-Loc-Phat --skill understanding-hot-reload-limits-decoutkhanqindev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Android developers using Compose HotSwan lose their fast iteration loop when a change silently falls back to a full incremental rebuild. This Skill explains the Android Runtime (ART) class schema constraint behind that behavior so you can predict, diagnose, and avoid rebuild-forcing edits. ## Core Features & Use Cases - Boundary tables: Clear lists of hot-reloadable changes (function bodies, new composables, resource value edits) versus rebuild-forcing changes (signatures, constructors, interfaces, new resource ids, inline functions, lambda count changes). - Diagnosis workflow: A step-by-step process for reading the HotSwan tool window status, classifying a diff as body-only or schema change, and recovering the fast path. - Iteration ordering patterns: Concrete Kotlin and XML before/after examples showing how to batch signature and resource-id changes at the end of a session. - Use Case: A developer adds a parameter to a composable and the hot reload stops working. Use this Skill to identify the signature change as the cause, revert to body-only edits, and batch the parameter addition as the final save. ## Quick Start Ask why a specific Kotlin or Compose change triggered a full rebuild instead of hot-reloading under HotSwan.

Frequently Asked Questions about understanding-hot-reload-limits

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why did my Compose change trigger a full rebuild instead of hot reload?▼

A full rebuild happens when the change alters the class schema, which ART cannot redefine at runtime. Common causes are adding function parameters, changing constructors, modifying interfaces, adding new resource ids, editing inline functions, or changing the lambda count inside a function.

What Kotlin changes are supported by Compose HotSwan hot reload?▼

HotSwan hot-reloads composable and non-composable function body changes, new composables, reordered composables (1.2.0+), resource value edits, extension functions, and data class property additions on API 30+. Only method bodies are mutable at runtime under ART.

Why doesn't editing an inline function hot reload in Compose?▼

Inline functions are expanded at every call site at compile time, so there is no discrete unit to swap at runtime. Editing an inline body forces a full rebuild; drop the inline modifier during iteration and restore it before commit.

Does adding a new string resource hot reload on Android?▼

No, adding a new resource id grows the generated R class, which is a schema change ART cannot redefine, so it forces a rebuild. Editing the value of an existing string resource does hot-reload, so batch new ids first and iterate on values after.

Can I add a property to a Kotlin data class without a rebuild?▼

Adding a data class property hot-reloads only on devices running API 30 or higher, where ART supports that schema change. On API 29 and below the constructor change forces a full rebuild, so batch property additions when targeting older minSdk.

How do I keep a HotSwan session in the fast path during a refactor?▼

Order edits so body-only changes come first and hot-reload, then batch signature, constructor, interface, or new-resource-id changes into a final save that accepts one rebuild. Introduce new parameters once with a default value, then iterate on the body.