Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
new-silvermoon avatar

Coil Compose

  • 351 installs
  • 910 repo stars
  • Updated July 27, 2026
  • new-silvermoon/awesome-android-agent-skills

coil-compose is an Android agent skill that teaches Coil image loading in Jetpack Compose with AsyncImage, placeholders, and list performance defaults for developers building remote-image UI screens.

About

coil-compose is a new-silvermoon/awesome-android-agent-skills skill providing expert guidance on loading remote images in Jetpack Compose using Coil, the Coroutines Image Loader recommended for Compose apps. It documents AsyncImage as the primary composable with ImageRequest.Builder for URL models, automatic size resolution, placeholder and error state handling, and list-friendly performance defaults for scrolling image grids. Reach for coil-compose when implementing URL image loading, tuning Compose image states, or optimizing image performance in Android screens. Skip it when building non-Compose Android Views UI, handling offline-only local assets without networking, or working on iOS image loaders like SDWebImage or Kingfisher.

  • AsyncImage integration
  • Memory and disk caching
  • Placeholder and error UI
  • List scrolling performance

Coil Compose by the numbers

  • 351 all-time installs (skills.sh)
  • +12 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #356 of 1,039 Mobile Development skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/new-silvermoon/awesome-android-agent-skills --skill coil-compose

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs351
repo stars910
Last updatedJuly 27, 2026
Repositorynew-silvermoon/awesome-android-agent-skills

How do you load images in Jetpack Compose?

Load, cache, and display remote images in Jetpack Compose using Coil with sizing, placeholders, error states, and list-friendly performance defaults.

Who is it for?

Android developers adding remote image loading to Jetpack Compose screens with Coil caching and state handling.

Skip if: Developers building legacy Android View-based UIs or iOS SwiftUI image loading without Jetpack Compose.

When should I use this skill?

User asks to load images from URLs in Compose, handle Coil placeholders/errors, or optimize image performance in lists.

What you get

Compose AsyncImage implementations with ImageRequest config, placeholder/error UI, and list-optimized image loading code.

  • AsyncImage composable code
  • ImageRequest configuration
  • Placeholder and error state UI

Files

SKILL.mdMarkdownGitHub ↗

Coil for Jetpack Compose

Instructions

When implementing image loading in Jetpack Compose, use Coil (Coroutines Image Loader). It is the recommended library for Compose due to its efficiency and seamless integration.

1. Primary Composable: AsyncImage

Use AsyncImage for most use cases. It handles size resolution automatically and supports standard Image parameters.

AsyncImage(
    model = ImageRequest.Builder(LocalContext.current)
        .data("https://example.com/image.jpg")
        .crossfade(true)
        .build(),
    placeholder = painterResource(R.drawable.placeholder),
    error = painterResource(R.drawable.error),
    contentDescription = stringResource(R.string.description),
    contentScale = ContentScale.Crop,
    modifier = Modifier.clip(CircleShape)
)

2. Low-Level Control: rememberAsyncImagePainter

Use rememberAsyncImagePainter only when you need a Painter instead of a composable (e.g., for Canvas or Icon) or when you need to observe the loading state manually.

[!WARNING]
rememberAsyncImagePainter does not detect the size your image is loaded at on screen and always loads the image with its original dimensions by default. Use AsyncImage unless a Painter is strictly required.
val painter = rememberAsyncImagePainter(
    model = ImageRequest.Builder(LocalContext.current)
        .data("https://example.com/image.jpg")
        .size(Size.ORIGINAL) // Explicitly define size if needed
        .build()
)

3. Slot API: SubcomposeAsyncImage

Use SubcomposeAsyncImage when you need a custom slot API for different states (Loading, Success, Error).

[!CAUTION]
Subcomposition is slower than regular composition. Avoid using SubcomposeAsyncImage in performance-critical areas like LazyColumn or LazyRow.
SubcomposeAsyncImage(
    model = "https://example.com/image.jpg",
    contentDescription = null,
    loading = {
        CircularProgressIndicator()
    },
    error = {
        Icon(Icons.Default.Error, contentDescription = null)
    }
)

4. Performance & Best Practices

  • Singleton ImageLoader: Use a single ImageLoader instance for the entire app to share the disk/memory cache.
  • Main-Safe: Coil executes image requests on a background thread automatically.
  • Crossfade: Always enable crossfade(true) in ImageRequest for a smoother transition from placeholder to success.
  • Sizing: Ensure contentScale is set appropriately to avoid loading larger images than necessary.

5. Checklist for implementation

  • [ ] Prefer AsyncImage over other variants.
  • [ ] Always provide a meaningful contentDescription or set it to null for decorative images.
  • [ ] Use crossfade(true) for better UX.
  • [ ] Avoid SubcomposeAsyncImage in lists.
  • [ ] Configure ImageRequest for specific needs like transformations (e.g., CircleCropTransformation).

Related skills

How it compares

Use coil-compose for Compose-specific Coil patterns; use Glide or Picasso skills when the UI stack is Android Views instead of Compose.

FAQ

Which composable does coil-compose recommend for image loading?

coil-compose recommends Coil's AsyncImage composable for most Jetpack Compose cases. AsyncImage resolves sizes automatically and accepts standard Image parameters plus ImageRequest.Builder models for remote URLs.

When should developers use the coil-compose skill?

coil-compose triggers when implementing URL image loading, handling loading/error states, or optimizing scroll performance for image lists in Jetpack Compose Android apps using the Coil library.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.