# twitter/compose-rules

Static checks to aid with a healthy adoption of Compose

Repository: https://github.com/twitter/compose-rules
Canonical: https://ross.abutalabs.com/products/compose-rules
Homepage: https://twitter.github.io/compose-rules
Language: Kotlin
License: NOASSERTION
License Family: other
Topics: android, jetpack-compose, ktlint, static-code-analysis
Last push: 2023-12-30T22:41:41+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 1561, "days_push": 977, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1380, forks 105 (observed 2026-08-28T04:04:33.871902+00:00)

## What it is
A collection of static analysis rules for Jetpack Compose, shipped as custom ktlint rules and a Detekt plugin, that detect common Compose pitfalls before code review. Built by Twitter to help large teams adopt Compose with consistent, healthy patterns.

## Use cases
- lint jetpack compose code for common pitfalls
- catch compose recomposition performance issues early
- enforce compose best practices across an android team
- add compose rules to ktlint
- run compose checks with detekt
- flag composable antipatterns before human code review

## When to choose
- Your Android team is adopting Jetpack Compose and wants automated enforcement of composable best practices
- You already use ktlint or Detekt and want Compose-specific rules integrated into your existing setup
- You want Compose issues surfaced in the build pipeline rather than relying on reviewers to catch them

## When to avoid
- Your project does not use Jetpack Compose, e.g. view-based Android or non-UI Kotlin code
- You need rules for Android's own lint system rather than ktlint or Detekt
- You need runtime fixes or behavior changes - these are purely static checks

## Facets
- artifact type: library
- maturity: active
- function: linter, code-review
- domain: developer-tools, mobile-development, android-tools
- platform: jvm
- tags: jetpack-compose, ktlint, detekt, static-analysis, kotlin, code-quality, composables, android

## Member repositories
- twitter/compose-rules (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:33.871902+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:40:16.589461+00:00, confidence not recorded.
  - readme: https://github.com/twitter/compose-rules (fetched 2026-08-28T04:04:33.871902+00:00, sha ee0abbd2da16)
  - homepage: https://twitter.github.io/compose-rules (fetched 2026-08-29T11:56:12.093827+00:00, sha 8b9715f42eb3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
