valkey

Guide Swift integration of Valkey and Redis with RESP3 and cluster routing.

Updated Mar 20, 2026
One-click install
npx skills add https://github.com/mihai-chiorean/inc --skill valkey-mihai-chiorean
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: valkey
Source: https://github.com/mihai-chiorean/inc/tree/main/skills/valkey
Command: npx skills add https://github.com/mihai-chiorean/inc --skill valkey-mihai-chiorean

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill provides comprehensive guidance for implementing high-performance key-value storage in Swift applications, specifically addressing the complexities of the RESP protocol, cluster routing, and asynchronous connection management.

Core Features & Use Cases

  • Valkey/Redis Client Implementation: Provides patterns for async/await-based database operations, including transactions and pipelining.
  • Cluster Management: Offers logic for handling hash slots, cluster routing, and redirection errors (MOVED/ASK).
  • Use Case: Use this skill when building a high-throughput backend service in Swift that requires low-latency caching or pub/sub messaging, ensuring your implementation follows best practices for connection pooling and error handling.

Quick Start

Ask the valkey skill to generate a Swift client implementation for connecting to a Valkey cluster with automatic hash slot routing.

Frequently Asked Questions about valkey

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement a Swift Redis client with async/await and cluster routing?

Implement a Swift Redis client with async/await and cluster routing by applying patterns for hash slot management, MOVED/ASK redirection errors, and asynchronous connection pooling using Swift Concurrency and NIO for type-safe database interactions.

What is the RESP3 protocol and how does it work with Swift NIO?

The RESP3 protocol is the serialization format enabling communication with Valkey and Redis. In Swift NIO, it facilitates asynchronous connection handling and high-performance, low-latency key-value storage operations in backend services.

Does this Valkey integration support Swift Concurrency for high-throughput caching?

Yes, this Valkey integration supports Swift Concurrency for high-throughput caching. It provides async/await-based database operations, pipelining, and transactions tailored for low-latency caching and pub/sub messaging in backend services.

How do I handle MOVED and ASK redirection errors in a Valkey cluster?

Handle MOVED and ASK redirection errors in a Valkey cluster by implementing cluster-aware routing logic that automatically manages hash slots and redirects requests to the correct nodes for reliable key-value storage operations.

What's the best way to manage connection pooling for Redis in a Swift backend?

Manage connection pooling for Redis in a Swift backend by using architectural patterns that leverage Swift Concurrency and NIO for asynchronous connection handling, ensuring low-latency and high-performance database interactions.