Skip to main content
skill CX Codex

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

Guides AI agents through building iOS media playback UI, configuring AVPlayerViewController, SwiftUI VideoPlayer, and Picture-in-Picture.

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

What avkit does

This skill provides code patterns for AVKit and AVFoundation playback UI on iOS. It gives coding assistants guidance for presenting AVPlayerViewController, embedding it inside existing UIKit view hierarchies, or rendering SwiftUI VideoPlayer views. It explicitly tells the agent never to subclass AVPlayerViewController.

Setting up background audio and Picture-in-Picture requires specific steps. You must add the audio value to UIBackgroundModes, set the audio session category to .playback, and defer calling setActive(true) until playback starts. PiP fails when an item contains only audio or uses an unsupported container, so the skill highlights checks for playable media before activation.

To prevent a black flash before playback starts, the guide shows how to observe isReadyForDisplay. For advanced SwiftUI controls like custom delegate callbacks or speed adjustments, it details wrapping the UIKit player in UIViewControllerRepresentable.

What it helps with

  • embed AVPlayerViewController inside a UIKit container view
  • configure AVAudioSession and background modes for Picture-in-Picture
  • overlay custom branding onto a SwiftUI VideoPlayer
  • prevent black flashes before media playback begins

Example prompts for the agent

  • Show how to embed AVPlayerViewController as a child view controller
  • Configure AVAudioSession for video playback and Picture-in-Picture
  • Create a SwiftUI VideoPlayer with an interactive overlay

How to install avkit

1Skills CLI (Vercel)

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

2Manually: put the files in place

~/.claude/skills/avkit/SKILL.md

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

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

Questions about avkit

How to install avkit in Claude Code?

Run npx skills add dpearson2699/swift-ios-skills --skill avkit -a claude-code in your terminal. This imports the skill directly into your environment.

What does the avkit skill do?

It teaches coding agents how to implement media playback across UIKit and SwiftUI using AVKit. It covers player presentation, background audio configuration, and Picture-in-Picture handling.

Why does Picture-in-Picture fail on certain media items?

PiP requires a ready AVPlayerItem with video tracks and supported codecs. It will not activate for audio-only items or when UIBackgroundModes lacks the audio category.

Similar skills

Everything for Mobile →

From the same set69

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