# pdfkit

This skill guides PDFKit work in Swift apps, from displaying documents to searching text and adding annotations. Use it when building PDF features into an app.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3100 installs · ★ 1237
- Author: dpearson2699
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/pdfkit/SKILL.md
- Updated: 2026-07-31
- HTML: https://affpapa.org/en/nevibecode/skills/pdfkit

## What it does

The skill covers displaying and loading PDFs, moving between pages, searching document text, and extracting page content. It also describes annotations, thumbnails, PDF form filling, and wrapping `PDFView` for SwiftUI.

Its examples use `PDFView`, `PDFDocument`, `PDFPage`, `PDFAnnotation`, and `PDFSelection`. Documents can be loaded from a URL or `Data`, then edited and saved. Page indices start at zero; an invalid index can raise an exception, so validate it before accessing a page.

To use the framework, import `PDFKit`; the guide says no entitlements or `Info.plist` entries are needed. The system find interaction requires iOS/iPadOS 16 or later, so check the target version before relying on it.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill pdfkit -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/pdfkit/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/pdfkit/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill pdfkit -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/pdfkit/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill pdfkit -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/pdfkit/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dpearson2699/swift-ios-skills pdfkit
```

2. **Manually: put the files in place**
- File: `.github/skills/pdfkit/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill pdfkit -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/pdfkit
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/pdfkit/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill pdfkit -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/pdfkit/SKILL.md

## When to use it
- embed a PDF viewer in a Swift app
- search a document and jump to a match
- attach a highlight or text note to a page
- extract text from a PDF page
- reorder pages and save the document

## Example prompts
- Show me how to display a PDF in my Swift app with PDFKit.
- Add text search to this PDF viewer and navigate to a match.
- Explain how to attach a note to a PDF page and save the document.

## Similar
- [vercel-react-native-skills](https://affpapa.org/en/nevibecode/skills/vercel-react-native-skills.md) — skill · 255200 installs
- [animate-expo](https://affpapa.org/en/nevibecode/skills/animate-expo.md) — skill · 137900 installs
- [mobile-native](https://affpapa.org/en/nevibecode/skills/mobile-native.md) — skill · 86600 installs
- [aso](https://affpapa.org/en/nevibecode/skills/aso.md) — skill · 75400 installs
- [swiftui-pro](https://affpapa.org/en/nevibecode/skills/swiftui-pro.md) — skill · 35200 installs
- [orca-emulator](https://affpapa.org/en/nevibecode/skills/orca-emulator.md) — skill · 5800 installs

From the same set: [dpearson2699/swift-ios-skills](https://affpapa.org/en/nevibecode/by/dpearson2699/swift-ios-skills.md) — 86 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
