Logotipo de Setting Up Compose Hotswan

Setting Up Compose Hotswan

Comunidad
skydoves
setting-up-compose-hotswan

Usa esta habilidad para instalar y verificar Compose HotSwan de principio a fin, de modo que el desarrollador pase de cero a tener un hot reload funcional en menos de un segundo en un dispositivo real o emulador, en una sola sesión. Incluye la instalación del plugin para IDE de JetBrains, la configuración del plugin de Gradle `com.github.skydoves.compose.hotswan.compiler`, el bloque DSL habitual `hotSwanCompiler { enabled = true; debugOnly = true }`, el flujo de trabajo de la ventana de herramientas de HotSwan y la primera verificación de guardar y recargar. Actívala cuando el usuario mencione HotSwan, hot reload de Compose, actualización instantánea de la interfaz, «guardar y ver», «sin recompilar», edición en directo en el dispositivo o iteración rápida con Compose; también si ya tiene instalado el plugin de JetBrains y pregunta cómo aplicar el plugin del compilador de Gradle.

Add to TypingMind

Descripción general

Editorskydoves
Repositoriocompose-performance-skills
Nombre de la habilidadsetting-up-compose-hotswan
Estrellas
515
Forks
19
Archivos incluidos
Solo instrucciones
LicenciaApache-2.0
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Todo en las instrucciones

    Todo lo que necesita el modelo está en las instrucciones: no hay archivos adicionales que sincronizar.

  • Código abierto

    Publicada por skydoves en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Setting Up Compose Hotswan en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/skydoves/compose-performance-skills/tree/main/hot-reload/setting-up-compose-hotswan
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/skydoves/compose-performance-skills.git /tmp/compose-performance-skills
mkdir -p .claude/skills
cp -r /tmp/compose-performance-skills/hot-reload/setting-up-compose-hotswan .claude/skills/setting-up-compose-hotswan
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Setting Up Compose Hotswan en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Setting Up Compose Hotswan automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Setting Up Compose Hotswan no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

Setting Up Compose HotSwan: zero to sub-second reload on a real device

Compose HotSwan is a JetBrains IDE plugin plus a Gradle compiler plugin that swaps changed Kotlin classes into a running Compose app on a real device or emulator in under one second, preserving navigation, scroll, and remember state. This skill installs both pieces, wires the canonical Gradle DSL with debugOnly = true, and verifies the first save-to-reload round-trip. Sibling skills cover what does and does not hot-reload (../understanding-hot-reload-limits/SKILL.md), state preservation across reloads, and the AI-driven iteration loop.

Versions verified at the time of authoring. Confirm against the current release notes for newer minors.

When to use this skill

  • The developer mentions HotSwan, hot reload, instant UI update, "save and see", "no rebuild", live edit, or fast Compose iteration on device.
  • The developer has the HotSwan JetBrains Marketplace plugin installed and asks how to apply the Gradle compiler plugin.
  • A team is onboarding a new project to HotSwan and wants the canonical libs.versions.toml + root build + app build wiring.
  • The developer just installed the IDE plugin and the tool window status is stuck before WATCHING.

When NOT to use this skill

  • The question is about JetBrains' own Live Edit or Apply Changes features. HotSwan and those are separate products with different boundaries; do not conflate.
  • The question is about Compose Preview rendering inside the IDE. HotSwan targets the running app on a real device or emulator, not preview canvases.
  • The question is about which changes hot-reload vs force a rebuild. See ../understanding-hot-reload-limits/SKILL.md.
  • The question is about preserving complex state across reloads. See the state-preservation sibling skill (out of scope here).

Prerequisites

  • Android Studio 2024.3+ or IntelliJ IDEA 2024.3+.
  • Kotlin 2.0+ with the org.jetbrains.kotlin.plugin.compose Gradle plugin already applied on the Compose modules.
  • Gradle 8+.
  • A real device or emulator with USB debugging enabled and visible to adb devices.
  • The HotSwan IDE plugin installed from JetBrains Marketplace (https://plugins.jetbrains.com/plugin/30551-compose-hotswan/).

Workflow

  1. Declare the plugin in libs.versions.toml so the version pins centrally:

    toml
    [plugins]
    hotswan-compiler = { id = "com.github.skydoves.compose.hotswan.compiler", version = "1.2.10" }

    Pin 1.2.10 (latest verified at the time of authoring). Check the HotSwan releases page for newer stable versions before adopting; HotSwan iterates frequently and a newer minor often ships compatibility for a newer Compose runtime. The plugin id is com.github.skydoves.compose.hotswan.compiler exactly. Do not swap the com.github prefix for any other vendor namespace; HotSwan is published under com.github.skydoves.

  2. Apply at the root build.gradle.kts with apply false so the plugin is resolved once but only attaches to modules that opt in:

    kotlin
    plugins {
        alias(libs.plugins.hotswan.compiler) apply false
    }
  3. Apply in each Compose app module's build.gradle.kts:

    kotlin
    plugins {
        alias(libs.plugins.android.application)
        alias(libs.plugins.kotlin.android)
        alias(libs.plugins.kotlin.compose)
        alias(libs.plugins.hotswan.compiler)
    }
  4. Configure the canonical DSL block in the same module file. The capital S in hotSwanCompiler is part of the identifier:

    kotlin
    hotSwanCompiler {
        enabled = true
        debugOnly = true
    }

    debugOnly = true is the default and the rule for production. Release builds MUST NOT carry the HotSwan transformations.

  5. Sync Gradle. The build should resolve without errors. Confirm the plugin attached by inspecting the build's plugin list (./gradlew :app:buildEnvironment or the IDE Gradle tool window).

  6. Open the HotSwan tool window via View -> Tool Windows -> HotSwan. Click Start. The status indicator should change to READY.

  7. Run the app normally with the Run action. Once the app process connects, the tool window status moves from READY to WATCHING.

  8. Make a body-only edit and save. Change the color or text inside one composable function body, then save the file. The change should appear on device in under one second; navigation, scroll position, and remember values stay intact.

  9. If the change does not appear, fall through to the troubleshooting checklist below before changing any Gradle configuration.

Patterns

Pattern: configure with debugOnly true (production safety)

kotlin
// WRONG
hotSwanCompiler {
    enabled = true
}
// WRONG because: omitting `debugOnly = true` allows the HotSwan transformations to attach to release
// builds. They are diagnostic-only and MUST NOT ship in production.
kotlin
// RIGHT
hotSwanCompiler {
    enabled = true
    debugOnly = true
}

Pattern: respect the capital S in the DSL block name

kotlin
// WRONG
hotswanCompiler {
    enabled = true
    debugOnly = true
}
// WRONG because: the extension is hotSwanCompiler with a capital S in the middle. Lowercase will
// not resolve and Gradle reports an unknown extension.
kotlin
// RIGHT
hotSwanCompiler {
    enabled = true
    debugOnly = true
}

Pattern: apply at root with apply false, in modules with alias(...)

kotlin
// WRONG (root build.gradle.kts)
plugins {
    alias(libs.plugins.hotswan.compiler)
}
// WRONG because: applying at the root project triggers the compiler plugin everywhere, including
// modules without Compose. Use apply false at the root and alias(...) inside each Compose module.
kotlin
// RIGHT (root build.gradle.kts)
plugins {
    alias(libs.plugins.hotswan.compiler) apply false
}
kotlin
// RIGHT (app/build.gradle.kts; Compose module)
plugins {
    alias(libs.plugins.android.application)
    alias(libs.plugins.kotlin.android)
    alias(libs.plugins.kotlin.compose)
    alias(libs.plugins.hotswan.compiler)
}

hotSwanCompiler {
    enabled = true
    debugOnly = true
}

Pattern: do not depend on HotSwan at the source level

kotlin
// WRONG
import com.github.skydoves.compose.hotswan.runtime.HotReloadable

@HotReloadable
@Composable
fun Greeting() { Text("Hello") }
// WRONG because: HotSwan is a build-time and IDE-time tool. Production code must not import
// HotSwan runtime classes or annotations; the Gradle plugin attaches transformations during
// compilation without requiring source-level coupling.
kotlin
// RIGHT
@Composable
fun Greeting() { Text("Hello") }

Pattern: canonical three-file setup (paste-ready)

toml
# gradle/libs.versions.toml
[plugins]
hotswan-compiler = { id = "com.github.skydoves.compose.hotswan.compiler", version = "1.2.10" }
kotlin
// build.gradle.kts (root)
plugins {
    alias(libs.plugins.android.application) apply false
    alias(libs.plugins.kotlin.android) apply false
    alias(libs.plugins.kotlin.compose) apply false
    alias(libs.plugins.hotswan.compiler) apply false
}
kotlin
// app/build.gradle.kts
plugins {
    alias(libs.plugins.android.application)
    alias(libs.plugins.kotlin.android)
    alias(libs.plugins.kotlin.compose)
    alias(libs.plugins.hotswan.compiler)
}

hotSwanCompiler {
    enabled = true
    debugOnly = true
}

Troubleshooting

  • Status stuck at READY after Run. The device is not connected. Run adb devices and confirm the device or emulator is listed; reconnect USB or restart the emulator.
  • Status WATCHING but no reload on save. The save was a structural change (parameter, constructor, interface, inline function, new resource id). Cross-link ../understanding-hot-reload-limits/SKILL.md to identify the boundary.
  • Reload happens but state is lost. The change cascaded to a tier-2 (composition reset) or tier-3 (Activity.recreate()) recomposition. Cross-link the state-preservation sibling skill once available.
  • The hotSwanCompiler { ... } block does not resolve. Gradle did not sync after adding the plugin. Re-sync; verify Kotlin 2.0+ is the active Kotlin version on the module; verify the alias matches the entry in libs.versions.toml.

Mandatory rules

  • MUST set debugOnly = true. HotSwan transformations are diagnostic-only and MUST NOT ship in release builds.
  • MUST apply the Gradle plugin only on Compose modules. Apply at the root project with apply false so non-Compose modules are not transformed.
  • MUST NOT depend on HotSwan classes at the source level. No annotations, no runtime imports. HotSwan is a build-time and IDE-time tool; production code stays pure.
  • MUST NOT mix HotSwan with a stale Compose Compiler. Verify org.jetbrains.kotlin.plugin.compose is applied on Kotlin 2.0+ before adding HotSwan.
  • MUST pin the HotSwan version in libs.versions.toml so all Compose modules in the project use a single version. The latest verified version is 1.2.10; check hotswan.dev/docs/releases for newer stable releases before pinning.
  • PREFERRED: combine HotSwan with the AI iteration loop sibling skill (../iterating-with-ai-and-mcp/SKILL.md) once the developer is comfortable with manual hot reload and wants Claude to drive the edit-reload-screenshot cycle via MCP.

Verification

  • ./gradlew :app:buildEnvironment lists the com.github.skydoves.compose.hotswan.compiler plugin among applied plugins.
  • The HotSwan tool window status reads WATCHING after the app launches with Run.
  • Editing a Text color inside a composable and saving the file changes the color on device within one second.
  • remember values, scroll position, and the navigation back stack survive the change.
  • A release build (./gradlew :app:assembleRelease) does not include HotSwan transformations. Verify by confirming debugOnly = true is set, or by inspecting the release dex with dexdump for the absence of HotSwan-injected helper classes.
  • No production source file in the module imports a com.github.skydoves.compose.hotswan.* symbol (grep -R "com.github.skydoves.compose.hotswan" src/main/ returns zero hits).

References

Preguntas frecuentes

¿Qué hace la habilidad de IA Setting Up Compose Hotswan?

Usa esta habilidad para instalar y verificar Compose HotSwan de principio a fin, de modo que el desarrollador pase de cero a tener un hot reload funcional en menos de un segundo en un dispositivo real o emulador, en una sola sesión. Incluye la instalación del plugin para IDE de JetBrains, la configuración del plugin de Gradle `com.github.skydoves.compose.hotswan.compiler`, el bloque DSL habitual `hotSwanCompiler { enabled = true; debugOnly = true }`, el flujo de trabajo de la ventana de herramientas de HotSwan y la primera verificación de guardar y recargar. Actívala cuando el usuario menci...

¿Por qué usar Setting Up Compose Hotswan en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Setting Up Compose Hotswan está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Setting Up Compose Hotswan en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/skydoves/compose-performance-skills/tree/main/hot-reload/setting-up-compose-hotswan. TypingMind lee el archivo SKILL.md de esa carpeta e instala su contenido como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Setting Up Compose Hotswan?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Setting Up Compose Hotswan?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Setting Up Compose Hotswan con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Setting Up Compose Hotswan?

Sí. skydoves la ha publicado en GitHub bajo la licencia Apache-2.0. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇