Install any skill in seconds. Free to start, no credit card required.
Get Started Free →dpearson2699/ios-networking
Build, review, or improve networking code in iOS/macOS apps using URLSession with async/await, structured concurrency, and modern Swift patterns.
Passed 21 of 22 test cases with the skill, and 18 of 22 without it.
and 3 more in the full report
3 fixed18 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
I'm building an iOS app and need a modern Swift API client using URLSession with async/await. Please provide a protocol-based service that supports request middleware for attaching auth headers, checks HTTP status codes, and provides an exponential backoff retry utility. Show the full Swift code implementation including endpoint definitions and error handling.
| Checked | Without skill | With skill |
|---|---|---|
| Rethrows CancellationError immediately inside the retry loop without counting it as a failed attempt or executing further retries | Missed | Passed |
| Conforms API client protocols, middleware protocols, and endpoint types to Sendable | Missed | Passed |
| Validates that the HTTP response status code is within the 200 to 299 range before decoding data | Passed | Passed |
The instructions your model reads when the skill loads.
Use URLSession with async/await and structured concurrency for ordinary HTTP, REST, uploads, downloads, and streaming. Use Network.framework for lower-level protocols and delegate/task APIs for durable background transfers.
URLSession gained native async/await overloads in iOS 15. Prefer these for foreground data, upload, download, and streaming work. Background URLSession transfers are the main exception: they still use task/delegate APIs so the system can deliver events after suspension or relaunch.
Validate networking policy locally with URLProtocol fixtures for valid 2xx,
malformed 2xx, one-time 401 refresh, bounded 429/5xx retry, timeout/offline,
cancellation, and nonretryable 4xx. Inspect headers, status, and error
classification; fix the policy and rerun. Retry only safe/idempotent or
explicitly replayable requests, and never loop token refresh.
// Basic GET
let (data, response) = try await URLSession.shared.data(from: url)
// With a configured URLRequest
var request = URLRequest(url: url)
test cases passed, vs 18 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.