Skip to main content
skill CX Codex

pencilkit — Claude Code skill: what it does, how to install

Guides Apple Pencil drawing setup via PencilKit in Swift, configuring tool pickers and serializing strokes. Helpful when building signature pads or drawing screens on iOS.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dpearson2699/swift-ios-skills --skill pencilkit -a claude-code
Open on GitHub

What pencilkit does

The skill guides an AI assistant through implementing PencilKit canvas views and stroke handling in Swift. It details how to set up PKCanvasView with suitable input policies and show the standard floating PKToolPicker. Drawing data gets converted to raw bytes via PKDrawing for atomic file storage and safe synchronization.

The framework functions without entitlements or Info.plist settings, though tailoring tool items relies on iOS 18+ alongside visionOS 2+. Version checks matter here. Targeting earlier operating systems with custom tool palettes will trigger build errors.

The workflow also covers rendering drawings to images using image(from:scale:). It requires checking bounds before generating the output image.

What it helps with

  • configure PKCanvasView with touch and stylus input policies
  • attach PKToolPicker to switch pens, highlighters, and erasers
  • serialize PKDrawing strokes into binary data for disk storage
  • render canvas drawings to raster images with custom scaling

Example prompts for the agent

  • Configure PKCanvasView for a signature field accepting both finger and pencil
  • Add PKDrawing atomic file serialization and safe decoding
  • Display PKToolPicker alongside the active canvas in my view controller

How to install pencilkit

1Skills CLI (Vercel)

npx skills add dpearson2699/swift-ios-skills --skill pencilkit -a claude-code

2Manually: put the files in place

~/.claude/skills/pencilkit/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/pencilkit/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about pencilkit

How to install pencilkit in Claude Code?

Run npx skills add dpearson2699/swift-ios-skills --skill pencilkit -a claude-code in your terminal to install the skill for your coding agent.

What does the pencilkit skill do?

It directs coding assistants on adding Apple Pencil support to Swift code, managing PKCanvasView interaction policies, displaying PKToolPicker, and saving drawings.

Are any Info.plist entries needed for PencilKit?

No special entitlements or Info.plist keys are necessary. You only need to import PencilKit in Swift and instantiate your canvas view.

Similar skills

Everything for Mobile →

From the same set86

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor