pdfkit — Claude Code skill: what it does, how to install
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.
npx skills add dpearson2699/swift-ios-skills --skill pdfkit -a claude-codeWhat pdfkit 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.
What it helps with
- 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 for the agent
- 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.
How to install pdfkit
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill pdfkit -a claude-code2Manually: put the files in place
~/.claude/skills/pdfkit/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/pdfkit/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill pdfkit -a codex2Manually: put the files in place
.agents/skills/pdfkit/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill pdfkit -a cursor2Manually: put the files in place
.cursor/skills/pdfkit/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dpearson2699/swift-ios-skills pdfkit2Manually: put the files in place
.github/skills/pdfkit/SKILL.md1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill pdfkit -a gemini-cli2Platform CLI
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/pdfkitManually: put the files in place
.devin/skills/pdfkit/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill pdfkit -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about pdfkit
How do I install pdfkit in Claude Code?
Run npx skills add dpearson2699/swift-ios-skills --skill pdfkit -a claude-code. The skill file is located at ~/.claude/skills/pdfkit/SKILL.md.
What does the pdfkit skill do?
It guides PDFKit use in Swift apps, including document display, text search and extraction, annotations, and page operations.
What should I check when navigating to a PDF page?
Page indices are zero-based. Check that an index is within the document’s page count, since an out-of-range access can raise an exception.