android-compose-patterns

android-compose-patterns is a skill for Claude Code, Codex from makifbaysal/tasktrooper. It costs 50 tokens per session (1,743 once invoked), scanned A, original, Apache-2.0.

A set of patterns for Android interfaces built with Jetpack Compose, Google's Kotlin-based UI toolkit. It recommends stateless screen parts, shared components, and a separate holder for screen data and logic.

In plain words
What is it for?
Use it when building native Android screens with Compose. It covers state flow between screen components and a ViewModel, reusable components, adaptive layouts, and Material styling.
Why use it?
It keeps business rules and network work out of the visual code. It also makes loading, empty, error, and normal data states explicit instead of handling only the successful case.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when building native Android screens with Compose. It covers state flow between screen components and a ViewModel, reusable components, adaptive layouts, and Material styling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/makifbaysal/tasktrooper/android-compose-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add makifbaysal/tasktrooper --skill android-compose-patterns
Clone the repo
git clone --depth 1 https://github.com/makifbaysal/tasktrooper

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for android-compose-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/android-compose-patterns/github.svg)](https://agentmods.dev/skills/makifbaysal/tasktrooper/android-compose-patterns)
Your own site
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/android-compose-patterns"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/android-compose-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for android-compose-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/android-compose-patterns"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/android-compose-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,743 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.01743
Opus 5.5 $0.00020 $0.00697
Sonnet 5.5 $0.00010 $0.00349
Haiku 4.5 $0.00005 $0.00174

Measured 8d ago against content hash 91bab5f35b8e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

android-compose-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

catalog/agents/mobile-developer/skills/android-compose-patterns/SKILL.md · 113 lines

How it starts

The opening of the file, as written. The whole thing — 113 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Jetpack Compose Patterns

Overview

Native Android (Jetpack Compose) is chosen when a task needs deep Android integration or the app is already native (see native-vs-flutter-decision). Same discipline as Flutter/SwiftUI: small stateless composables, state hoisted out, reusable atomic components.

Core principle: Composables are stateless functions of state. State is hoisted to a ViewModel; composables emit events upward.

Rules

  • Stateless composables + state hoisting. A composable takes its state as parameters and exposes callbacks (onXxx) — it does not own app state. The screen-level composable connects a ViewModel to the stateless UI.
  • ViewModel owns state and logic, exposed as StateFlow/UiState; the composable collects it with collectAsStateWithLifecycle(). Networking/business rules live in the ViewModel + repository, never in the composable.
  • Model UI state as a sealed hierarchy: Loading | Data | Empty | Error — when over it renders every branch. No happy-path-only screens.
  • Atomic components: shared library of reusable composables (atoms → molecules → organisms). Reuse before building; grep before adding.
  • Material theme, not hardcoded values: MaterialTheme.colorScheme / typography / a spacing tokens object (MaterialTheme.spacing, see mobile-design-system-foundation) — never scattered Color(0xFF...) and magic dp. Support dark theme + dynamic color.
  • remember/derivedStateOf to avoid recomputation; hoist remembered state only when it's genuinely local (scroll, text field).
  • @Preview reusable composables in their key states, and across the matrix (see below).

Edge-to-edge (enforced from targetSdk 35)

  • Call enableEdgeToEdge() before setContent in the activity — the opt-out is gone at targetSdk 35+.
  • Consume insets at the Scaffold: use its innerPadding and Modifier.consumeWindowInsets(innerPadding) on the content so a nested scrollable doesn't double-apply it.
  • IME padding: apply Modifier.imePadding() once, at the container that should move with the keyboard — applying it a second time further down the tree produces extra empty space.
  • android:windowSoftInputMode="adjustResize" in the manifest for screens with text input.
  • NavigationSuiteScaffold does not automatically propagate its padding to the content slot — apply insets explicitly inside it, don't assume it's handled.

Read the full file on GitHub · 113 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 113 lines · 50 tokens per session scan A 91bab5f35b8e

Subscribe to this mod's changes

android-compose-patterns is a skill published in the GitHub repository makifbaysal/tasktrooper (113 stars, last pushed yesterday), licensed Apache-2.0. It adds 50 tokens to every session and 1,743 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-05.

Related

Other skills, from other repositories

architecture-design

Use this skill to design system architecture with documented trade-offs and decisions before any implementation begins. Activates when a feature, system, or component requires non-trivial structural decisions about how components interact, what data stores to use, or how to decompose a problem.

karthikrshet/aiskills · 60 tokens

wireframe

Produce low-fidelity black-and-white UI wireframes as SVGs or viewer pages. Use when asked to wireframe, sketch a screen, draft a layout, make a low-fi mockup, or publish wireframes.

paperclipai/paperclip · 47 tokens

hps-true-blueprint

OpenDesign's engineering blueprint: how the sandbox, sidecar, and daemon fit — the system diagram and the invariants. Built as a decision-grade product management deck for engineering org.

nexu-io/open-design · 44 tokens

gamified-app

A multi-frame gamified mobile-app prototype — three phone frames on a dark showcase stage. Frame 1: cover / poster, Frame 2: today's quests with XP ribbons and a level bar, Frame 3: quest detail. Vivid quest tiles, level ribbon, bottom tab bar. Use when the brief asks for a "gamified app", "habit tracker", "RPG-style…

nexu-io/open-design · 117 tokens

design-critique

Give a structured product design critique — user job clarity, hierarchy, affordance, error states, accessibility, and consistency — focused on what to change, in what order, and why.

paperclipai/paperclip · 42 tokens

wireframe-mobile-flow

A lo-fi multi-screen MOBILE flow wireframe — three or four phone frames laid out in a row on a board, showing a connected user flow (Onboarding → Home feed → Item detail → Confirm). Grey-box content inside each device, dashed connector arrows + numbered step labels between screens, and a couple of annotation callouts.…

nexu-io/open-design · 141 tokens