urlsession-code-review
This skill audits URLSession implementations across iOS and macOS projects, checking async/await adoption, proper HTTP status validation, memory lifecycle management, and secure request construction. It validates response handling, resource cleanup, session configuration, and background transfer patterns against a structured checklist. Use it when reviewing code that touches URLSession, URLRequest, URLCache, or URLError APIs.
URLSession Code Review examines iOS networking implementations for async patterns, request handling, error validation, and resource management best practices.
AI-generated summary based on this skill's SKILL.md
Install
existential-birds/beagle/urlsession-code-review · repository language: TypeScript
git clone https://github.com/existential-birds/beagle
cp -r beagle/plugins/beagle-ios/skills/urlsession-code-review ~/.claude/skills/urlsession-code-reviewFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
What does urlsession-code-review check in my networking code?
urlsession-code-review audits URLSession implementations across iOS and macOS projects, checking async/await adoption, proper HTTP status validation, memory lifecycle management, and secure request construction. It validates response handling, resource cleanup, session configuration, and background transfer patterns against a structured checklist.
How does urlsession-code-review validate HTTP error handling?
urlsession-code-review reviews HTTP error handling by checking that your code properly validates HTTP status codes, handles URLError cases, and distinguishes between network failures and server errors. It ensures response status checks occur before processing data and that error recovery paths are implemented.
Does urlsession-code-review review URLSession implementation for memory leaks?
Yes. urlsession-code-review audits memory management and resource cleanup in networking tasks, checking for retain cycles in completion handlers, proper task cancellation, delegate lifecycle management, and URLCache cleanup patterns to prevent memory leaks in long-running or background sessions.
What async/await and background session patterns does urlsession-code-review examine?
urlsession-code-review checks async/await adoption in URLSession code, validates background session configuration for proper delegate setup, verifies timeout settings, and ensures task cancellation is handled correctly. It reviews whether background transfers use appropriate session types and error recovery.
Can urlsession-code-review identify security issues in my URLRequest code?
urlsession-code-review includes security auditing of URLSession implementations, checking for secure request construction, proper certificate validation, safe header handling, and protection against common networking vulnerabilities in iOS and macOS projects.
When should I use urlsession-code-review on my project?
Use urlsession-code-review when reviewing code that touches URLSession, URLRequest, URLCache, or URLError APIs. It's most valuable during code reviews of networking layers, when refactoring to async/await, when optimizing caching strategies, or when auditing security-sensitive network operations.
SKILL.md
rendered from the published skill — quoted content, verbatim
URLSession Code Review
Quick Reference
| Topic | Reference |
|---|---|
| Async/Await | async-networking.md |
| Requests | request-building.md |
| Errors | error-handling.md |
| Caching | caching.md |
Review Checklist
Response Validation
- [ ] HTTP status codes validated - URLSession does NOT throw on 404/500
- [ ] Response cast to HTTPURLResponse before checking status
- [ ] Both transport errors (URLError) and HTTP errors handled
Memory & Resources
- [ ] Downloaded files moved/deleted (async API doesn't auto-delete)
- [ ] Sessions with delegates call
finishTasksAndInvalidate() - [ ] Long-running tasks use
[weak self] - [ ] Stored Task references cancelled when appropriate
Configuration
- [ ]
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 5 files
plugins/beagle-ios/skills/urlsession-code-review/SKILL.md
plugins/beagle-ios/skills/urlsession-code-review/references/async-networking.md
plugins/beagle-ios/skills/urlsession-code-review/references/caching.md
plugins/beagle-ios/skills/urlsession-code-review/references/error-handling.md
plugins/beagle-ios/skills/urlsession-code-review/references/request-building.md