upstash-redis
Skill by sickn33
Guides an AI assistant to use the @upstash/redis HTTP client for caching, sessions, counters and Redis data structures. It is aimed at serverless and edge runtimes that cannot hold a pooled TCP connection.
Install upstash-redis
Built from the published package, never by AI.
git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills /tmp/agentic-awesome-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agentic-awesome-skills/skills/upstash-redis ~/.claude/skills/upstash-redisRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills /tmp/agentic-awesome-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/agentic-awesome-skills/skills/upstash-redis ~/.gemini/antigravity-cli/skills/upstash-redisAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
upstash-redis is a skill that teaches an AI assistant to use the @upstash/redis TypeScript client. The client talks to an Upstash Redis database over HTTPS instead of a TCP connection, so each command is a stateless HTTP request. It serializes and deserializes JavaScript values automatically, so numbers and objects round-trip without manual JSON.parse.
The skill is for developers building caches, sessions, counters, leaderboards or simple queues in serverless and edge functions. The source names Vercel and Netlify functions, Cloudflare Workers, Deno, Bun and Next.js middleware. It covers credential setup, cache-aside with TTLs, pipelines and transactions. It states that the client does not work with self-hosted Redis servers.
Written from the project's SKILL.md and checked against it.
What it can do
- Client setupCreates a client with Redis.fromEnv() using REST credentials from environment variables.
- Cache-aside with TTLReads cached values with get, stores them with set and an expiry, and removes them with del.
- PipelinesBatches independent commands into one round trip using pipeline().
- TransactionsUses multi() for MULTI/EXEC when commands must run together.
- Hashes and sorted setsUses hset and zadd for user records and leaderboard scores.
- CountersUses incr for counters such as a signup total.
- Cloudflare Workers setupImports from @upstash/redis/cloudflare and passes the worker env object to fromEnv.
- Safe key scanningRecommends scan instead of keys for large keyspaces.
What you need
- An Upstash Redis database
- UPSTASH_REDIS_REST_URL environment variable
- UPSTASH_REDIS_REST_TOKEN environment variable
- @upstash/redis package
Try asking
- Add Redis caching with a one hour TTL to my getUser function
- Set up Upstash Redis session storage in my Next.js middleware
- Build a leaderboard with zadd on Upstash Redis
Good to know
- Works only with Upstash Redis databases, not other Redis servers.
- Pub/Sub subscribe and blocking commands are not supported over REST.
- WATCH is not available over REST; use a Lua script for atomic check-and-set.
- Covers the TypeScript client only.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/upstash-redis/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md6 KB
Alternatives to upstash-redis
All alternatives →Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.
Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.
Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.
Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.
Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.
Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.
Compare with hugging-face-datasets, db-repair or alloydb-basics
upstash-redis: common questions
Can it connect to a self-hosted Redis server?
No. The client only speaks the Upstash REST protocol. The source says to use ioredis or node-redis for self-hosted Redis.
Is pipeline() atomic?
No. The source says pipeline() is not atomic. Use multi() for MULTI/EXEC or a reviewed Lua script when commands must run as one unit.
Where should the REST token be kept?
The source says to keep it in server-side environment variables and never ship it to a browser bundle, since it grants full read and write access.
How do I install upstash-redis?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is upstash-redis free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is upstash-redis safe to use?
It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to upstash-redis?
Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.
