К основному содержанию
скилл CX Codex

ink-custom-brush-builder — скилл для Claude Code

Скилл ink-custom-brush-builder для Claude Code и Cursor создаёт определения кистей для Android-приложений с помощью Jetpack Ink. Помогает настраивать геометрию наконечника и динамические реакции на стилус.

Apache-2.0 382 установок ★ 10 691 обновлён 2026-10-23

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add android/skills --skill ink-custom-brush-builder -a claude-code
Открыть на GitHub

Что делает ink-custom-brush-builder

Агент собирает структуру BrushFamily, BrushCoat, BrushTip, BrushPaint и BrushBehavior на Kotlin. Для работы нужны зависимости androidx.ink версии 1.1.0-alpha03 и выше. Скилл подключается, когда требуется запрограммировать слоистые кисти, текстуры штампов или сглаживание ввода SlidingWindowModel.

Код использует публичные конструкторы вместо сырых протобуферов. Сериализация кистей выполняется через BrushFamily.encode и BrushFamily.decode из библиотеки androidx.ink.storage.

Какие задачи решает

  • создать кастомную кисть для Jetpack Ink
  • настроить реакцию кисти на нажим и наклон стилуса
  • добавить текстуру плитки или штампа в кисть
  • сериализовать определение кисти на Kotlin

Примеры запросов агенту

  • Собери кастомную кисть с реакцией на нажим стилуса
  • Настрой текстуру штампа для кисти на Jetpack Ink
  • Свяжи слои кисти через семейство BrushFamily

Как установить ink-custom-brush-builder

1Через Skills CLI (Vercel)

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

2Вручную: положить файлы

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

Папка скилла целиком; для одного проекта — .claude/skills/ink-custom-brush-builder/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы об ink-custom-brush-builder

Как установить ink-custom-brush-builder в Claude Code?

Выполните команды npx skills add android/skills --skill ink-custom-brush-builder -a claude-code и обратитесь к файлу ~/.claude/skills/ink-custom-brush-builder/SKILL.md.

Что делает ink-custom-brush-builder?

Генерирует код на Kotlin для кастомных кистей Android с помощью Jetpack Ink 1.1.0-alpha03 и выше, включая поведение наконечника, слои и текстуры.

Что нужно для работы ink-custom-brush-builder?

Требуются зависимости androidx.ink версии 1.1.0-alpha03 или выше в проекте Android.

Исходный текст

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

Похожие скиллы

Все скиллы по теме «Мобильная разработка» →
illustration-two-colour-brush MengTo Скилл illustration-two-colour-brush создаёт SVG-карточки со сценами про дизайн и кодинг в чёрно-мятной маркерной манере. Подходит для пустых состояний, onboarding и 404. CX Codex +1 ★ 7 995звёзд репо prevue kakao Скилл prevue для Claude Code рендерит превью Jetpack Compose в браузере без запуска Android Studio. Запускается при вёрстке интерфейса Compose или сверке экрана с макетом. CX Codex +1 ★ 125звёзд репо compose-component-design chrisbanes Скилл compose-component-design для проектирования и ревью переиспользуемых компонентов Jetpack Compose: слоты, модификаторы, размещение корневого layout. CX Codex +1 1 400установок mobile-apps-create forcedotcom Скилл mobile-apps-create определяет стек и направляет разработку нативных приложений Salesforce на iOS и Android к нужным SDK. Помогает подключить Mobile SDK, базу SmartStore или чат Agentforce. CX Codex +1 4 800установок kotlin-tooling-agp9-migration JetBrains Скилл kotlin-tooling-agp9-migration ведёт проект Kotlin Multiplatform через переход на Android Gradle Plugin 9.0: замена плагинов, разбиение модулей, перенос DSL. CX Codex +1 2 500установок

Из того же набора36

Весь набор →
litert-runtime Скилл litert-runtime настраивает и пишет Kotlin-код для запуска моделей .tflite на Android через CompiledModel API. Включается в любой задаче с LiteRT: от Gradle-зависимостей до препроцессинга Bitmap и миграции со старого Interpreter. CX Codex +1 558установок wear-widgets Скилл wear-widgets для создания виджетов Wear OS через Glance Wear и Remote Compose. Помогает с нуля поднять виджет, мигрировать старый тайл или проверить существующую реализацию в Android-проекте. CX Codex +1 544установок android-for-cars-parked-apps Скилл android-for-cars-parked-apps для Claude Code помогает адаптировать приложения с видео, играми и браузерами под Android Auto и Android Automotive OS для работы на парковке. CX Codex +1 537установок litert-lm Помогает добавить в Android-приложение запуск текстовой языковой модели на устройстве. Описывает чат, суммаризацию и извлечение данных через LiteRT-LM. CX Codex +1 451установок projected-hardware Скилл projected-hardware для Claude Code помогает подключать железо умных очков Android XR к приложению. Он охватывает камеру, микрофон, разрешения и жизненный цикл соединения. CX Codex +1 444установок glance-appwidget-updates-and-memory Скилл glance-appwidget-updates-and-memory для Claude Code помогает обновлять Android-виджеты на Jetpack Glance и укладывать их изображения в лимит памяти. Подключается при настройке AppWidget, синхронизации состояния или разборе сбоев. CX Codex +1 400установок ink-app-builder Скилл ink-app-builder для Claude Code добавляет в Android-приложение рисование стилусом или касанием через Jetpack Ink и Compose. Подключается к задачам с отрисовкой штрихов, ластиком, историей отмены и сохранением. CX Codex +1 387установок mlkit-agent-api Скилл mlkit-agent-api для Claude Code помогает создавать агентные сценарии в Android-приложениях через ML Kit GenAI Agent API. Подключается при работе с многошаговым чатом, вызовом инструментов или обработкой ошибок GenAiException. CX Codex +1 374установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой