Skip to content

dpearson2699/swift-ios-skills / skills/metrickit

metrickit

Verified

Use when collecting or analyzing production iOS or iPadOS performance telemetry with MetricKit, including iOS 27 MetricManager async metric or diagnostic reports, hang or crash triage, custom signposts, extended launch measurement, durable export, or iOS 26 MXMetricManager compatibility.

FileKindSize
SKILL.mdskill md14.1 KB
evals/evals.jsonconfig4.8 KB
references/metrickit-patterns.mdmarkdown12.3 KB

evals/evals.json

View on GitHub
{
  "skill_name": "metrickit",
  "evals": [
    {
      "id": 0,
      "prompt": "Review this telemetry plan for an app built with the iOS 27 SDK that still deploys to iOS 26: MetricManager is created in a SwiftUI dashboard, only metricReports is consumed, each report is uploaded before saving, and the plan assumes MetricManager.pastPayloads can recover missed reports. Give corrected guidance with concise Swift where useful.",
      "expected_output": "A source-grounded iOS 27 MetricManager ingestion plan with a separate iOS 26 MXMetricManager compatibility branch, durable-first handling of both modern report sequences, and no invented modern backfill API.",
      "files": [],
      "expectations": [
        "Creates and retains one long-lived MetricManager at app launch for the iOS 27 branch.",
        "Starts exactly one consumer for metricReports and one for diagnosticReports, then fans out reports after receipt rather than competing over either sequence.",
        "Encodes each MetricReport and DiagnosticReport and durably enqueues it before parsing, symbolication, or upload.",
        "Keeps network upload, retry, and expensive analysis outside the report-consumer loop after durable persistence.",
        "States that the documented iOS 27 MetricManager surface does not provide pastPayloads or pastDiagnosticPayloads and does not invent an equivalent.",
        "Uses an availability-isolated MXMetricManagerSubscriber branch for iOS 26, where pastPayloads and pastDiagnosticPayloads remain legacy compatibility APIs.",
        "Distinguishes normally daily metric reports from individual diagnostic reports and does not present MetricKit as an immediate local debugging substitute."
      ]
    },
    {
      "id": 1,
      "prompt": "Correct this iOS 27 MetricKit guidance: it creates a log with MXMetricManager.makeLogHandle, invents MXSignpostIntervalData.makeSignpostID, passes that ID to mxSignpost, looks for MXMetricPayload.signpostMetrics, and manually pairs extendLaunchMeasurement with finishExtendedLaunchMeasurement. Show the current pattern and identify what belongs only in an iOS 26 compatibility branch.",
      "expected_output": "A correction-focused answer using the iOS 27 MetricManager log handle, basic mxSignpost begin/end calls, MetricResult.signpostInterval, and trackLaunchTask while isolating legacy MX APIs.",
      "files": [],
      "expectations": [
        "Uses the retained MetricManager instance and manager.logHandle(category:) in the iOS 27 branch.",
        "Uses mxSignpost(.begin/.end, log:name:) without inventing or passing a signpost ID for the basic MetricKit pattern.",
        "States that iOS 27 custom MetricKit intervals appear as MetricResult.signpostInterval.",
        "Uses manager.trackLaunchTask(id:onTrackingError:_:) with a stable LaunchTaskID instead of manual extend and finish calls.",
        "Mentions that trackLaunchTask is MainActor-isolated, propagates the tracked closure result or error, and reports MetricManager.LaunchTaskError through onTrackingError without interrupting the work.",
        "Keeps MXMetricManager.makeLogHandle, MXMetricPayload.signpostMetrics, and paired legacy launch measurement calls only in the availability-isolated iOS 26 branch.",
        "Notes that OSSignposter intervals using a MetricKit log handle do not populate the MetricKit resource-measurement fields provided by mxSignpost."
      ]
    },
    {
      "id": 2,
      "prompt": "My SwiftUI feed stutters in development, Instruments shows a hot body update, and product wants iOS 27 production hang/crash telemetry in our analytics backend while still supporting iOS 26. What should the MetricKit skill handle directly, and what should be routed to adjacent skills?",
      "expected_output": "A boundary-aware answer that keeps modern and compatibility MetricKit ingestion in scope while routing SwiftUI code remediation and local Instruments profiling details to sibling skills.",
      "files": [],
      "expectations": [
        "Keeps iOS 27 MetricManager setup, MetricReport and DiagnosticReport ingestion, HangDiagnostic or CrashDiagnostic processing, durable export, and the isolated iOS 26 MXMetricManager compatibility path in MetricKit scope.",
        "Routes SwiftUI view invalidation, body cost, identity, and remediation patterns to the swiftui-performance skill.",
        "Routes local Instruments capture, LLDB, Memory Graph, and xctrace workflow details to the debugging-instruments skill.",
        "Mentions preserving CallStackTree and binary metadata plus matching dSYMs or an analytics symbolication pipeline for crash and hang triage.",
        "Frames MetricKit as production telemetry, including normally daily metric reports and system-produced individual diagnostics rather than an immediate local trace.",
        "Does not expand into a full SwiftUI refactor or full Instruments tutorial."
      ]
    }
  ]
}
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall