# swift-nio

Get SwiftNIO guidance for TCP/UDP services, binary protocols, and event-loop issues. Useful when building network code or moving from futures to async/await.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · ★ 62
- Author: wendylabsinc
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/wendylabsinc/claude-skills/tree/HEAD/swift-nio/SKILL.md
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/skills/swift-nio

## What it does

The skill directs the agent to inspect `Package.swift` and consider Swift Concurrency before changing chains of `EventLoopFuture`. For new code, it points toward `NIOAsyncChannel`. Keep event loops unblocked; CPU-heavy work belongs on a dispatch queue or in `NIOThreadPool`.

Its reference files cover channels and pipelines, event loops, `ByteBuffer`, and binary codecs such as `ByteToMessageDecoder` and `MessageToByteEncoder`. They give the agent material for TCP or UDP implementations, message parsing, and bridging futures with async/await. Waiting synchronously on an `EventLoopFuture` from its own event loop can deadlock, so that constraint matters when diagnosing hangs.

To add the skill to Claude Code, run the supplied `npx` installation command. The installed skill file is at `~/.claude/skills/swift-nio/SKILL.md`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add wendylabsinc/claude-skills --skill swift-nio -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/swift-nio/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/swift-nio/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add wendylabsinc/claude-skills --skill swift-nio -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/swift-nio/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add wendylabsinc/claude-skills --skill swift-nio -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/swift-nio/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install wendylabsinc/claude-skills swift-nio
```

2. **Manually: put the files in place**
- File: `.github/skills/swift-nio/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add wendylabsinc/claude-skills --skill swift-nio -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/wendylabsinc/claude-skills --path swift-nio
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/swift-nio/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add wendylabsinc/claude-skills --skill swift-nio -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/wendylabsinc/claude-skills/tree/HEAD/swift-nio/SKILL.md

## When to use it
- diagnose a blocked event loop
- build a TCP or UDP service
- decode a binary protocol
- fix a `ChannelPipeline` type mismatch
- migrate `EventLoopFuture` code to async/await

## Example prompts
- Inspect `Package.swift` and suggest an async/await approach for this SwiftNIO networking code.
- Find why this TCP server blocks its event loop and propose a fix.
- Help me decode binary messages with `ByteToMessageDecoder` and `ByteBuffer`.

## Similar
- [migrate-to-shoehorn](https://affpapa.org/en/nevibecode/skills/migrate-to-shoehorn.md) — skill · 475388 installs
- [write-swift](https://affpapa.org/en/nevibecode/skills/write-swift.md) — skill · 119300 installs
- [megacave](https://affpapa.org/en/nevibecode/skills/megacave.md) — skill · 25400 installs
- [find-docs](https://affpapa.org/en/nevibecode/skills/find-docs.md) — skill · 9400 installs
- [typescript-advanced-types](https://affpapa.org/en/nevibecode/skills/typescript-advanced-types.md) — skill · 92169 installs
- [smart-explore](https://affpapa.org/en/nevibecode/skills/smart-explore.md) — skill · 7300 installs

From the same set: [wendylabsinc/claude-skills](https://affpapa.org/en/nevibecode/by/wendylabsinc/claude-skills.md) — 25 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
