swift-valkey — Claude Code skill: what it does, how to install
Guides coding agents on using Valkey and Redis in Swift with the valkey-swift package, cluster routing, and pub/sub.
npx skills add wendylabsinc/claude-skills --skill swift-valkey -a claude-codeWhat swift-valkey does
The skill provides idiomatic code patterns for interacting with Valkey and Redis using Swift concurrency. It focuses on the valkey-swift package, demonstrating connection setup and command execution with native async/await.
Guidance covers key-value operations with conditional writes, hashes, queues using lists, sets, and leaderboards via sorted sets. It also covers pipelining multiple operations in one round-trip, executing MULTI/EXEC transactions, consuming pub/sub streams, and matching errors with ValkeyClientError.
In clustered environments, the guidance explains routing shards via hash tags like {user:123}. Custom setups require configuring ValkeyClient.Configuration to define explicit TLS options, passwords, and timeout values.
What it helps with
- connect Swift applications to Valkey or Redis clusters
- implement pub/sub listeners and publishers with async streams
- batch operations using Redis transactions or pipelining
- configure hash tags to pin related keys to a single shard
- handle connection drops and timeouts via
ValkeyClientError
Example prompts for the agent
- Write a Swift function to cache session tokens in Valkey with a one-hour expiration.
- Show how to subscribe to Valkey pub/sub channels using valkey-swift.
- Set up a Valkey cluster connection in Swift with hash tags for user profiles.
How to install swift-valkey
1Skills CLI (Vercel)
npx skills add wendylabsinc/claude-skills --skill swift-valkey -a claude-code2Manually: put the files in place
~/.claude/skills/swift-valkey/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/swift-valkey/
1Skills CLI (Vercel)
npx skills add wendylabsinc/claude-skills --skill swift-valkey -a codex2Manually: put the files in place
.agents/skills/swift-valkey/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add wendylabsinc/claude-skills --skill swift-valkey -a cursor2Manually: put the files in place
.cursor/skills/swift-valkey/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install wendylabsinc/claude-skills swift-valkey2Manually: put the files in place
.github/skills/swift-valkey/SKILL.md1Skills CLI (Vercel)
npx skills add wendylabsinc/claude-skills --skill swift-valkey -a gemini-cli2Platform CLI
gemini skills install https://github.com/wendylabsinc/claude-skills --path swift-valkeyManually: put the files in place
.devin/skills/swift-valkey/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add wendylabsinc/claude-skills --skill swift-valkey -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about swift-valkey
How do I install swift-valkey in Claude Code?
Run npx skills add wendylabsinc/claude-skills --skill swift-valkey -a claude-code in your terminal.
What does swift-valkey do?
It gives your coding agent reference patterns for the valkey-swift driver, covering async/await commands, cluster routing, data types, and transactions.
Which Swift package is required?
The patterns require adding valkey-io/valkey-swift.git from version 1.0.0 or higher to your Package.swift dependencies.