android-weather-adaptive-theminglisted
Install: claude install-skill rajedev/AIWeatherApp
# Weather-Adaptive Theming (Compose)
The goal: exactly **one** place decides "what does hot/sunny/rainy/cloudy/winter/night look like," and every screen or component consumes that decision the same way — never a per-screen `if (condition == "Rain") Color.Blue else ...` scattered across composables. When a new screen, widget, or mood gets added later, it plugs into the existing system instead of forking it.
## Core mental model
```
Weather data (condition, temp, local hour)
│
▼
resolveMood(...) ── ONE function, pure, deterministic
│
▼
WeatherMood enum value
│
▼
toThemeColors() ── ONE mapping, mood → colors/icon
│
▼
CompositionLocal or shared ViewModel state ── exposed app-wide
│
▼
Every screen/component reads from the SAME theme source
(hero card, app bar tint, widget background, notification accent — all of it)
```
## 1. Mood resolution — factors in more than just the condition string
```kotlin
enum class WeatherMood { HOT, SUNNY, RAINY, CLOUDY, WINTER, NIGHT }
fun resolveMood(conditionMain: String, currentTemp: Double, localHour: Int): WeatherMood = when {
// Night check first — a "clear" sky at 2am shouldn't theme as SUNNY
localHour !in 6..18 && conditionMain in setOf("Clear", "Clouds") -> WeatherMood.NIGHT
currentTemp >= 35 -> WeatherMood.HOT
currentTemp <= 5 || conditionMain == "Snow" -> WeatherMood.WINTER
conditionMain in setOf("Rain", "Drizzle", "Thund