Skills

Ink App Builder

Adds inking and freehand drawing capabilities to an Android app using Jetpack Ink...

Install

npx skills add android/skills --skill ink-app-builder -g -a claude-code -y
Repository
android/skills10.2k
Category
Mobile
Updated
6d ago
License
Complete terms in LICENSE.txt
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

Adds inking and freehand drawing capabilities to an Android app using Jetpack Ink (androidx.ink) and Compose. Use this skill when implementing stylus or touch drawing surfaces, rendering wet and dry ink strokes, configuring stock brushes (pressure pen, marker, highlighter), implementing geometry-based erasing, linear undo and redo history, or stroke persistence with Room. Delivers working Compose and ViewModel implementations. Don't use for View-based (XML) inking or programmatic custom BrushFamily creation. For custom BrushFamily creation, custom tip shapes, or behavior node graphs, suggest the ink-custom-brush-builder skill.

The Android Ink API (androidx.ink) is a modular Jetpack library for building high-performance, low-latency freehand drawing experiences on Android. It uses a wet ink and dry ink two-phase model:

  • Wet ink : Real-time, ultra-low-latency rendering while the user is drawing, handled by the InProgressStrokes composable.
  • Dry ink : Finalized, immutable Stroke objects rendered by the app using CanvasStrokeRenderer.

Setup and dependencies

The Ink API requires minSdk = 26 , which corresponds to Android 8.0 (API level 26) and higher. All androidx.ink modules MUST share an identical version in gradle/libs.versions.toml. Ask user permission before modifying project build files.

Version selection (1.0.0 stable versus 1.1.0-alpha03 and higher)

  • Use 1.0.0 (Stable) for production apps that rely on StockBrushes or pre-serialized .brush assets decoded with BrushFamily.decode. In 1.0.0 stable, BrushFamily.encode, BrushFamily.decode, AndroidBrushFamilySerialization, and BrushFamilyDecodeCallback require @OptIn(ExperimentalInkCustomBrushApi::class).
  • Use 1.1.0-alpha03 and higher when the app constructs programmatic custom brushes (BrushFamily, BrushCoat, BrushTip, BrushPaint, BrushBehavior) in Kotlin code. Starting in 1.1.0-alpha02 and higher, BrushFamily serialization requires no @OptIn (and in 1.1.0-alpha05 and higher, ExperimentalInkCustomBrushApi is @RestrictTo(LIBRARY_GROUP), so NEVER annotate 1.1.0-alpha03 and higher code with it).

Version catalog (gradle/libs.versions.toml)

[versions]
ink = "<latest_version>"
inputMotionPrediction = "<latest_version>"
Read the whole SKILL.md on GitHub

More in Mobile