In short.
Ink Custom Brush Builder is an assistant skill for Android developers designing custom drawing brushes, but developers must supply the drawing surface and handle differences between Android renderers. Its references explain Kotlin brush construction, input-driven behavior, layered painting, texture registration and binary serialization for androidx.ink 1.1.0-alpha03 or higher. The material includes concrete recipes and useful compatibility warnings. Compilation, visual quality, latency and device behavior remain unassessed; no code was executed.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes all six Markdown files in jetpack-compose/ink/ink-custom-brush-builder: SKILL.md, references/brush-structure.md, references/brush-behaviors.md, references/examples.md, references/textures-and-serialization.md and references/android/develop/ui/compose/touch-input/stylus-input/ink-api-brush-apis.md, plus repository-root LICENSE.txt. All are supplied at commit c72942584fff970dac86ced78b367fce0c441e52. Other repository folders, companion skills, linked external pages and Android library implementations are outside this scope. Installation, compilation, rendering, performance and serialization round trips were not executed or assessed.
The overview
identity
ink-custom-brush-builder is a text-based skill in the android/skills repository, with Google LLC named as its author. It guides coding assistants producing Kotlin definitions for BrushFamily, BrushCoat, BrushTip, BrushPaint and BrushBehavior.
The folder contains SKILL.md and five reference documents. Original source: [https://github.com/android/skills/tree/main/jetpack-compose/ink/ink-custom-brush-builder].
assessment
Its strongest fit is adding distinctive brush styles to an existing Compose inking app. The references connect brush geometry, changing input signals, painting and storage, with recipes for pens, calligraphy, pencils, watercolor-style washes and layered shadows.
The implementation warnings are particularly useful: missing textures can silently produce plain fills, and renderer choices affect which visual properties work. The examples provide implementation starting points, but their correctness and performance are not established by execution evidence.
users
The intended users are Android developers working with Kotlin, Jetpack Compose and Jetpack Ink who need custom brush appearance or input response. Beginners can start with a supplied recipe, although the code assumes familiarity with Android dependencies, imports and resources. Experienced developers can build behavior graphs, multiple rendering coats and fallback paints.
The stated scope excludes View/XML inking, stock-brush selection and Compose drawing-surface setup.
capabilities
The skill covers tip shape, rotation, slant and pinch; layered coats; static color and opacity; and dynamic responses to pressure, tilt, speed, direction and procedural noise. It also explains path smoothing and smoothing of changing brush properties.
Texture guidance covers repeating grain and discrete particle stamps. Storage examples encode and decode brush families, including embedded textures, using gzipped protocol buffers, with examples for files and Room BLOB columns. These examples concern brush definitions; stroke persistence belongs to the separate app-building scope.
Using it
requirements
The skill targets androidx.ink 1.1.0-alpha03 or higher and names four dependencies: ink-brush, ink-brush-compose, ink-storage and ink-nativeloader. It states that public custom-brush constructors need no experimental opt-in in that version range.
Stamping textures and explicitly accumulating overlap require CanvasMeshRenderer on a hardware Canvas on Android 14, API level 34, or higher. Older Android versions and software canvases need compatible fallback paints for those effects. The app's overall minimum Android version, supported assistant hosts and build-tool requirements are not established.
mechanism
A BrushFamily combines an input model with one or more coats. Each coat pairs tip geometry and behavior with paint appearance. Coats render from bottom to top; a coat's paintPreferences list instead offers alternatives, with the first renderer-compatible paint selected.
Behavior graphs transform input signals into changes such as width, opacity or rotation. Source nodes feed optional smoothing, easing or combination operators, ending at TargetNode or PolarTargetNode. SlidingWindowModel smooths the input path, while DampingNode smooths a changing property. Static tip angles use degrees; dynamic behavior angles use radians.
setup
The bundled Brush APIs guide documents installation through the Android CLI with android skills add ink-custom-brush-builder. The skill then directs dependency alignment in gradle/libs.versions.toml and app/build.gradle.kts before using the relevant construction and behavior references.
Textured brushes require separately supplied PNG or WebP assets. The texture reference recommends drawable-nodpi resources and a TextureBitmapStore mapping each clientTextureId to a Bitmap. Its dynamic-loading example also requires renderer recreation and InProgressStrokes re-keying when the texture generation changes, so cached texture shaders refresh.
example
The pressure-pen recipe defines a round black brush with base size 10f and epsilon 0.1f. Normalized pressure from 0 to 1 maps to a size multiplier from 0.5 to 1.5 and an opacity multiplier from 0.3 to 1.0. Separate DampingNode settings smooth size over 0.15 seconds and opacity over 0.1 seconds.
The recipe selects SelfOverlap.ANY. These are intended configuration values, not measured response times or demonstrated rendering results.
Assessment & evidence
limitations
SelfOverlap.ANY selects different rendering paths depending on Android version and Canvas type. The structure reference says path rendering ignores per-vertex opacity and color behavior. Consequently, accepting a brush definition does not establish that its pressure-opacity effects will look the same across devices.
Missing texture registrations silently produce untextured fills. A final texture layer using SRC_OVER can override edge anti-aliasing and opacity behavior. The references also warn that smoothing windows above 50 milliseconds introduce noticeable stylus lag; no measured latency, memory use or frame-rate results are supplied.
The skill does not supply drawing-surface integration, erasing or stroke persistence. Those application features require additional implementation.
reasoning
The practical reason to use this skill is its treatment of brush shape, input response and painting as parts of one reusable definition. A textured pencil, for example, combines tilt-driven width, pressure-driven opacity and distance-based wobble within a BrushFamily.
The tradeoff is integration complexity around library versions, texture assets and renderer compatibility. According to the skill's version notes, a project restricted to Ink 1.0.0 cannot use these programmatic construction recipes as written.
alternatives
For a standard pressure pen with different colors or sizes, the bundled guide demonstrates StockBrushes.pressurePen(), Brush.createWithComposeColor() and copyWithComposeColor(). That is a simpler documented route when custom behavior is unnecessary.
For Ink 1.0.0, the skill describes loading an already serialized custom family through BrushFamily.decode. It also names ink-app-builder as a companion for Compose drawing surfaces, erasing and stroke persistence; that companion's contents are not assessed here.
evidence
The supplied material includes the skill entry, references for structure, behavior nodes, complete recipes, textures and serialization, a bundled Brush APIs guide, and the repository license. The files describe implementation approaches but provide no compiler output, runtime logs, device comparisons or independent benchmarks.
The source snapshot is repository commit c72942584fff970dac86ced78b367fce0c441e52. Its pinned entry is available at [https://raw.githubusercontent.com/android/skills/c72942584fff970dac86ced78b367fce0c441e52/jetpack-compose/ink/ink-custom-brush-builder/SKILL.md].
Access & freshness
costs
The accompanying Apache License 2.0 grants no-charge, royalty-free rights to the covered material. The files provide no assistant, model, service or support pricing and no development-cost estimate. Total cost of using the skill is unknown.
rights
SKILL.md points to LICENSE.txt, whose supplied text is Apache License 2.0. It permits reproduction, modification and redistribution under its conditions, including providing the license, marking changed files, retaining applicable source notices and preserving applicable NOTICE attributions.
The license provides no general trademark permission and disclaims warranties. Rights to separately obtained texture images are not established by this material.
freshness
The skill metadata gives a last-updated date of 2026-10-28. The supplied snapshot was captured on 2026-11-16 at 15:39:18.603 UTC. Later repository changes and current library compatibility are unknown.
Version context matters: the bundled Brush APIs guide contains an experimental decoding example, while SKILL.md describes public constructors without opt-in from 1.1.0-alpha03 onward and explains the older 1.0.0 loading path. Those examples should be interpreted against the project's exact dependency version.
actions
Before adoption, confirm the app already has an Ink drawing surface and that its dependency policy permits the documented API version. Start with the untextured pressure-pen recipe, then check width and opacity on the actual hardware and software rendering paths the app supports.
For textured brushes, supply appropriately licensed assets, verify every texture ID and exercise renderer refresh after dynamic loading. Validate fallback appearance and an encode/decode round trip with embedded textures before relying on saved brush definitions.
