[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76X2N5SS9XG175DPPHHZMJK":3,"skill-same:01M76X2N5SS9XG175DPPHHZMJK":63},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M76X2N5SS9XG175DPPHHZMJK","redis-clustering",null,"Redis Cluster and replication guidance covering hash tags for multi-key operations, avoiding CROSSSLOT errors, and reading from replicas to scale read-heavy workloads. Use when designing keys for a sharded Redis Cluster, debugging CROSSSLOT errors on MGET \u002F SDIFF \u002F pipelines, configuring a multi-key transaction in a cluster, or routing reads to replicas for caches, analytics, or dashboards.","stanfish06\u002Fskillquarium","stanfish06","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F93099613?v=4","01M75F1CK4ZW109ZK3T26VN52F","Zhiyuan","01M75F1CM53VH6F79DZ8GXKKES",12,"MIT","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fredis-clustering\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: redis-clustering\ndescription: Redis Cluster and replication guidance covering hash tags for multi-key operations, avoiding CROSSSLOT errors, and reading from replicas to scale read-heavy workloads. Use when designing keys for a sharded Redis Cluster, debugging CROSSSLOT errors on MGET \u002F SDIFF \u002F pipelines, configuring a multi-key transaction in a cluster, or routing reads to replicas for caches, analytics, or dashboards.\nlicense: MIT\nmetadata:\n  author: Redis, Inc.\n  version: \"0.1.0\"\n---\n\n# Redis Clustering\n\nGuidance for designing keys and routing reads in a sharded Redis Cluster (and in standalone primary\u002Freplica replication). Covers the two failure modes that bite most new cluster users: `CROSSSLOT` errors on multi-key operations, and overloading primaries with read traffic.\n\n## When to apply\n\n- Designing keys for a Redis Cluster deployment.\n- Debugging a `CROSSSLOT` error on `MGET`, `SDIFF`, transactions, or pipelines.\n- Implementing transactions \u002F Lua scripts that touch multiple keys.\n- Scaling out read traffic without adding shards.\n\n## 1. Hash tags for multi-key operations\n\nRedis Cluster distributes keys across 16,384 slots by hashing the key name. Any command that touches **multiple keys** (`MGET`, `SDIFF`, `SUNIONSTORE`, transactions, pipelines, Lua scripts with multiple `KEYS[]`) requires all keys to live on the **same slot** — otherwise the server returns a `CROSSSLOT` error.\n\nHash tags force this: the part between `{` and `}` is the only thing hashed for slot assignment, so two keys sharing a hash tag always land together.\n\n```python\n# Same slot — multi-key ops work\nredis.set(\"{user:1001}:profile\",  \"...\")\nredis.set(\"{user:1001}:settings\", \"...\")\nredis.lmove(\"{user:1001}:pending\", \"{user:1001}:processed\", \"LEFT\", \"RIGHT\")\n```\n\n```python\n# Different keys, no hash tag — CROSSSLOT on multi-key commands in cluster mode\nredis.set(\"user:1001:profile\",  \"...\")\nredis.set(\"user:1001:settings\", \"...\")\npipe = redis.pipeline()\npipe.get(\"user:1001:profile\")\npipe.get(\"user:1001:settings\")\npipe.execute()  # CROSSSLOT error in cluster\n```\n\nRules of thumb:\n\n- **Use a tag scoped to the meaningful entity**, e.g. `{user:1001}`. Avoid bare `{1001}` — unrelated namespaces (`purchase:{1001}`, `employee:{1001}`) would all collide on the same slot.\n- **Only tag where you actually need multi-key ops.** Tagging everything creates hotspots and defeats the point of sharding.\n- A single-key command on a hash-tagged key works fine, so adding tags later is incremental — but renaming keys in production is painful, so plan tagging up front for entities you'll group.\n\nSee [references\u002Fhash-tags.md](references\u002Fhash-tags.md).\n\n## 2. Read replicas for read-heavy workloads\n\nIf reads dominate writes, route them to replicas to free primary capacity. Works both in Redis Cluster (each shard has 1+ replica) and in standalone primary\u002Freplica replication.\n\n```python\n# Redis Cluster: enable replica reads on the client\nfrom redis.cluster import RedisCluster\n\nrc = RedisCluster(host=\"localhost\", port=6379, read_from_replicas=True)\nrc.set(\"key\", \"value\")     # → primary\nvalue = rc.get(\"key\")       # → may be served by a replica\n```\n\nFor non-cluster setups, point two clients at the right nodes:\n\n```python\nprimary = Redis(host=\"primary-host\", port=6379)\nreplica = Redis(host=\"replica-host\", port=6379)\nprimary.set(\"key\", \"value\")\nvalue = replica.get(\"key\")\n```\n\nThe trade-off is consistency: **replicas are eventually consistent**. Don't read your own writes from a replica; don't use replica reads for anything that requires strict freshness (financial balances, idempotency state). Good fits: cache layers, analytics, dashboards, recommendation feeds.\n\nSee [references\u002Fread-replicas.md](references\u002Fread-replicas.md).\n\n## References\n\n- [Redis Cluster spec — hash tags](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Foperate\u002Foss_and_stack\u002Freference\u002Fcluster-spec\u002F#hash-tags)\n- [Redis: multi-key operations in cluster](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Foperate\u002Frs\u002Fdatabases\u002Fdurability-ha\u002Fclustering\u002F#multikey-operations)\n- [Redis: Replication](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Foperate\u002Foss_and_stack\u002Fmanagement\u002Freplication\u002F)\n","# Redis Clustering\n\nGuidance for designing keys and routing reads in a sharded Redis Cluster (and in standalone primary\u002Freplica replication). Covers the two failure modes that bite most new cluster users: `CROSSSLOT` errors on multi-key operations, and overloading primaries with read traffic.\n\n## When to apply\n\n- Designing keys for a Redis Cluster deployment.\n- Debugging a `CROSSSLOT` error on `MGET`, `SDIFF`, transactions, or pipelines.\n- Implementing transactions \u002F Lua scripts that touch multiple keys.\n- Scaling out read traffic without adding shards.\n\n## 1. Hash tags for multi-key operations\n\nRedis Cluster distributes keys across 16,384 slots by hashing the key name. Any command that touches **multiple keys** (`MGET`, `SDIFF`, `SUNIONSTORE`, transactions, pipelines, Lua scripts with multiple `KEYS[]`) requires all keys to live on the **same slot** — otherwise the server returns a `CROSSSLOT` error.\n\nHash tags force this: the part between `{` and `}` is the only thing hashed for slot assignment, so two keys sharing a hash tag always land together.\n\n```python\n# Same slot — multi-key ops work\nredis.set(\"{user:1001}:profile\",  \"...\")\nredis.set(\"{user:1001}:settings\", \"...\")\nredis.lmove(\"{user:1001}:pending\", \"{user:1001}:processed\", \"LEFT\", \"RIGHT\")\n```\n\n```python\n# Different keys, no hash tag — CROSSSLOT on multi-key commands in cluster mode\nredis.set(\"user:1001:profile\",  \"...\")\nredis.set(\"user:1001:settings\", \"...\")\npipe = redis.pipeline()\npipe.get(\"user:1001:profile\")\npipe.get(\"user:1001:settings\")\npipe.execute()  # CROSSSLOT error in cluster\n```\n\nRules of thumb:\n\n- **Use a tag scoped to the meaningful entity**, e.g. `{user:1001}`. Avoid bare `{1001}` — unrelated namespaces (`purchase:{1001}`, `employee:{1001}`) would all collide on the same slot.\n- **Only tag where you actually need multi-key ops.** Tagging everything creates hotspots and defeats the point of sharding.\n- A single-key command on a hash-tagged key works fine, so adding tags later is incremental — but renaming keys in production is painful, so plan tagging up front for entities you'll group.\n\nSee [references\u002Fhash-tags.md](references\u002Fhash-tags.md).\n\n## 2. Read replicas for read-heavy workloads\n\nIf reads dominate writes, route them to replicas to free primary capacity. Works both in Redis Cluster (each shard has 1+ replica) and in standalone primary\u002Freplica replication.\n\n```python\n# Redis Cluster: enable replica reads on the client\nfrom redis.cluster import RedisCluster\n\nrc = RedisCluster(host=\"localhost\", port=6379, read_from_replicas=True)\nrc.set(\"key\", \"value\")     # → primary\nvalue = rc.get(\"key\")       # → may be served by a replica\n```\n\nFor non-cluster setups, point two clients at the right nodes:\n\n```python\nprimary = Redis(host=\"primary-host\", port=6379)\nreplica = Redis(host=\"replica-host\", port=6379)\nprimary.set(\"key\", \"value\")\nvalue = replica.get(\"key\")\n```\n\nThe trade-off is consistency: **replicas are eventually consistent**. Don't read your own writes from a replica; don't use replica reads for anything that requires strict freshness (financial balances, idempotency state). Good fits: cache layers, analytics, dashboards, recommendation feeds.\n\nSee [references\u002Fread-replicas.md](references\u002Fread-replicas.md).\n\n## References\n\n- [Redis Cluster spec — hash tags](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Foperate\u002Foss_and_stack\u002Freference\u002Fcluster-spec\u002F#hash-tags)\n- [Redis: multi-key operations in cluster](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Foperate\u002Frs\u002Fdatabases\u002Fdurability-ha\u002Fclustering\u002F#multikey-operations)\n- [Redis: Replication](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Foperate\u002Foss_and_stack\u002Fmanagement\u002Freplication\u002F)\n",{"name":5,"license":15,"metadata":24,"description":7},{"author":25,"version":26},"Redis, Inc.","0.1.0","master","49e49abf2f670d429e0b7e2c0349739c3fdd5cbe","skills\u002Fredis-clustering",5,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium","https:\u002F\u002Fgithub.com\u002Fstanfish06","https:\u002F\u002Fwww.stanfish.dev\u002F","2026-11-14 21:31:37",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add stanfish06\u002Fskillquarium --skill redis-clustering",{"tool":41,"command":42},"bunx","bunx skills add stanfish06\u002Fskillquarium --skill redis-clustering",{"tool":44,"command":45},"pnpm","pnpm dlx skills add stanfish06\u002Fskillquarium --skill redis-clustering","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fredis-clustering\u002FSKILL.md",true,[49,55,59],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"agents\u002Fopenai.yaml","REFERENCE","参考文档",168,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fredis-clustering\u002Fagents\u002Fopenai.yaml",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fhash-tags.md",2552,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fredis-clustering\u002Freferences\u002Fhash-tags.md",{"path":60,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fread-replicas.md",1187,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fredis-clustering\u002Freferences\u002Fread-replicas.md",[64,71,80,87,94,101],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M76ZJTRVA456GD7K8Y3EP82H","zarr-python","Stores and queries chunked N-D scientific arrays with Zarr-Python 3, including codecs, sharding, S3\u002FGCS storage, and NumPy\u002FDask\u002FXarray integration. Use for array layout, bounded I\u002FO, format migration, or scientific metadata preservation.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":75,"licenseFileUrl":76,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M76ZJQZ15Q1HKC5V85NHE325","yeet","Publish local changes to GitHub by confirming scope, committing intentionally, pushing the branch, and opening a draft PR through the GitHub app from this plugin, with `gh` used only as a fallback where connector coverage is insufficient.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":75,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M76ZJ8ASZ4QYQ70Y6SBA4Z4S","xarray","N-dimensional labeled arrays and datasets in Python. Built on top of NumPy and Dask. It introduces labels in the form of dimensions, coordinates, and attributes on top of raw NumPy-like arrays, making data analysis in physical sciences more intuitive and less error-prone. Use for working with multi-dimensional scientific data, NetCDF\u002FGRIB\u002FZarr files, climate\u002Fweather\u002Foceanographic datasets, remote sensing, geospatial imaging, large out-of-memory datasets with Dask, and labeled array operations.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fxarray\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M76ZHFBXD6VXPQ02VCEG202B","writing-mstest-tests","Use when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration. Use for \"review\" when corrected code or edits are wanted, even for one pasted assertion or passing tests with bad failure output. Covers expected\u002Factual labels; generic Boolean, collection, string, numeric, null, identity, exception, hard-cast, and object[] checks; TestContext\u002Flifecycle; timeout\u002Fcancellation; OS\u002FCI conditions, retry, cleanup, parallelization, MSTest.Sdk project setup, and MSTESTxxxx. Honor the installed MSTest version. DO NOT USE to design new test cases (code-testing), perform report-only audits, create project files rather than explain MSTest setup, run tests, migrate frameworks, or handle non-MSTest\u002Fnon-.NET code.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwriting-mstest-tests\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M76ZDFDF4N88RH6HSYGS7GP2","wgs-prs","End-to-end WGS to polygenic risk score pipeline. Takes paired-end FASTQ files (or a pre-existing VCF) through nf-core\u002Fsarek for variant calling, applies VCF QC (normalisation, hard filtering, Ti\u002FTv and Het\u002FHom checks), then computes polygenic risk scores via the PGS Catalog. Fills the FASTQ to VCF gap upstream of the gwas-prs skill.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwgs-prs\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":75,"licenseFileUrl":105,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":19},"01M76ZCC1SC68J42QK4MDC8RCG","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[]]