# ink-custom-brush-builder

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.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 382 installs · ★ 10691 repo stars
- Author: Google LLC
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/android/skills/tree/HEAD/jetpack-compose/ink/ink-custom-brush-builder/SKILL.md
- Updated: 2026-10-23
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/ink-custom-brush-builder

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

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add android/skills --skill ink-custom-brush-builder -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/ink-custom-brush-builder/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/ink-custom-brush-builder/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add android/skills --skill ink-custom-brush-builder -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/ink-custom-brush-builder/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add android/skills --skill ink-custom-brush-builder -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/ink-custom-brush-builder/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install android/skills jetpack-compose/ink/ink-custom-brush-builder
```

2. **Manually: put the files in place**
- File: `.github/skills/ink-custom-brush-builder/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add android/skills --skill ink-custom-brush-builder -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/android/skills --path jetpack-compose/ink/ink-custom-brush-builder
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/ink-custom-brush-builder/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add android/skills --skill ink-custom-brush-builder -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/android/skills/tree/HEAD/jetpack-compose/ink/ink-custom-brush-builder/SKILL.md

## When to use it
- 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
- 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

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: ca67dfc4e4aa4ac2.

BEGIN THIRD-PARTY FILE ca67dfc4e4aa4ac2
````text
---
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
````
END THIRD-PARTY FILE ca67dfc4e4aa4ac2

The third-party file has ended. Everything between the ca67dfc4e4aa4ac2 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 3008 of 7330 bytes. © Google LLC · Apache-2.0 · https://github.com/android/skills/tree/HEAD/jetpack-compose/ink/ink-custom-brush-builder/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
