metrickit — Claude Code skill: MetricKit telemetry
A skill that steers MetricKit work on iOS and iPadOS: production metrics, diagnostic reports, and how to keep them from slipping away.
npx skills add dpearson2699/swift-ios-skills --skill metrickit -a claude-codeWhat metrickit does
The skill lays out a collection pipeline for MetricKit telemetry. You keep one MetricManager alive for the app's lifetime and run a single consumer task for metric reports, another for diagnostics. Handing the same sequence to a second listener gets you an arbitrary slice of reports, so branch out only once a report is safely on disk.
Reports are split by kind on the way in: crashes, hangs, CPU exceptions, disk writes, launches and memory exceptions, the last one new in iOS 27. An @unknown default arm keeps a future category from breaking ingestion. Custom signpost metrics, launch timing and reliable upload each get their own section, and references/metrickit-patterns.md holds the longer patterns for ingestion and for the compatibility path.
Expect a beta warning. The iOS 27 surface is written against Apple's beta documentation and nobody compiled it with Xcode 27 yet. Build against the shipping Xcode 27 SDK before you ship. Keep MXMetricManager confined to an explicit iOS 26 branch.
What it helps with
- catch hangs and crashes from production devices
- persist each report before parsing it
- add custom signpost intervals to the daily report
- measure app launch outside Instruments
- keep iOS 27 and iOS 26 ingestion paths apart
Example prompts for the agent
- Wire up MetricKit ingestion in
MetricsServicewith a single long-livedMetricManager. - Walk through the
HangDiagnosticfrom the latest report and show the call stack. - Add an iOS 26 compatibility branch that still goes through
MXMetricManager.
How to install metrickit
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill metrickit -a claude-code2Manually: put the files in place
~/.claude/skills/metrickit/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/metrickit/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill metrickit -a codex2Manually: put the files in place
.agents/skills/metrickit/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill metrickit -a cursor2Manually: put the files in place
.cursor/skills/metrickit/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dpearson2699/swift-ios-skills metrickit2Manually: put the files in place
.github/skills/metrickit/SKILL.md1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill metrickit -a gemini-cli2Platform CLI
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/metrickitManually: put the files in place
.devin/skills/metrickit/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill metrickit -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 metrickit
How do I install metrickit in Claude Code?
Run npx skills add dpearson2699/swift-ios-skills --skill metrickit -a claude-code. The skill lands at ~/.claude/skills/metrickit/SKILL.md.
What does metrickit do?
It sets the working order for MetricKit in production: one MetricManager, one consumer per report sequence, storage before parsing, and diagnostics routed by explicit type.
Does metrickit replace MXMetricManager with MetricManager?
On iOS 27 it points you at the Swift-first MetricManager with async report sequences. MXMetricManager stays only inside an explicit iOS 26 compatibility branch.