This is a solid reference for implementing Coil image loading in Jetpack Compose apps. It covers the three main APIs (AsyncImage, rememberAsyncImagePainter, and SubcomposeAsyncImage) with clear guidance on when to use each. The warnings are genuinely useful, especially the note that rememberAsyncImagePainter loads images at original dimensions by default, which can wreck performance if you're not careful. The skill steers you toward AsyncImage for most cases and explicitly warns against using SubcomposeAsyncImage in lazy lists. If you're loading images from URLs in Compose, this gives you the patterns you need without having to dig through documentation.

skills.sh installs
464
GitHub stars
1K
last updated
Aug 21, 2026

Install

$ npx -y skills add new-silvermoon/awesome-android-agent-skills --skill coil-compose --agent claude-code

Installs into .claude/skills of the current project.

Files

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.

Sponsors

Details

Repository
github.com/new-silvermoon/awesome-android-agent-skills
Categories
AI & Agent Building, Debugging, Mobile Development
First seen
Jun 3, 2026

More from new-silvermoon/awesome-android-agent-skills

All 17
1aj-geddes avatarerror-trackingaj-geddes/useful-ai-promptsImplement error tracking with Sentry for automatic exception monitoring, release tracking, and performance issues. Use when setting up error monitoring, trackin463skills.sh installs
2aj-geddes avatarspring-boot-applicationaj-geddes/useful-ai-promptsBuild enterprise Spring Boot applications with annotations, dependency injection, data persistence, REST controllers, and security. Use when developing Spring a463skills.sh installs
3aj-geddes avatarcode-metrics-analysisaj-geddes/useful-ai-promptsAnalyze code complexity, cyclomatic complexity, maintainability index, and code churn using metrics tools. Use when assessing code quality, identifying refactor462skills.sh installs
4jwynia avatarcontext-retrospectivejwynia/agent-skillsAnalyze agent-user interaction transcripts to identify context network maintenance needs and guidance improvements. Use after significant agent interactions or 462skills.sh installs
5aj-geddes avatarhealth-check-endpointsaj-geddes/useful-ai-promptsImplement comprehensive health check endpoints for liveness, readiness, and dependency monitoring. Use when deploying to Kubernetes, implementing load balancer 461skills.sh installs
6aj-geddes avatarserverless-architectureaj-geddes/useful-ai-promptsDesign and implement serverless applications using AWS Lambda, Azure Functions, and GCP Cloud Functions with event-driven patterns and orchestration.461skills.sh installs