# Ink Custom Brush Builder

Creates custom BrushFamily definitions for an Android app using Jetpack Ink...

- Repository: https://github.com/android/skills (10219 stars)
- Category: Mobile
- License: Complete terms in LICENSE.txt
- Last updated: 2026-10-29
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add android/skills --skill ink-custom-brush-builder -g -a claude-code -y`
Codex: `npx skills add android/skills --skill ink-custom-brush-builder -g -a codex -y`
Cursor: `npx skills add android/skills --skill ink-custom-brush-builder -g -a cursor -y`
Gemini CLI: `npx skills add android/skills --skill ink-custom-brush-builder -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add android/skills`

## 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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

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 />

The rest: https://github.com/android/skills/blob/HEAD/jetpack-compose/ink/ink-custom-brush-builder/SKILL.md
