Index of every page on this site: llms.txt
All skills
tristanmanchester avatar

/react-native-skia

@3323bc9
Run it yourself

Build, debug, or profile React Native Skia canvases, paths, rich text, shaders, images, snapshots, video, and animated graphics. Use when Skia is selected or custom drawing is needed. Do not introduce a canvas merely because ordinary native UI should look polished or animate smoothly.

Use this Skill: https://skilld.dev/gh/tristanmanchester/agent-skills/react-native-skia

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencespan-zoom-template.md

≈810 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Pan/zoom image template

Copy both assets/templates/pan-zoom-image-stage.tsx and assets/templates/pan-zoom-math.ts into the same directory in the application. The template targets Skia 2.10+, Reanimated 4, and Gesture Handler 3 with a working Worklets setup and the application's GestureHandlerRootView. It is a bounded, non-rotating image viewer, not a general affine editor or a drop-in migration shim.

The image fits the viewport at scale 1 while preserving its aspect ratio. Scale and translation share one pose; the Group receives one derived transform of plain numbers. A moving pinch focal point owns two-finger translation, so pan does not add that motion a second time. Each update uses the actual clamped scale ratio. Overscroll is clamped, and an axis with content smaller than the viewport stays centred. Clamping can intentionally move the focal image point at an edge.

A cancelled view gesture retains its last bounded pose. It does not initiate a business mutation. A new source or new dimensions resets the pose by remounting the view. Native buttons provide zoom, translation, and reset without requiring gestures. Button changes are immediate, with no decorative motion to suppress. Loading and image errors are visible. Add retry, progress feedback, localisation, and application-specific image descriptions as required.

Offline geometry checks

From the skill directory, with TypeScript already installed:

BUILD_DIR="$(mktemp -d)"
tsc --strict --target ES2022 --module commonjs --outDir "$BUILD_DIR" \
  assets/templates/pan-zoom-math.ts
SKIA_GEOMETRY_BUILD="$BUILD_DIR" node --test tests/pan-zoom.test.cjs
# BUILD_DIR contains disposable compiled test output; retain or remove it deliberately.

These tests exercise fitting, repeated zooms, focal-point invariance, clamped ratios, translation, invalid values, and a deterministic sequence of 500 updates. They do not execute Reanimated worklet transformation, gesture arbitration, React Native accessibility, or Skia drawing. A TypeScript syntax transpilation likewise does not type-check the component against installed native packages.

Required app checks

Type-check in the actual app, build both native targets, and exercise successive pinches, one-to-two-to-one pointer changes, cancellations, competing parent scroll, edge clamping, source changes, resize, loading failure, and each native control. Verify image geometry and pixel density on real renders, along with screen-reader focus and labelling. Adapt gesture relations when embedding in another scroll or zoom surface; the pure geometry tests cannot prove that arbitration is correct.

Sources checked September 14, 2026

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo4 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill provides templates, documentation, and a diagnostic script for building high-performance graphics in React Native using the Skia engine. The included audit script performs static analysis on local files to verify configuration and does not perform any network or unauthorized file operations.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

  • ZeroLeaks6mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 3323bc9. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Steadyupdated last month
metadata
{
  "version": "3.0.0",
  "reviewed": "2026-09-13"
}
Other metadata
compatibility
Current native Skia requires React Native 0.79+ and React 19+. Skia 2.10+ animation integration requires Reanimated 4; resolve the exact Worklets/native combination through the app's Expo SDK and upstream compatibility tables.

README badge

README badge for tristanmanchester/agent-skills/react-native-skia