pencilkit
Add Apple Pencil drawing with PKCanvasView, PKToolPicker, PKDrawing serialization/export, stroke inspection, and PencilKit/PaperKit handoffs. Use when building drawing apps, annotation features, handwriting capture, signature fields, content-version-safe ink workflows, or Apple Pencil-powered experiences on iOS/iPadOS/visionOS.
npx skills add dpearson2699/swift-ios-skills --skill pencilkit --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# PencilKit Capture Apple Pencil and finger input using `PKCanvasView`, manage drawing tools with `PKToolPicker`, serialize drawings with `PKDrawing`, and wrap PencilKit in SwiftUI. ## Contents - [Setup](#setup) - [Capture-to-Export Workflow](#capture-to-export-workflow) - [PKCanvasView Basics](#pkcanvasview-basics) - [PKToolPicker](#pktoolpicker) - [PKDrawing Serialization](#pkdrawing-serialization) - [Content Version Compatibility](#content-version-compatibility) - [Exporting to Image](#exporting-to-image) - [Stroke Inspection](#stroke-inspection) - [SwiftUI Integration](#swiftui-integration) - [PaperKit Relationship](#paperkit-relationship) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## Setup PencilKit requires no entitlements or Info.plist entries. Import `PencilKit` and create a `PKCanvasView`. ```swift import PencilKit ``` **Platform availability:** iOS 13+, iPadOS 13+, Mac Catalyst 13.1+, visionOS 1.0+. ## Capture-to-Export Workflow 1. **Capture:** Read `canvasView.drawing` from `canvasViewDrawingDidChange(_:)`; keep the previous persisted revision until the new revision completes the remaining checkpoints. 2. **S
- Contents
- Setup
- Capture-to-Export Workflow
- PKCanvasView Basics
- Drawing Policies
- Configuring the Canvas
- PKToolPicker
- Custom Tool Picker Items
- Ink Types
- Content Versions
- PKDrawing Serialization
- Decode Validate/Fix/Retry Loop
- Combining Drawings
- Transforming Drawings
What does the pencilkit skill do?
Add Apple Pencil drawing with PKCanvasView, PKToolPicker, PKDrawing serialization/export, stroke inspection, and PencilKit/PaperKit handoffs. Use when building drawing apps, annotation features, handwriting capture, signature fields, content-version-safe ink workflows, or Apple Pencil-powered experiences on iOS/iPadOS/visionOS.
How do I install it?
Run `npx skills add dpearson2699/swift-ios-skills --skill pencilkit --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From dpearson2699/swift-ios-skills, a repository with 963 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.