photokit — Claude Code skill for iOS photos and camera
A skill that gives the agent working patterns for photo picking, camera capture and media permissions in iOS apps written in Swift.
npx skills add dpearson2699/swift-ios-skills --skill photokit -a claude-codeWhat photokit does
Inside are recipes for PhotoKit and AVFoundation: a single or multi-photo picker built on PhotosPicker, media type filters, and async loading through Transferable. A separate section covers the camera side of AVCaptureSession. Permissions get their own chapter — library access levels, the Info.plist keys, and the request calls on PHPhotoLibrary and AVCaptureDevice.
The snippets target iOS 26 with Swift 6.3, though most stay compatible down to iOS 16 unless a note says otherwise. Two reference files come along: references/photokit-patterns.md for picker recipes and references/camera-capture.md for capture session examples.
One point the skill keeps making: PhotosPicker runs out-of-process, so browsing needs no library permission and the app only sees what the user picked. Ask for access explicitly when you read the whole library or write into it. For the camera, the access prompt never appears without NSCameraUsageDescription in Info.plist, so add the key before the session starts.
What it helps with
- let the user pick several photos with a selection cap
- restrict the picker to videos or Live Photos only
- load a picked item asynchronously without freezing the main thread
- request camera access and handle a denial cleanly
- decide between read-write and add-only library permission
Example prompts for the agent
- Add a single-photo
PhotosPickerto this screen, filtered to.images - Set up an
AVCaptureSessionfor video and check camera permission before starting it - Review my photo picking code for anything that could block the main thread
How to install photokit
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill photokit -a claude-code2Manually: put the files in place
~/.claude/skills/photokit/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/photokit/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill photokit -a codex2Manually: put the files in place
.agents/skills/photokit/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill photokit -a cursor2Manually: put the files in place
.cursor/skills/photokit/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dpearson2699/swift-ios-skills photokit2Manually: put the files in place
.github/skills/photokit/SKILL.md1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill photokit -a gemini-cli2Platform CLI
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/photokitManually: put the files in place
.devin/skills/photokit/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill photokit -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 photokit
How do I install photokit in Claude Code?
Run npx skills add dpearson2699/swift-ios-skills --skill photokit -a claude-code. The skill file lands at ~/.claude/skills/photokit/SKILL.md.
What does photokit do?
It hands the agent ready patterns for picking photos, capturing with the camera, loading images and requesting permissions in Swift iOS apps.
Does PhotosPicker need photo library permission?
No. PhotosPicker runs outside the app process and returns only the items the user selected.