返回顶部
u

urlsession-code-review

Reviews URLSession networking code for iOS/macOS. Covers async/await patterns, request building, error handling, caching, and background sessions.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.2.0
安全检测
已通过
103
下载量
0
收藏
概述
安装方式
版本历史

urlsession-code-review

# URLSession Code Review ## Quick Reference | Topic | Reference | |-------|-----------| | Async/Await | [async-networking.md](references/async-networking.md) | | Requests | [request-building.md](references/request-building.md) | | Errors | [error-handling.md](references/error-handling.md) | | Caching | [caching.md](references/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) ## Output Format ```markdown ### Critical 1. [FILE:LINE] Missing HTTP status validation - Issue: 404/500 responses not treated as errors - Fix: Check `httpResponse.statusCode` is 200-299 ```

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 urlsession-code-review-1776098965 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 urlsession-code-review-1776098965 技能

通过命令行安装

skillhub install urlsession-code-review-1776098965

下载 Zip 包

⬇ 下载 urlsession-code-review v1.2.0

文件大小: 11.68 KB | 发布时间: 2026-4-14 12:57

v1.2.0 最新 2026-4-14 12:57
Version 1.2.0 of urlsession-code-review updates and expands skill documentation and guidelines:

- Adds comprehensive SKILL.md with supported triggers, overview, detailed review checklist, and quick reference links.
- Checklist now explicitly covers async/await, request and error handling, memory management, caching, configuration, background sessions, and security best practices.
- Includes a sample markdown output format for reporting code review findings.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部