Skip to main content
skill CX Codex

ink-custom-brush-builder — Claude Code skill: what it does

ink-custom-brush-builder — a skill for Claude Code and Cursor builds custom brush definitions for Android apps using Jetpack Ink. Sets up tip shapes, multi-coat layers, and stylus behaviors.

Apache-2.0 382 installs ★ 10,691 updated 2026-10-23

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add android/skills --skill ink-custom-brush-builder -a claude-code
Open on GitHub

What ink-custom-brush-builder does

The agent generates complete Kotlin implementations for BrushFamily, BrushCoat, BrushTip, BrushPaint, and BrushBehavior. It requires androidx.ink version 1.1.0-alpha03 or higher in the Android project. The skill triggers when setting up node graphs for pressure or tilt sensitivity, tiling textures, or input smoothing.

Generated code relies on public Kotlin constructors and uses androidx.ink.storage for encoding and decoding brush definitions.

What it helps with

  • build a custom brush family for Jetpack Ink
  • configure stylus pressure and tilt behavior graphs
  • add tiling or stamping textures to a brush
  • serialize and deserialize custom brushes in Kotlin

Example prompts for the agent

  • Build a custom pressure-sensitive brush in Kotlin
  • Configure brush tip geometry and behavior nodes
  • Set up a multi-coat layered brush with Jetpack Ink

How to install ink-custom-brush-builder

1Skills CLI (Vercel)

npx skills add android/skills --skill ink-custom-brush-builder -a claude-code

2Manually: put the files in place

~/.claude/skills/ink-custom-brush-builder/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ink-custom-brush-builder/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about ink-custom-brush-builder

How to install ink-custom-brush-builder in Claude Code?

Run npx skills add android/skills --skill ink-custom-brush-builder -a claude-code and check ~/.claude/skills/ink-custom-brush-builder/SKILL.md.

What does ink-custom-brush-builder do?

It creates custom BrushFamily definitions and behavior trees for Android apps using Jetpack Ink 1.1.0-alpha03 and higher.

What is needed to use ink-custom-brush-builder?

You need androidx.ink dependencies version 1.1.0-alpha03 or higher configured in your Android project.

Source text

SKILL.md · Apache-2.0
---
name: ink-custom-brush-builder
description: Creates custom BrushFamily definitions for an Android app using Jetpack
  Ink (androidx.ink 1.1.0-alpha03 and higher). Use this skill when configuring custom
  BrushTip shapes, adding pressure, tilt, speed, or noise sensitivity using BrushBehavior
  node graphs, creating multi-coat layered brushes, applying tiling or particle stamping
  textures, configuring SlidingWindowModel input smoothing, or serializing brushes.
  Delivers complete Kotlin BrushFamily, BrushCoat, BrushTip, BrushPaint, and BrushBehavior
  implementations. Don't use for View-based (XML) inking, Compose drawing surface
  setup, or stock brush selection. For Compose drawing surface setup, InProgressStrokes
  wet and dry rendering, eraser, or persistence, suggest the ink-app-builder skill.
license: Complete terms in LICENSE.txt
metadata:
  author: Google LLC
  last-updated: '2026-10-28'
  keywords:
  - Android
  - Jetpack Ink
  - androidx.ink
  - BrushFamily
  - BrushCoat
  - BrushTip
  - BrushPaint
  - BrushBehavior
  - TilingTexture
  - StampingTexture
  - ColorFunction
  - SlidingWindowModel
  - custom brush
---

Custom brushes in the Android Ink API are built around the **`BrushFamily`**
hierarchy:

    BrushFamily
    ├── InputModel (BrushFamily.InputModel.SlidingWindowModel or PASSTHROUGH_MODEL)
    └── BrushCoat[] (one or more rendering layers)
        ├── BrushTip (shape: scaleX, scaleY, cornerRounding, rotationDegrees, slantDegrees, pinch)
        │   └── BrushBehavior[] (dynamic response to stylus or touch input)
        │       └── Tree: TargetNode(input = [Operators](input = SourceNode))
        └── BrushPaint (visual appearance)
            ├── SelfOverlap (ANY, ACCUMULATE, or DISCARD)
            ├── TextureLayer[] (BrushPaint.TilingTexture or BrushPaint.StampingTexture)
            └── BrushPaint.ColorFunction[] (OpacityMultiplier or ReplaceColor)

Create a `Brush` by combining a custom `BrushFamily` with a Compose `Color`,
`size`, and `epsilon`:


```kotlin
val brush = Brush.createWithComposeColor(
    family = myCustomFamily,
    color = Color.Black,
    size = 10f,
    epsilon = 0.1f,
)
```

<br />

> **Version and experimental API requirements** :
> - **Requires `androidx.ink` `1.1.0-alpha03` and higher** : In `1.0.0` (Stable)
> and `1.1.0-alpha01`-`alpha02`, `BrushFamily(...)`, `BrushCoat`, `BrushTip`,
> `BrushPaint`, `BrushBehavior`, and `androidx.ink.brush.behavior.*` nodes
> were `@RestrictTo(LIBRARY_GROUP)` (in `1.0.0` stable, custom brushes can
> only be loaded from binary proto streams using `BrushFamily.decode`).
> Starting in **`1.1.0-alpha03` and higher** , programmatic custom brush
> constructors graduated to public API (`BrushPaint.TilingTexture`,
> `BrushPaint.StampingTexture`, `BrushPaint.ColorFunction`,
> `BrushFamily.InputModel.SlidingWindowModel`, and all behavior nodes).
> - **No `@OptIn` required in `1.1.0-alpha03` and higher** : All public custom
> brush classes and `ink-storage` `BrushFamily` serialization APIs
> (`BrushFamily.encode` and `decode`, `AndroidBrushFamilySerialization`,
> `BrushFamilyDecodeCallback`) are unannotated in `1.1.0-alpha03` and higher
> (`ExperimentalInkCustomBrushApi` is `@RestrictTo(LIBRARY_GROUP)` in
> `1.1.0-alpha05` and higher, and is only required on `BrushFamily`
> serialization in `1.0.0` stable).

## Workflow and task routing

Follow these conditional instructions based on the requested custom brush task:

- **Step 1 (Dependencies)** : When setting up an Android project for programmatic custom brushes, ask user permission before editing build files and verify that `androidx.ink:ink-brush`, `androidx.ink:ink-brush-compose`, `androidx.ink:ink-storage`, and `androidx.ink:ink-nativeloader` use version `1.1.0-alpha03` or higher in `gradle/libs.versions.toml` and `app/build.gradle.kts`.
- **Step 2 (Hierarchy, tip shape, paint, and input smoothing)** : When defining `BrushFamily` and multi-coat `BrushCoat` layers, configuring `BrushTip` geometry (`scaleX`, `scaleY`, `cornerRounding`, `rotationDegrees`, `slantDegrees`, `pinch`), setting `BrushPaint` properties (`SelfOverlap`, `ColorFunction`), or smoothing stroke input with `BrushFamily.InputModel.SlidingWindowModel`, you MUST follow [brush-structure.md](references/brush-structure.md). For baseline `Brush` creation or `1.0.0` resource loading, review [Brush APIs](references/android/develop/ui/compose/touch-input/stylus-input/ink-api-brush-apis.md).
- **Step 3 (Dynamic stylus and touch behaviors)** : When making a brush respond dynamically to stylus pressure, tilt, speed, direction, or procedural noise using `BrushBehavior` node trees (`SourceNode`, `DampingNode`, `NoiseNode`, `ResponseNode`, `TargetNode`, `PolarTargetNode`), you MUST follow [brush-behaviors.md](references/brush-behaviors.md).
- **Step 4 (Textures and serialization)** : When adding `BrushPaint.TilingTexture` or `BrushPaint.StampingTexture` layers, implementing `TextureBitmapStore`, or encoding and decoding custom `BrushFamily` definitions (`BrushFamily.encode` and `decode`, `AndroidBrushFamilySerialization`, `BrushFamilyDecodeCallback`), you MUST follow [textures-and-serialization.md](references/textures-and-serialization.md). Inform the user which texture image files (such as `app/src/main/res/drawable-nodpi/pencil_grain.png`) to add to their project and register in `TextureBitmapStore`.
- **Step 5 (Complete brush recipes)** : When building a complete pressure pen, calligraphy nib, shading pencil, watercolor wash, or multi-coat shadow brush from scratch, start from the copy-ready implementations in [examples.md](references/examples.md).
- **Compose drawing surface, eraser, or persistence** : For Compose drawing surface setup, `InProgressStrokes` wet and dry rendering, geometry-based erasing, or Room stroke persistence, suggest the `ink-app-builder` skill.

## Antipatterns

- **NEVER use raw `ink.proto.*` builders** to construct brushes---always use the public Kotlin constructors (`BrushFamily`, `BrushCoat`, `BrushTip`, `BrushPaint`, `BrushBehavior` from `androidx.ink.brush.*`).
- **NEVER manually scale stroke width in a touch listener** for pressure or tilt sensitivity---use `BrushBehavior` mapping `SourceNode.Source.NORMALIZED_PRESSURE` or `TILT_IN_RADIANS` to `TargetNode.Target.SIZE_MULTIPLIER` or `WIDTH_MULTIPLIER`.
- **NEVER use manual `Canvas` bitmap stamping or `BitmapShader`** for textured brushes---use `BrushPaint.TilingTexture` or `BrushPaint.StampingTexture` with a `TextureBitmapStore`.
- **NEVER use `BlendMode.SRC_OVER` on the final (or only) `TextureLayer`** ---use `BlendMode.MODULATE`, `DST_IN`, `DST_OUT`, `SRC_ATOP`, or `SRC_IN` so edge anti-aliasing and `OPACITY_MULTIPLIER` behaviors aren't overridden.
- **NEVER serialize `BrushFamily` as JSON, Gson, Moshi, or `Parcelable`** ---always use `BrushFamily.encode` and `BrushFamily.decode` or `AndroidBrushFamilySerialization` from `androidx.ink.storage`.
- **NEVER implement manual Bézier (`quadTo`, `cubicTo`) smoothing** ---configure `BrushFamily.InputModel.SlidingWindowModel` for input smoothing and `DampingNode` for behavior smoothing.
- **NEVER use `Random.nextFloat` in draw loops** for organic stroke wobble---attach a `NoiseNode` varied over stroke distance in `BrushBehavior`.

© Google LLC · Apache-2.0 · android/skills

Similar skills

All skills for Mobile →

From the same set36

The whole set →
litert-runtime litert-runtime walks through Kotlin code and Gradle setup for running .tflite models on Android with the CompiledModel API. Covers CPU and GPU inference, buffer reuse, preprocessing, and migration from the legacy TFLite stack. CX Codex +1 558installs wear-widgets wear-widgets — a skill that builds, migrates, and checks Wear OS widgets using Glance Wear and Remote Compose. It steps in when an Android project needs a new widget, a TileService migration, or a review of an existing implementation. CX Codex +1 544installs android-for-cars-parked-apps android-for-cars-parked-apps — a skill for Claude Code adapts existing Android video apps, games, and web browsers for parked use on Android Auto and Android Automotive OS. CX Codex +1 537installs litert-lm This Claude Code skill guides Android app work with on-device text language models. It covers chat, summarization, and extraction through LiteRT-LM. CX Codex +1 451installs projected-hardware The projected-hardware Claude Code skill explains how Android apps access hardware on Android XR glasses. It covers camera and microphone permissions, device connections, and audio routing. CX Codex +1 444installs glance-appwidget-updates-and-memory glance-appwidget-updates-and-memory — a Claude Code skill for updating Android AppWidgets built with Jetpack Glance and keeping their images within memory limits. It covers widget setup, state sync, and crash fixes. CX Codex +1 400installs ink-app-builder The ink-app-builder Claude Code skill adds stylus and touch drawing to Android apps with Jetpack Ink and Compose. It activates for drawing surfaces, stroke rendering, erasing, undo history, or stroke storage. CX Codex +1 387installs mlkit-agent-api The mlkit-agent-api Claude Code skill guides Android agent workflows built with the ML Kit GenAI Agent API. It applies to multi-turn chat, on-device tool calls, and GenAiException handling. CX Codex +1 374installs

Project sponsors

Companies that keep this analytics open