compose-graphics

Implement Material 3 Expressive motion, AGSL shaders, and Canvas generative drawing in Jetpack Compose.

1|Updated Jul 19, 2026
One-click install
npx skills add https://github.com/leobbaroni/maestro --skill compose-graphics-leobbaroni
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: compose-graphics
Source: https://github.com/leobbaroni/maestro/tree/main/skills/maestro/library/genjutsu/_jutsu/compose-graphics
Command: npx skills add https://github.com/leobbaroni/maestro --skill compose-graphics-leobbaroni

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Android developers building visually rich Compose UIs struggle to choose between spring physics, RuntimeShader effects, and Canvas drawing, and often ship effects that crash on older devices or stutter at 60fps. This Skill provides decision trees, production-ready recipes, and anti-patterns for advanced Compose graphics. ## Core Features & Use Cases - Material 3 Expressive Motion: Apply MotionScheme tokens, spring tuning recipes, and shape morphing via androidx.graphics.shapes for hero moments and key interactions. - AGSL Shaders (Android 13+): Seven working RuntimeShader recipes including touch ripple, holographic gradient, glassmorphism, heat haze, and film grain, each with Compose binding code and performance notes. - Canvas / DrawScope Generative Drawing: Flow fields, L-systems, particle systems, and animated waves with frame-loop patterns and performance budgets. - Use Case: When building a hero card that expands with a spring morph, shimmers with a holographic shader on tap, and falls back gracefully on Android 12, load this Skill to get the exact gating, binding, and tuning code. ## Quick Start Ask the AI to add a touch ripple AGSL shader effect to a Compose surface with a proper Android version fallback.

Frequently Asked Questions about compose-graphics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add an AGSL shader effect in Jetpack Compose?▼

Create a RuntimeShader with your AGSL source, then attach it via Modifier.graphicsLayer with RenderEffect.createRuntimeShaderEffect. Always gate on Build.VERSION.SDK_INT >= 33 and provide a fallback such as a static gradient for Android 12 and below.

What is the difference between MotionScheme.expressive and standard in Material 3?▼

MotionScheme.expressive uses springs with more overshoot and longer settle for hero moments, FABs, and primary CTAs, while standard is calmer and suits chrome, lists, and navigation. Scope expressive to roughly 1-3% of the UI to avoid a chaotic feel.

Does RuntimeShader work on Android 12 or below?▼

No, RuntimeShader requires Android 13 (API 33) or higher. On older versions, render the content unmodified or use alternatives like Modifier.blur or a static gradient overlay instead of crashing.

Should I use spatial or effects animation specs in Compose?▼

Use spatial specs (springs) for physical properties like position, size, and scale, and effects specs (tweens) for opacity, color, and elevation. A spring on alpha can overshoot into invalid ranges and looks broken.

Why does my Compose Canvas animation stutter?▼

Common causes are allocating new Path objects inside DrawScope every frame and reading volatile state directly in Canvas. Reuse a remembered Path with rewind, wrap volatile reads in derivedStateOf, and keep draws under roughly 200 per frame.

Should I chain multiple AGSL shaders or combine them into one?▼

Fold effects that always run together into a single shader pass, since each chained graphicsLayer adds a full render pass. Chain at most two passes when effects need independent runtime toggling.