Back to Skills

dockkit

Control motorized camera docks and enable intelligent subject tracking using DockKit. Use when discovering DockKit-compatible accessories, implementing camera subject tracking for faces or bodies, controlling dock motors for pan and tilt, configuring framing behavior, setting regions of interest, or building video apps with automatic camera tracking.

857stars43forksUpdated 7/9/2026

Security Assessment

Safe(100/100)
Security Score100/100

About dockkit

Framework guidance for DockKit, which integrates iOS apps with motorized camera stands and gimbals that physically track subjects by rotating the iPhone. DockKit handles motor control, subject detection, and framing so any app using AVFoundation camera APIs gets 360-degree pan and 90-degree tilt tracking with no additional code, targeting iOS 17+ with Swift 6.3. It requires a physical DockKit-compatible accessory and a real device - the Simulator cannot connect to dock hardware - needs no special entitlements (though camera apps still supply NSCameraUsageDescription), and communicates with paired accessories through the DockKit system daemon. Accessories are discovered by observing DockAccessoryManager.shared.accessoryStateChanges for docked and undocked events. System tracking is the default mode: built-in ML inference detects faces and bodies and drives the motors, toggled with setSystemTrackingEnabled, and users can pick a subject via selectSubject(at:) or selectSubjects. For custom control, apps disable system tracking and supply their own DockAccessory.Observation values - of type .humanFace, .humanBody, or .object, using normalized lower-left-origin rects compatible with Vision - passed with a CameraInformation constructed from the active AVCaptureDevice and current sample buffer at 10-30 fps. Framing is controlled through modes (.automatic as the documented default, plus .center, .left, and .right) and a region of interest set with normalized upper-left coordinates, useful when overlays or non-standard aspect ratios crop the frame. Direct motor control is available after disabling system tracking by calling setAngularVelocity with a Vector3D in radians per second, where x is pitch/tilt, y is yaw/pan, and z is roll. The skill also covers animations, tracking state and subject selection, accessory events, and battery monitoring, with a review checklist for custom-tracking code.

FAQ

Can I test DockKit in the Simulator?

No. DockKit requires a physical DockKit-compatible accessory and a real device, because the Simulator cannot connect to dock hardware.

What tracking does the system provide out of the box?

System tracking is the default mode: it analyzes AVFoundation camera frames with built-in ML, detects faces and bodies, and drives the motors for 360-degree pan and 90-degree tilt with no extra code.

How do I supply my own tracking observations?

Disable system tracking, then construct DockAccessory.Observation values (type .humanFace, .humanBody, or .object) from your detector and pass them with a CameraInformation to accessory.track at 10-30 fps.

How do I control the motors directly?

Disable system tracking first, then call setAngularVelocity with a Vector3D in radians per second, where x is pitch/tilt, y is yaw/pan, and z is roll; pass an empty Vector3D to stop.

What framing options are available?

Framing modes are .automatic (the documented default), .center, .left, and .right, and you can constrain tracking to part of the frame with setRegionOfInterest using normalized upper-left coordinates.

All Files

3 files
evals/evals.json4.9 KB
View
references/dockkit-patterns.md23.1 KB
View
SKILL.md16.9 KB
View

Install dockkit

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill