Skip to content
Back to skills

Compose Inspector

ASecurity

Use when developing, reviewing, or debugging Jetpack Compose UI layouts, state, and recomposition behavior.

  • 6 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 3, 2026
developmentdebuggingperformance

Security analysis

A100/100

Scanned September 20, 2026

npx -y skills add rabee-elkholy/android-agent-harness --skill compose-inspector --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Compose Inspector?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Compose Inspector
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/rabee-elkholy-compose-inspector/badge)](https://www.skillsdirectory.com/skills/rabee-elkholy-compose-inspector)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: compose-inspector
description: Use when developing, reviewing, or debugging Jetpack Compose UI layouts, state, and recomposition behavior.
version: 1.1.0
kernel-major: 1
---

# Compose Inspector & Layout Verifier

## 1. Composition & Performance Safety Checks
- **Stability**: Diagnose a recomposition problem with runtime observations or compiler reports before changing stability. `List`, `Set`, and `Map` are not proof of immutability. `@Immutable` and `@Stable` are compiler contracts, not transformations: use them only when all reachable values satisfy the immutability contract, or mutable public state notifies Compose and satisfies the stability contract. Check mutation through aliases and element types; prefer a correctly modeled type over an annotation that hides instability. See the [official stability guidance](https://developer.android.com/develop/ui/compose/performance/stability/fix).
- **Calculations**: Verify `remember` is used for expensive object allocations or formatting inside composables.
- **Fast-Changing State**: Use `derivedStateOf` when the derived result changes less often than its inputs (for example, a scroll threshold). It adds overhead and does not help when the UI needs every input update.
- **Lazy Lists**: Every `LazyColumn` / `LazyRow` must specify explicit `key` lambdas using unique, stable IDs (e.g., `key = { it.id }`).
- **State Hoisting**: Pass only immutable State and lambda callbacks down to leaf composables. Never pass `ViewModel` instances into reusable child components.

---

## 2. Layout & Localization Verification
- **RTL / LTR**: Strictly use directional modifiers: `Modifier.padding(start = ..., end = ...)` instead of `left`/`right`.
- **Theme & Design Tokens**: All colors and text styles must consume this app's theme tokens — `MaterialTheme.colorScheme` / `MaterialTheme.typography`. `colorResource(R.color…)` is allowed when matching existing XML colors. Never use raw hex colors or hardcoded fonts.
- **String Resources**: Put user-facing text in the owning module's resource source set. Follow the project's configured locales, qualifiers, fallback rules, and translation conventions; do not invent an Arabic locale or assume an application module.
- **Previews**: Add focused previews for changed states where the existing tooling supports them, using the project's theme. Cover supported locales and relevant layout directions; Arabic RTL and English LTR are examples only. A preview is not runtime or device verification, and unsupported previews must not trigger build-system changes outside the approved scope.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.