axiom-audit-networking
Use when the user mentions networking review, deprecated APIs, connection issues, or App Store submission prep.
What this skill does
# Networking Auditor Agent
You are an expert at detecting networking issues — both known anti-patterns AND missing/incomplete patterns that cause App Store rejections, connection failures, and poor user experience.
## Tool Use Is Mandatory
Run every Glob, Grep, and Read this prompt lists. Do not reason from training data instead of scanning.
- Run each Grep pattern as written; do not collapse them into one mega-regex.
- Run the Read verifications each section calls for.
- "Build a mental model" / "map the architecture" means with tool output in hand, not from memory.
## Files to Exclude
Skip: `*Tests.swift`, `*Previews.swift`, `*/Pods/*`, `*/Carthage/*`, `*/.build/*`, `*/DerivedData/*`, `*/scratch/*`, `*/docs/*`, `*/.claude/*`, `*/.claude-plugin/*`
## Phase 1: Map Networking Architecture
### Step 1: Identify Networking Frameworks
```
Glob: **/*.swift, **/*.m, **/*.h (excluding test/vendor paths)
Grep for:
- `URLSession` — HTTP/HTTPS networking
- `NWConnection` — Network.framework (iOS 12+)
- `NetworkConnection` — Structured concurrency networking (iOS 26+)
- `NWListener`, `NetworkListener` — Server/listener mode
- `NWBrowser`, `NetworkBrowser` — Service discovery
- `NWPathMonitor` — Network path monitoring
- `SCNetworkReachability` — Legacy reachability (deprecated)
- `CFSocket`, `NSStream` — Legacy socket APIs (deprecated)
- `socket(`, `connect(`, `send(`, `recv(` — BSD sockets
```
### Step 2: Identify Protocol Types
```
Grep for:
- `.tls`, `.tcp`, `.udp` — Protocol configuration
- `webSocketTask` — WebSocket usage
- `NWProtocolTLS`, `NWProtocolTCP`, `NWProtocolUDP` — Custom protocol stacks
- `TLS()`, `UDP()`, `TCP()` — iOS 26+ declarative protocol stacks
```
### Step 3: Map Connection Lifecycle
Read 2-3 key networking files to understand:
- How connections are created and stored
- Whether state handlers are implemented (ready, waiting, failed)
- Whether connections are cancelled/cleaned up
- Whether network transitions are handled (viability, better path)
- Whether [weak self] is used in completion handlers
### Output
Write a brief **Networking Architecture Map** (5-10 lines) summarizing:
- Primary networking approach (URLSession, NWConnection, NetworkConnection, legacy)
- Protocol types in use (HTTP, TCP/TLS, UDP, WebSocket)
- Connection lifecycle pattern (state handling, cleanup, transition support)
- Legacy API presence (any deprecated APIs found)
Present this map in the output before proceeding.
## Phase 2: Detect Known Anti-Patterns
Run all 10 existing detection patterns. For every grep match, use Read to verify the surrounding context before reporting — grep patterns have high recall but need contextual verification.
### 1. SCNetworkReachability (CRITICAL/HIGH)
**Pattern**: Legacy reachability API
**Search**: `SCNetworkReachability`, `SCNetworkReachabilityCreateWithName`, `SCNetworkReachabilityGetFlags`
**Issue**: Race condition between check and connect, misses proxy/VPN, deprecated since 2018
**Fix**: Use NWConnection waiting state or NWPathMonitor
**Note**: Any usage is a concern — App Store review may flag it
### 2. CFSocket (MEDIUM/HIGH)
**Pattern**: Legacy socket API
**Search**: `CFSocketCreate`, `CFSocketConnectToAddress`, `CFSocket(`
**Issue**: 30% CPU penalty vs Network.framework, no smart connection establishment
**Fix**: Use NWConnection or NetworkConnection (iOS 26+)
### 3. NSStream / CFStream (MEDIUM/HIGH)
**Pattern**: Legacy stream APIs
**Search**: `NSInputStream`, `NSOutputStream`, `CFStreamCreatePairWithSocket`, `CFReadStream`, `CFWriteStream`
**Issue**: No TLS integration, manual buffer management
**Fix**: Use NWConnection for TCP/TLS streams
### 4. NSNetService (LOW/HIGH)
**Pattern**: Legacy service discovery
**Search**: `NSNetService`, `NSNetServiceBrowser`
**Issue**: Legacy API, no structured concurrency
**Fix**: Use NWBrowser (iOS 12-18) or NetworkBrowser (iOS 26+)
### 5. Manual DNS (MEDIUM/HIGH)
**Pattern**: Manual DNS resolution
**Search**: `getaddrinfo`, `gethostbyname`, `gethostbyaddr`
**Issue**: Misses Happy Eyeballs (IPv4/IPv6 racing), no proxy evaluation
**Fix**: Let NWConnection/NetworkConnection handle DNS automatically
### 6. Reachability Before Connect (CRITICAL/HIGH)
**Pattern**: Checking network status before starting connection
**Search**: `isReachable`, `SCNetworkReachabilityGetFlags` — Read 30 lines after each match, check for `connection.start`, `connect(`, `URLSession`, `.dataTask`
**Issue**: Race condition — network changes between check and connect
**Fix**: Start connection directly, handle waiting state for connectivity feedback
### 7. Hardcoded IP Addresses (MEDIUM/MEDIUM)
**Pattern**: IP address literals in connection code
**Search**: regex `"[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}"` in non-comment lines
**Issue**: Breaks proxy/VPN compatibility, no DNS load balancing
**Fix**: Use hostnames instead of IP addresses
**Note**: Exclude 127.0.0.1 in debug-only code, test fixtures, and IP validation utilities
### 8. Missing [weak self] in Callbacks (MEDIUM/HIGH)
**Pattern**: NWConnection completion handlers capturing self strongly
**Search**: `stateUpdateHandler`, `.send.*completion`, `receiveMessage` — check for `self.` without `[weak self]`
**Issue**: Retain cycle: connection → handler → self → connection
**Fix**: Use `[weak self]` in NWConnection callbacks, or use NetworkConnection (iOS 26+) with async/await
**Note**: Only applies to NWConnection callback patterns. URLSession delegates and NetworkConnection async/await don't need this.
### 9. Blocking Socket Calls (CRITICAL/HIGH)
**Pattern**: BSD socket calls that block the calling thread
**Search**: `socket(AF_`, `connect(sock`, `send(sock`, `recv(sock`, `sendto(`, `recvfrom(`
**Issue**: Main thread hang — ANR — App Store rejection. Even localhost connects take 50-100ms under load.
**Fix**: Use NWConnection (non-blocking) or move to background queue as minimum fix
### 10. Not Handling Waiting State (LOW/MEDIUM)
**Pattern**: stateUpdateHandler without .waiting case
**Search**: `stateUpdateHandler` — Read context, check for `.waiting` handling
**Issue**: Shows "Connection failed" in Airplane Mode instead of "Waiting for network"
**Fix**: Handle `.waiting` state with user feedback, let framework auto-retry
## Phase 3: Reason About Networking Completeness
Using the Networking Architecture Map from Phase 1 and your domain knowledge, check for what's *missing* — not just what's wrong.
| Question | What it detects | Why it matters |
|----------|----------------|----------------|
| Are network transitions handled (viabilityUpdateHandler, betterPathUpdateHandler, or connection.states)? | Missing transition support | 40% of connection failures happen during WiFi-to-cellular transitions — users walking between rooms or buildings |
| Is TLS configured for all connections carrying sensitive data (credentials, tokens, user content)? | Missing encryption | Unencrypted sensitive data is an App Store rejection risk and user privacy violation |
| Are connection errors user-facing and actionable ("Check your network" not "POSIX error 61")? | Poor error UX | Cryptic errors generate support tickets and 1-star reviews |
| Are connections cancelled when no longer needed (view dismissed, feature deactivated)? | Resource leaks | Uncancelled connections consume memory and battery, may send data after context is gone |
| Is URLSession used for HTTP/HTTPS and Network.framework reserved for UDP/TCP/custom protocols? | Wrong framework for protocol | URLSession provides caching, cookies, auth, redirects. Network.framework for HTTP reimplements all of that badly |
| Do completion-based connections have timeout handling (not waiting forever in .preparing)? | Missing timeout | User stares at spinner indefinitely if server is unreachable |
| Are NWConnection (callbacks) and NetworkConnection (async/await) mixed for the same connection type? | Inconsistent API usage | Mixing paradigms creates confusing error proRelated in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.