urlsession-code-review

urlsession-code-review is a skill for Claude Code from existential-birds/beagle. It costs 60 tokens per session (810 once invoked), scanned A, original, Apache-2.0.

A checklist for reviewing URLSession networking code on Apple platforms. URLSession is Apple's built-in API for making web requests and downloading data in iOS and macOS apps.

In plain words
What is it for?
Use it to review async requests, request and response handling, caching, timeouts, connection reuse, and background uploads or downloads.
Why use it?
It helps find incorrect HTTP error handling, leaked files or sessions, unsafe request construction, poor caching, and background-download mistakes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the beagle-ios plugin — 15 skills shipped together

Good fit Use it to review async requests, request and response handling, caching, timeouts, connection reuse, and background uploads or downloads.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/existential-birds/beagle/urlsession-code-review
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add existential-birds/beagle --skill urlsession-code-review
Clone the repo
git clone --depth 1 https://github.com/existential-birds/beagle

Made for: Claude Code.

Or install beagle-ios, the plugin that ships this one along with the rest of its 15 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for urlsession-code-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/existential-birds/beagle/urlsession-code-review/github.svg)](https://agentmods.dev/skills/existential-birds/beagle/urlsession-code-review)
Your own site
<a href="https://agentmods.dev/skills/existential-birds/beagle/urlsession-code-review"><img src="https://agentmods.dev/badge/skills/existential-birds/beagle/urlsession-code-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for urlsession-code-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/existential-birds/beagle/urlsession-code-review"><img src="https://agentmods.dev/badge/skills/existential-birds/beagle/urlsession-code-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 810 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00060 $0.00810
Opus 5.5 $0.00024 $0.00324
Sonnet 5.5 $0.00012 $0.00162
Haiku 4.5 $0.00006 $0.00081

Measured 1mo ago against content hash ec8781f65e6b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

urlsession-code-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/beagle-ios/skills/urlsession-code-review/SKILL.md · 63 lines

How it starts

The opening of the file, as written. The whole thing — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

  • timeoutIntervalForResource set (default is 7 days!)
  • URLCache sized adequately (default 512KB too small)
  • Sessions reused for connection pooling

Background Sessions

  • Unique identifier (especially with app extensions)
  • File-based uploads (not data-based)
  • Delegate methods used (not completion handlers)

Security

  • No hardcoded secrets (use Keychain)
  • Header values sanitized for CRLF injection
  • Query params via URLComponents (not string concat)

Hard gates (before reporting findings)

Complete in order. Do not advance while a prior gate is open.

  1. Scope — Pass: You name at least one file under review where URLSession, URLRequest, HTTPURLResponse / URLResponse, URLCache, or URLError appears on a networking path. If none apply, stop with “out of scope.”
  2. HTTP vs transport — Pass: Before claiming missing HTTP status handling or “404 treated as success,” you cite file:line for the completion/async/for await path that receives response and state whether HTTPURLResponse is cast and statusCode is checked (or cite the helper that does). If you cannot see the handler, say unknown and ask for it—do not assume.
  3. Session lifecycle — Pass: For a custom URLSession with a delegate, you cite finishTasksAndInvalidate() or the documented long-lived/singleton pattern you rely on; for .shared, say so if the finding depends on configuration. Skip if only ad hoc URLSession.shared one-shots with no delegate issues.
  4. Background or file transfer (if applicable) — Pass: If URLSessionConfiguration.background, downloadTask, or app-extension–scoped sessions appear, findings cite identifier uniqueness, delegate vs completion-handler usage, or file URLs as required. If none of those APIs appear, mark N/A and continue.
  5. Severity and checklist — Pass: Every Critical item includes file:line and names which Review Checklist subsection it violates (e.g. Response Validation, Background Sessions). Lower-severity items still name the file(s) they are drawn from.

Read the full file on GitHub · 63 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 63 lines · 60 tokens per session scan A ec8781f65e6b

Subscribe to this mod's changes

urlsession-code-review is a skill published in the GitHub repository existential-birds/beagle (82 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 60 tokens to every session and 810 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-16.

Related

Other skills, from other repositories

app-store-review

Evaluates code against Apple's App Store Review Guidelines. Use this skill when reviewing iOS, macOS, tvOS, watchOS, or visionOS app code (Swift, Objective-C, React Native, or Expo) to identify potential App Store rejection issues before submission. Triggers on tasks involving app review preparation, compliance…

jacklandrin/OnlySwitch · 76 tokens

swift-concurrency-pro

Reviews Swift code for concurrency correctness, modern API usage, and common async/await pitfalls. Use when reading, writing, or reviewing Swift concurrency code.

jacklandrin/OnlySwitch · 35 tokens

swiftui-pro

Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance. Use when reading, writing, or reviewing SwiftUI projects.

twostraws/SwiftUI-Agent-Skill · 36 tokens

axiom-audit-camera

Use this agent to scan Swift code for camera, video, and audio capture issues including deprecated APIs, missing interruption handlers, threading violations, and permission anti-patterns.

CharlesWiltgen/Axiom · 39 tokens

mobile-platform-offline-validate

Review a Lightning Web Component for mobile offline compatibility — the Komaci offline static analyzer that pre-primes the data graph for Salesforce Mobile App Plus and Field Service Mobile App. Produces a finding list with code-level fixes covering inline GraphQL queries in @wire configurations, modern lwc:if /…

forcedotcom/sf-skills · 207 tokens

mobiai-review-code

Use when reviewing mobile code changes — check for lifecycle issues, memory leaks, thread safety, and platform-specific pitfalls.

ArisGuimera/MobiAI-Core · 28 tokens