[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76X2SAGBBWM186N2VAEZVTN":3,"skill-same:01M76X2SAGBBWM186N2VAEZVTN":75},{"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},"01M76X2SAGBBWM186N2VAEZVTN","redis-connections",null,"Redis client and connection guidance covering connection pooling, multiplexing, pipelining, client-side caching with RESP3, avoiding slow commands (KEYS, SMEMBERS, HGETALL), and tuning socket timeouts. Use when configuring a Redis client (redis-py, Jedis, Lettuce, NRedisStack), batching commands for throughput, eliminating per-request connection creation, iterating large keyspaces with SCAN, enabling client-side caching for read-heavy workloads, or setting connect and read timeouts.","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-connections\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: redis-connections\ndescription: Redis client and connection guidance covering connection pooling, multiplexing, pipelining, client-side caching with RESP3, avoiding slow commands (KEYS, SMEMBERS, HGETALL), and tuning socket timeouts. Use when configuring a Redis client (redis-py, Jedis, Lettuce, NRedisStack), batching commands for throughput, eliminating per-request connection creation, iterating large keyspaces with SCAN, enabling client-side caching for read-heavy workloads, or setting connect and read timeouts.\nlicense: MIT\nmetadata:\n  author: Redis, Inc.\n  version: \"0.1.0\"\n---\n\n# Redis Connections\n\nClient-side guidance for talking to Redis efficiently: how to share connections, how to batch commands, which commands not to call in production, when to turn on client-side caching, and how to set timeouts that fail fast without breaking healthy traffic.\n\n## When to apply\n\n- Creating or reviewing a Redis client setup (redis-py, Jedis, Lettuce, go-redis, NRedisStack).\n- Making many small Redis calls and wondering where the latency is going.\n- Iterating large keyspaces, sets, hashes, or lists.\n- Enabling client-side caching for hot keys.\n- Tuning connect \u002F read \u002F write timeouts.\n\n## 1. Pool or multiplex — never one connection per request\n\nThe single biggest mistake in Redis client code is opening a new TCP connection for every operation. Always either:\n\n- **Pool** — keep N persistent connections that the application leases per call (redis-py `ConnectionPool`, Jedis `JedisPooled`, go-redis client).\n- **Multiplex** — share a single connection across all requests (Lettuce, NRedisStack).\n\n| Style | Used by | Note |\n|---|---|---|\n| Pool | redis-py, Jedis, go-redis | Each lease blocks if pool exhausted; size the pool to your concurrency |\n| Multiplex | Lettuce, NRedisStack | Single connection; **cannot** carry blocking commands like `BLPOP` |\n\n```python\n# redis-py — connection pool\npool = redis.ConnectionPool(host=\"localhost\", port=6379, max_connections=50)\nr = redis.Redis(connection_pool=pool)\n```\n\nSee [references\u002Fpooling.md](references\u002Fpooling.md) for Python + Java + Lettuce examples.\n\n## 2. Pipeline bulk work\n\nFor N commands that don't depend on each other's results, send them as a single batch with pipelining. One round-trip instead of N.\n\n```python\npipe = redis.pipeline()\nfor user_id in user_ids:\n    pipe.get(f\"user:{user_id}\")\nresults = pipe.execute()\n```\n\nUse **non-transactional** pipelining for performance, and `pipeline(transaction=True)` only when you actually need atomicity (see redis-core's transactions guidance).\n\nSee [references\u002Fpipelining.md](references\u002Fpipelining.md).\n\n## 3. Avoid commands that scan everything\n\nAnything that walks the whole keyspace (or a whole large container) blocks the server. Use incremental variants instead.\n\n| Don't | Use |\n|---|---|\n| `KEYS pattern` | `SCAN` cursor loop |\n| `SMEMBERS large_set` | `SSCAN` |\n| `HGETALL large_hash` | `HSCAN` |\n| `LRANGE 0 -1` on a huge list | Paginate (`LRANGE 0 100`) |\n\n```python\ncursor = 0\nwhile True:\n    cursor, keys = redis.scan(cursor, match=\"user:*\", count=100)\n    for key in keys:\n        process(key)\n    if cursor == 0:\n        break\n```\n\n**Blocking commands (`BLPOP`, `BRPOP`, `BLMOVE`) are different** — they intentionally wait for data and are fine for queue consumers, but always pass a timeout, and don't issue them on a multiplexed connection (Lettuce, NRedisStack).\n\nSee [references\u002Fblocking.md](references\u002Fblocking.md).\n\n## 4. Client-side caching for hot keys\n\nFor data that's read often and written rarely (config, feature flags, sessions on every request), enable RESP3 client-side caching. The client keeps a local copy and the server invalidates it on writes — saving the round trip for hot reads.\n\n```python\nclient = redis.Redis(\n    host=\"localhost\",\n    port=6379,\n    protocol=3,                                    # RESP3 is required\n    cache_config=redis.CacheConfig(max_size=1000),\n)\n```\n\nSkip it for write-heavy workloads or data that changes constantly — the invalidation traffic overruns the savings.\n\nSee [references\u002Fclient-cache.md](references\u002Fclient-cache.md).\n\n## 5. Set explicit timeouts\n\nDefaults vary by client and may be too generous. Pick values that match the *application's* failure model:\n\n```python\nr = redis.Redis(\n    host=\"localhost\",\n    socket_connect_timeout=2.0,   # fail fast on dead nodes\n    socket_timeout=5.0,           # tune to expected operation time\n    retry_on_timeout=True,\n)\n```\n\nRule of thumb: connect timeout shorter than read\u002Fwrite timeout. Tight timeouts + retry-on-timeout for latency-sensitive paths; longer timeouts for batch jobs.\n\nSee [references\u002Ftimeouts.md](references\u002Ftimeouts.md).\n\n## References\n\n- [Redis: Connection Pools and Multiplexing](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fdevelop\u002Fclients\u002Fpools-and-muxing\u002F)\n- [Redis: Pipelining](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fdevelop\u002Fuse\u002Fpipelining\u002F)\n- [Redis: SCAN](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fcommands\u002Fscan\u002F)\n- [Redis: Client-side caching](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fdevelop\u002Fclients\u002Fclient-side-caching\u002F)\n- [Redis: Clients](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fdevelop\u002Fclients\u002F)\n","# Redis Connections\n\nClient-side guidance for talking to Redis efficiently: how to share connections, how to batch commands, which commands not to call in production, when to turn on client-side caching, and how to set timeouts that fail fast without breaking healthy traffic.\n\n## When to apply\n\n- Creating or reviewing a Redis client setup (redis-py, Jedis, Lettuce, go-redis, NRedisStack).\n- Making many small Redis calls and wondering where the latency is going.\n- Iterating large keyspaces, sets, hashes, or lists.\n- Enabling client-side caching for hot keys.\n- Tuning connect \u002F read \u002F write timeouts.\n\n## 1. Pool or multiplex — never one connection per request\n\nThe single biggest mistake in Redis client code is opening a new TCP connection for every operation. Always either:\n\n- **Pool** — keep N persistent connections that the application leases per call (redis-py `ConnectionPool`, Jedis `JedisPooled`, go-redis client).\n- **Multiplex** — share a single connection across all requests (Lettuce, NRedisStack).\n\n| Style | Used by | Note |\n|---|---|---|\n| Pool | redis-py, Jedis, go-redis | Each lease blocks if pool exhausted; size the pool to your concurrency |\n| Multiplex | Lettuce, NRedisStack | Single connection; **cannot** carry blocking commands like `BLPOP` |\n\n```python\n# redis-py — connection pool\npool = redis.ConnectionPool(host=\"localhost\", port=6379, max_connections=50)\nr = redis.Redis(connection_pool=pool)\n```\n\nSee [references\u002Fpooling.md](references\u002Fpooling.md) for Python + Java + Lettuce examples.\n\n## 2. Pipeline bulk work\n\nFor N commands that don't depend on each other's results, send them as a single batch with pipelining. One round-trip instead of N.\n\n```python\npipe = redis.pipeline()\nfor user_id in user_ids:\n    pipe.get(f\"user:{user_id}\")\nresults = pipe.execute()\n```\n\nUse **non-transactional** pipelining for performance, and `pipeline(transaction=True)` only when you actually need atomicity (see redis-core's transactions guidance).\n\nSee [references\u002Fpipelining.md](references\u002Fpipelining.md).\n\n## 3. Avoid commands that scan everything\n\nAnything that walks the whole keyspace (or a whole large container) blocks the server. Use incremental variants instead.\n\n| Don't | Use |\n|---|---|\n| `KEYS pattern` | `SCAN` cursor loop |\n| `SMEMBERS large_set` | `SSCAN` |\n| `HGETALL large_hash` | `HSCAN` |\n| `LRANGE 0 -1` on a huge list | Paginate (`LRANGE 0 100`) |\n\n```python\ncursor = 0\nwhile True:\n    cursor, keys = redis.scan(cursor, match=\"user:*\", count=100)\n    for key in keys:\n        process(key)\n    if cursor == 0:\n        break\n```\n\n**Blocking commands (`BLPOP`, `BRPOP`, `BLMOVE`) are different** — they intentionally wait for data and are fine for queue consumers, but always pass a timeout, and don't issue them on a multiplexed connection (Lettuce, NRedisStack).\n\nSee [references\u002Fblocking.md](references\u002Fblocking.md).\n\n## 4. Client-side caching for hot keys\n\nFor data that's read often and written rarely (config, feature flags, sessions on every request), enable RESP3 client-side caching. The client keeps a local copy and the server invalidates it on writes — saving the round trip for hot reads.\n\n```python\nclient = redis.Redis(\n    host=\"localhost\",\n    port=6379,\n    protocol=3,                                    # RESP3 is required\n    cache_config=redis.CacheConfig(max_size=1000),\n)\n```\n\nSkip it for write-heavy workloads or data that changes constantly — the invalidation traffic overruns the savings.\n\nSee [references\u002Fclient-cache.md](references\u002Fclient-cache.md).\n\n## 5. Set explicit timeouts\n\nDefaults vary by client and may be too generous. Pick values that match the *application's* failure model:\n\n```python\nr = redis.Redis(\n    host=\"localhost\",\n    socket_connect_timeout=2.0,   # fail fast on dead nodes\n    socket_timeout=5.0,           # tune to expected operation time\n    retry_on_timeout=True,\n)\n```\n\nRule of thumb: connect timeout shorter than read\u002Fwrite timeout. Tight timeouts + retry-on-timeout for latency-sensitive paths; longer timeouts for batch jobs.\n\nSee [references\u002Ftimeouts.md](references\u002Ftimeouts.md).\n\n## References\n\n- [Redis: Connection Pools and Multiplexing](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fdevelop\u002Fclients\u002Fpools-and-muxing\u002F)\n- [Redis: Pipelining](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fdevelop\u002Fuse\u002Fpipelining\u002F)\n- [Redis: SCAN](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fcommands\u002Fscan\u002F)\n- [Redis: Client-side caching](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fdevelop\u002Fclients\u002Fclient-side-caching\u002F)\n- [Redis: Clients](https:\u002F\u002Fredis.io\u002Fdocs\u002Flatest\u002Fdevelop\u002Fclients\u002F)\n",{"name":5,"license":15,"metadata":24,"description":7},{"author":25,"version":26},"Redis, Inc.","0.1.0","master","49e49abf2f670d429e0b7e2c0349739c3fdd5cbe","skills\u002Fredis-connections",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-connections",{"tool":41,"command":42},"bunx","bunx skills add stanfish06\u002Fskillquarium --skill redis-connections",{"tool":44,"command":45},"pnpm","pnpm dlx skills add stanfish06\u002Fskillquarium --skill redis-connections","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fredis-connections\u002FSKILL.md",true,[49,55,59,63,67,71],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"agents\u002Fopenai.yaml","REFERENCE","参考文档",170,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fredis-connections\u002Fagents\u002Fopenai.yaml",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fblocking.md",1817,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fredis-connections\u002Freferences\u002Fblocking.md",{"path":60,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fclient-cache.md",2034,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fredis-connections\u002Freferences\u002Fclient-cache.md",{"path":64,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fpipelining.md",1103,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fredis-connections\u002Freferences\u002Fpipelining.md",{"path":68,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fpooling.md",1921,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fredis-connections\u002Freferences\u002Fpooling.md",{"path":72,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Ftimeouts.md",1366,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fredis-connections\u002Freferences\u002Ftimeouts.md",[76,83,92,99,106,113],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"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":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":87,"licenseFileUrl":88,"sourceHtmlUrl":89,"categories":90,"keywords":91,"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":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"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":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"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":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"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":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":87,"licenseFileUrl":117,"sourceHtmlUrl":118,"categories":119,"keywords":120,"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",[],[]]