These patterns use NWConnection with completion handlers for apps supporting iOS 12-25. If your app targets iOS 26+, use NetworkConnection with async/await instead (see axiom-network-framework-ref skill).
Confirm successful installation by checking the skill directory location:
.cursor/skills/axiom-networking-legacy
Restart Cursor to activate axiom-networking-legacy. Access via /axiom-networking-legacy in your agent's command palette.
β
Security Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
These patterns use NWConnection with completion handlers for apps supporting iOS 12-25. If your app targets iOS 26+, use NetworkConnection with async/await instead (see axiom-network-framework-ref skill).
Pattern 2a: NWConnection with TLS (iOS 12-25)
Use when Supporting iOS 12-25, need TLS encryption, can't use async/await yet
Time cost 10-15 minutes
GOOD: NWConnection with Completion Handlers
importNetwork// Create connection with TLSlet connection =NWConnection( host:NWEndpoint.Host("mail.example.com"), port:NWEndpoint.Port(integerLiteral:993), using:.tls // TCP inferred)// Handle connection state changesconnection.stateUpdateHandler ={[weakself] state inswitch state {case.ready:print("Connection established")self?.sendInitialData()case.waiting(let error):print("Waiting for network: \(error)")// Show "Waiting..." UI, don't fail immediatelycase.failed(let error):print("Connection failed: \(error)")case.cancelled:print("Connection cancelled")default:break}}// Start connectionconnection.start(queue:.main)// Send data with pacingfuncsendData(){let data =Data("Hello, world!".utf8) connection.send(content: data, completion:.contentProcessed {[weakself] error iniflet error = error {print("Send error: \(error)")return}// contentProcessed callback = network stack consumed data// This is when you should send next chunk (pacing)self?.sendNextChunk()})}// Receive exact byte countfuncreceiveData(){ connection.receive(minimumIncompleteLength:10, maximumLength:10){[weakself](data, context, isComplete, error)iniflet error = error {print("Receive error: \(error)")return}iflet data = data {print("Received \(data.count) bytes")// Process data...self?.receiveData()// Continue receiving}}}
Key differences from NetworkConnection
Must use [weak self] in all completion handlers to prevent retain cycles
stateUpdateHandler receives state, not async sequence
send/receive use completion callbacks, not async/await
[weak self] -> No longer needed (async/await handles cancellation)
Pattern 2b: NWConnection UDP Batch (iOS 12-25)
Use when Supporting iOS 12-25, sending multiple UDP datagrams efficiently, need ~30% CPU reduction
Time cost 10-15 minutes
Background Traditional UDP sockets send one datagram per syscall. If you're sending 100 small packets, that's 100 context switches. Batching reduces this to ~1 syscall.
BAD: Individual UDP Sends (High CPU)
// WRONG β 100 context switches for 100 packetsfor frame in videoFrames {sendto(socket, frame.bytes, frame.count,0,&addr, addrlen)// Each send = context switch to kernel}
GOOD: Batched UDP Sends (30% Lower CPU)
importNetwork// UDP connectionlet connection =NWConnection( host:NWEndpoint.Host("stream-server.example.com"), port:NWEndpoint.Port(integerLiteral:9000), using:.udp
)connection.stateUpdateHandler ={ state inifcase.ready = state {print("Ready to send UDP")}}connection.start(queue:.main)// Batch sending for efficiencyfuncsendVideoFrames(_ frames:[Data]){ connection.batch {for frame in frames { connection.send(content: frame, completion:.contentProcessed { error iniflet error = error {print("Send error: \(error)")}})}}// All sends batched into ~1 syscall// 30% lower CPU usage vs individual sends}// Receive UDP datagramsfuncreceiveFrames(){ connection.receive(minimumIncompleteLength:1, maximumLength:65536){[weakself](data, context, isComplete, error)iniflet error = error {print("Receive error: \(error)")return}iflet data = data {// Process video frameself?.displayFrame(data)self?.receiveFrames()// Continue receiving}
β
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
βΊAccess to product documentation and roadmap tools (Jira, Notion, etc.)
βΊUnderstanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
βΊStakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Steps
1Install product management skill
2Start with user story generation for known feature
3Progress to competitive analysis: research 2-3 competitors
4Use for roadmap prioritization: apply RICE/ICE scoring
5Draft stakeholder communications and refine based on feedback
6Build template library for recurring PM tasks
7Share effective prompts with product team
Common Pitfalls
β Not validating competitive researchβverify facts before sharing
β Accepting user stories without involving engineering team
β Over-relying on frameworks without qualitative judgment
β Not customizing outputs to company culture and communication style
β Skipping stakeholder validation of generated requirements
Best Practices
β Do
+Validate research and competitive analysis with real data
+Collaborate with engineering when generating technical requirements
+Customize frameworks and templates to your company context
+Use skill for first drafts, refine with stakeholder input
+Document successful prompt patterns for PM tasks
+Combine AI efficiency with human judgment and intuition
β Don't
βDon't publish competitive analysis without fact-checking
βDon't finalize user stories without engineering review
βDon't make prioritization decisions solely on AI scoring
βDon't skip customer validation of generated requirements
βDon't ignore company-specific context and culture
π‘ Pro Tips
β Provide context: company goals, constraints, customer feedback
β Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
β Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
β Use skill for 70% generation + 30% customization to company needs
When to Use This
β Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
β Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path
1Basic: user stories, feature specs, status updates