Back to Skills

axiom-networking

verified

Use when implementing Network.framework connections, debugging connection failures, migrating from sockets/URLSession streams, or adopting structured concurrency networking patterns - prevents deprecated API usage, reachability anti-patterns, and thread-safety violations with iOS 12-26+ APIs

View on GitHub

Marketplace

axiom-marketplace

CharlesWiltgen/Axiom

Plugin

axiom

Repository

CharlesWiltgen/Axiom
289stars

.claude-plugin/plugins/axiom/skills/axiom-networking/SKILL.md

Last Verified

January 16, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/CharlesWiltgen/Axiom/blob/main/.claude-plugin/plugins/axiom/skills/axiom-networking/SKILL.md -a claude-code --skill axiom-networking

Installation paths:

Claude
.claude/skills/axiom-networking/
Powered by add-skill CLI

Instructions

# Network.framework Networking

## When to Use This Skill

Use when:
- Implementing UDP/TCP connections for gaming, streaming, or messaging apps
- Migrating from BSD sockets, CFSocket, NSStream, or SCNetworkReachability
- Debugging connection timeouts or TLS handshake failures
- Supporting network transitions (WiFi ↔ cellular) gracefully
- Adopting structured concurrency networking patterns (iOS 26+)
- Implementing custom protocols over TLS/QUIC
- Requesting code review of networking implementation before shipping

#### Related Skills
- Use `axiom-networking-diag` for systematic troubleshooting of connection failures, timeouts, and performance issues
- Use `axiom-network-framework-ref` for comprehensive API reference with all WWDC examples

## Example Prompts

#### 1. "How do I migrate from SCNetworkReachability? My app checks connectivity before connecting."
#### 2. "My connection times out after 60 seconds. How do I debug this?"
#### 3. "Should I use NWConnection or NetworkConnection? What's the difference?"

---

## Red Flags — Anti-Patterns to Prevent

If you're doing ANY of these, STOP and use the patterns in this skill:

### ❌ CRITICAL — Never Do These

#### 1. Using SCNetworkReachability to check connectivity before connecting
```swift
// ❌ WRONG — Race condition
if SCNetworkReachabilityGetFlags(reachability, &flags) {
    connection.start() // Network may change between check and start
}
```
**Why this fails** Network state changes between reachability check and connect(). You miss Network.framework's smart connection establishment (Happy Eyeballs, proxy handling, WiFi Assist). Apple deprecated this API in 2018.

#### 2. Blocking socket operations on main thread
```swift
// ❌ WRONG — Guaranteed ANR (Application Not Responding)
let socket = socket(AF_INET, SOCK_STREAM, 0)
connect(socket, &addr, addrlen) // Blocks main thread
```
**Why this fails** Main thread hang → frozen UI → App Store rejection for responsiveness. Even "quick" connects take 200-500ms.

###

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
33954 chars