upstash-redis-kv
Read and write to Upstash Redis-compatible key-value store via REST API. Use when there is a need to save or retrieve key-value data, use Redis features (caching, counters, lists, sets, hashes, sorted sets, etc.) for the current interaction, or when the user explicitly asks to use Upstash or Redis.
What this skill does
# Upstash Redis Key-Value Store Interact with Upstash's Redis-compatible key-value store using the REST interface. ## Script Location ```bash bun run scripts/upstash-client.ts <command> [args...] ``` **IMPORTANT**: Always run with `bun run`, not directly. ## Configuration ### Environment Variables The script uses these environment variables by default: - `UPSTASH_REDIS_REST_URL` - The Upstash REST API URL - `UPSTASH_REDIS_REST_TOKEN` - The Upstash REST API token ### Overriding Credentials If the user provides credentials from another source (conversation context, a file, etc.), use the `--url` and `--token` flags to override environment variables: ```bash bun run scripts/upstash-client.ts --url "https://..." --token "AX..." GET mykey ``` **Priority**: Command-line flags > Environment variables ## Command Reference ### String Commands ```bash # Get/Set GET <key> SET <key> <value> [--ex seconds] [--px ms] [--nx] [--xx] [--keepttl] [--get] SETNX <key> <value> # Set if not exists SETEX <key> <seconds> <value> # Set with expiration # Multiple keys (key/value pairs) MGET <key1> [key2...] MSET <key1> <val1> [key2 val2...] MSETNX <key1> <val1> [key2 val2...] # Set all if none exist # Counters INCR <key> INCRBY <key> <increment> INCRBYFLOAT <key> <increment> DECR <key> DECRBY <key> <decrement> # String manipulation APPEND <key> <value> STRLEN <key> GETRANGE <key> <start> <end> SETRANGE <key> <offset> <value> ``` ### Hash Commands Hashes store field-value pairs. Pass fields and values as alternating arguments: ```bash # Set hash fields (field/value pairs) HSET <key> <field1> <val1> [field2 val2...] HSETNX <key> <field> <value> # Set field if not exists # Get hash fields HGET <key> <field> HMGET <key> <field1> [field2...] HGETALL <key> # Hash operations HDEL <key> <field1> [field2...] HEXISTS <key> <field> HKEYS <key> HVALS <key> HLEN <key> HINCRBY <key> <field> <increment> HINCRBYFLOAT <key> <field> <increment> HSCAN <key> <cursor> [MATCH pattern] [COUNT count] ``` **Examples:** ```bash # Store user data bun run scripts/upstash-client.ts HSET user:1 name "John" email "[email protected]" age 30 # Get single field bun run scripts/upstash-client.ts HGET user:1 name # Get all fields bun run scripts/upstash-client.ts HGETALL user:1 # Increment numeric field bun run scripts/upstash-client.ts HINCRBY user:1 age 1 ``` ### List Commands Lists are ordered collections. Values are pushed/popped from left (head) or right (tail): ```bash # Push elements LPUSH <key> <val1> [val2...] # Push to head RPUSH <key> <val1> [val2...] # Push to tail LPUSHX <key> <val1> [val2...] # Push if list exists RPUSHX <key> <val1> [val2...] # Pop elements LPOP <key> [count] RPOP <key> [count] # Access elements LRANGE <key> <start> <stop> # Get range (0 = first, -1 = last) LLEN <key> LINDEX <key> <index> # Modify LSET <key> <index> <value> LREM <key> <count> <value> # Remove count occurrences LTRIM <key> <start> <stop> # Keep only range LINSERT <key> <BEFORE|AFTER> <pivot> <value> LPOS <key> <value> LMOVE <src> <dst> <LEFT|RIGHT> <LEFT|RIGHT> ``` **Examples:** ```bash # Create a task queue bun run scripts/upstash-client.ts RPUSH tasks "task1" "task2" "task3" # Get all tasks bun run scripts/upstash-client.ts LRANGE tasks 0 -1 # Pop task from front (FIFO queue) bun run scripts/upstash-client.ts LPOP tasks # Pop task from back (LIFO stack) bun run scripts/upstash-client.ts RPOP tasks ``` ### Set Commands Sets store unique, unordered members: ```bash # Add/remove members SADD <key> <member1> [member2...] SREM <key> <member1> [member2...] # Query SMEMBERS <key> SISMEMBER <key> <member> SMISMEMBER <key> <member1> [member2...] SCARD <key> # Random access SPOP <key> [count] SRANDMEMBER <key> [count] # Set operations SINTER <key1> [key2...] SINTERSTORE <dest> <key1> [key2...] SUNION <key1> [key2...] SUNIONSTORE <dest> <key1> [key2...] SDIFF <key1> [key2...] SDIFFSTORE <dest> <key1> [key2...] SMOVE <src> <dst> <member> SSCAN <key> <cursor> [MATCH pattern] [COUNT count] ``` **Examples:** ```bash # Add tags bun run scripts/upstash-client.ts SADD article:1:tags "javascript" "redis" "nodejs" # Check membership bun run scripts/upstash-client.ts SISMEMBER article:1:tags "javascript" # Get all members bun run scripts/upstash-client.ts SMEMBERS article:1:tags # Find common tags between articles bun run scripts/upstash-client.ts SINTER article:1:tags article:2:tags ``` ### Sorted Set Commands Sorted sets store members with scores for ranking: ```bash # Add members (score/member pairs) ZADD <key> <score1> <member1> [score2 member2...] [--nx] [--xx] [--gt] [--lt] [--ch] # Remove ZREM <key> <member1> [member2...] ZREMRANGEBYRANK <key> <start> <stop> ZREMRANGEBYSCORE <key> <min> <max> # Scores and ranks ZSCORE <key> <member> ZMSCORE <key> <member1> [member2...] ZRANK <key> <member> # Rank (low to high) ZREVRANK <key> <member> # Rank (high to low) ZINCRBY <key> <increment> <member> # Range queries ZRANGE <key> <start> <stop> [--withscores] [--rev] [--byscore] [--bylex] ZRANGEBYSCORE <key> <min> <max> [--withscores] [--limit off,count] ZREVRANGE <key> <start> <stop> [--withscores] ZREVRANGEBYSCORE <key> <max> <min> [--withscores] [--limit off,count] # Counting ZCARD <key> ZCOUNT <key> <min> <max> # Pop ZPOPMIN <key> [count] ZPOPMAX <key> [count] # Set operations ZINTERSTORE <dest> <numkeys> <key1> [key2...] ZUNIONSTORE <dest> <numkeys> <key1> [key2...] ZSCAN <key> <cursor> [MATCH pattern] [COUNT count] ``` **Examples:** ```bash # Create leaderboard (score member pairs) bun run scripts/upstash-client.ts ZADD leaderboard 1000 "player1" 1500 "player2" 1200 "player3" # Get top 3 with scores (highest first) bun run scripts/upstash-client.ts ZRANGE leaderboard 0 2 --rev --withscores # Get player's rank bun run scripts/upstash-client.ts ZREVRANK leaderboard "player2" # Increment player's score bun run scripts/upstash-client.ts ZINCRBY leaderboard 100 "player1" # Get players with scores between 1000 and 1500 bun run scripts/upstash-client.ts ZRANGEBYSCORE leaderboard 1000 1500 --withscores ``` ### Key Commands ```bash # Delete DEL <key1> [key2...] UNLINK <key1> [key2...] # Async delete # Existence/Type EXISTS <key1> [key2...] TYPE <key> # Expiration EXPIRE <key> <seconds> EXPIREAT <key> <timestamp> PEXPIRE <key> <milliseconds> PEXPIREAT <key> <timestamp> TTL <key> PTTL <key> PERSIST <key> # Remove expiration # Rename RENAME <key> <newkey> RENAMENX <key> <newkey> # Search KEYS <pattern> # Use with caution in production SCAN <cursor> [MATCH pattern] [COUNT count] # Other COPY <src> <dst> DUMP <key> TOUCH <key1> [key2...] RANDOMKEY OBJECT ENCODING|FREQ|IDLETIME|REFCOUNT <key> ``` **Examples:** ```bash # Set key with 1 hour expiration bun run scripts/upstash-client.ts SET session:abc "data" bun run scripts/upstash-client.ts EXPIRE session:abc 3600 # Or in one command bun run scripts/upstash-client.ts SET session:abc "data" --ex 3600 # Check TTL bun run scripts/upstash-client.ts TTL session:abc # Scan keys matching pattern bun run scripts/upstash-client.ts SCAN 0 MATCH "user:*" COUNT 100 ``` ### Server Commands ```bash PING [message] ECHO <message> DBSIZE TIME INFO [section] FLUSHDB # Delete all keys in current DB (DANGEROUS) FLUSHALL # Delete all keys in all DBs (DANGEROUS) ``` ## Command Options ### SET Options ```bash --ex <seconds> # Expire in seconds --px <ms> # Expire in milliseconds --exat <ts> # Expire at Unix timestamp (seconds) --pxat <ts> # Expire at Unix timestamp (ms) --nx # Only set if key does not exist --xx # Only set if key exists --keepttl # Retain existing TTL --get # Return old value ``` ### ZADD
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.