# Paperkit

Add drawings, shapes, and a consistent markup experience using PaperKit.

- Repository: https://github.com/dpearson2699/swift-ios-skills (1266 stars)
- Category: AI and agents
- License: see repository
- Last updated: 2026-07-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add dpearson2699/swift-ios-skills --skill paperkit -g -a claude-code -y`
Codex: `npx skills add dpearson2699/swift-ios-skills --skill paperkit -g -a codex -y`
Cursor: `npx skills add dpearson2699/swift-ios-skills --skill paperkit -g -a cursor -y`
Gemini CLI: `npx skills add dpearson2699/swift-ios-skills --skill paperkit -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add dpearson2699/swift-ios-skills`

## Description

Add drawings, shapes, and a consistent markup experience using PaperKit. Use when integrating PaperMarkupViewController for markup editing, adding shape recognition, working with PaperMarkup data models, embedding markup tools in document editors, or building annotation features that need the system-standard markup toolbar. New in iOS 26.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# PaperKit

> **Beta-sensitive.** PaperKit is new in iOS/iPadOS 26, macOS 26, and visionOS 26. API surface may change. Verify details against current Apple documentation before shipping.

PaperKit combines PencilKit drawing with structured markup elements such as shapes, text, images, and lines in a canvas managed by `PaperMarkupViewController`.

## Contents

- [Setup](#setup)
- [Workflow](#workflow)
- [PaperMarkupViewController](#papermarkupviewcontroller)
- [PaperMarkup Data Model](#papermarkup-data-model)
- [Insertion Controllers](#insertion-controllers)
- [FeatureSet Configuration](#featureset-configuration)
- [Integration with PencilKit](#integration-with-pencilkit)
- [SwiftUI Integration](#swiftui-integration)
- [Common Mistakes](#common-mistakes)
- [Review Checklist](#review-checklist)
- [References](#references)

## Workflow

1. Choose the document bounds, supported `FeatureSet`, and persistence version before constructing UI.
2. Create `PaperMarkup`, embed `PaperMarkupViewController`, and keep the controller, tool picker, and insertion controller alive for the view lifetime.
3. Use the platform-appropriate insertion surface and keep PencilKit drawing inside the PaperKit document boundary.
4. Save off the main thread, retain a thumbnail for forward-incompatible content, and test round-trip loading with the same feature set.
5. On failure, restore the original document bytes, fix the feature-set/version/controller mismatch, and rerun edit, save, relaunch, load, thumbnail fallback, and undo checks.

Load [references/paperkit-patterns.md](references/paperkit-patterns.md) for full platform setup, tool picker wiring, persistence, thumbnails, custom feature sets, programmatic construction, and migration.

## Setup

PaperKit requires no entitlements or special Info.plist entries.

```swift
import PaperKit
```

**Platform availability:** iOS 26.0+, iPadOS 26.0+, Mac Catalyst 26.0+, macOS 26.0+, visionOS 26.0+.

Three core components:

The rest: https://github.com/dpearson2699/swift-ios-skills/blob/HEAD/skills/paperkit/SKILL.md
