deploy-upstash
Skill0 starsChanged 9 months agoMITView on GitHub
Use this skill when the user asks to "deploy to Upstash", "set up Redis", "set up queues with Upstash", "create an Upstash Redis database", "set up BullMQ", or when invoked by deploy-project when Redis/queues are detected in the project (bullmq, ioredis, REDIS_URL in .env.example). Creates an Upstash Redis database via REST API using UPSTASH_EMAIL and UPSTASH_API_KEY from setup-auth, and exports REDIS_URL, UPSTASH_REDIS_REST_URL, and UPSTASH_REDIS_REST_TOKEN. Free tier: 10,000 commands/day, 256MB max database size.
- Reads credentials
- Sends data out
In this repository13 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- deploy-cloudflareSkill
- deploy-logSkill
- deploy-neonSkill
- deploy-netlifySkill
- deploy-projectSkill
- deploy-renderSkill
- deploy-supabaseSkill
- deploy-vercelSkill
- scan-projectSkill
- setup-authSkill
- setup-cicdSkill
- verify-deploymentSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Verify: echo $UPSTASH_EMAIL and echo $UPSTASH_API_KEY both show values
- Distinctive: line 76
Not suitable for: high-frequency caching (use Upstash paid or self-hosted Redis)
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Deploy to Upstash
Upstash provides serverless Redis. Use for: BullMQ/bull job queues, caching, rate limiting, pub/sub, session storage.
Prerequisites
UPSTASH_EMAILandUPSTASH_API_KEYmust be set (run setup-auth if not)- Verify:
echo $UPSTASH_EMAILandecho $UPSTASH_API_KEYboth show values
Deployment Workflow
1. Create Redis database
DB_NAME=$(basename $(pwd) | tr '[:upper:]' '[:lower:]' | tr '_' '-')-redis
RESPONSE=$(curl -s -X POST https://api.upstash.com/v2/redis/database \
-u "$UPSTASH_EMAIL:$UPSTASH_API_KEY" \
-H "Content-Type: application/json" \
-d "{
\"name\": \"$DB_NAME\",
\"region\": \"global\",
\"primary_region\": \"us-east-1\",
\"tls\": true
}")
# Note: regional DB creation is deprecated. Always use "region":"global" with "primary_region".
echo "Response: $RESPONSE"2. Extract connection details
REDIS_ENDPOINT=$(echo $RESPONSE | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('endpoint',''))")
REDIS_PORT=$(echo $RESPONSE | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('port','6380'))")
REDIS_PASSWORD=$(echo $RESPONSE | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('password',''))")
UPSTASH_REDIS_REST_URL=$(echo $RESPONSE | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('rest_url', 'https://'+d.get('endpoint','')))")
UPSTASH_REDIS_REST_TOKEN=$(echo $RESPONSE | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('rest_token',''))")
REDIS_URL="rediss://:${REDIS_PASSWORD}@${REDIS_ENDPOINT}:${REDIS_PORT}"
echo "REDIS_URL=$REDIS_URL"
echo "UPSTASH_REDIS_REST_URL=$UPSTASH_REDIS_REST_URL"3. Verify connection
TEST=$(curl -s -H "Authorization: Bearer $UPSTASH_REDIS_REST_TOKEN" \
"$UPSTASH_REDIS_REST_URL/ping")
echo "Redis ping: $TEST"
# Should return: {"result":"PONG"}4. Save and export
mkdir -p DEPLOYMENT_DOCS
cat >> DEPLOYMENT_DOCS/DEPLOYED_ENV.md << EOF
## Upstash Redis
REDIS_URL=$REDIS_URL
UPSTASH_REDIS_REST_URL=$UPSTASH_REDIS_REST_URL
UPSTASH_REDIS_REST_TOKEN=$UPSTASH_REDIS_REST_TOKEN
EOF
chmod 600 DEPLOYMENT_DOCS/DEPLOYED_ENV.md 2>/dev/null || true
echo "✓ Redis credentials saved"Export: REDIS_URL, UPSTASH_REDIS_REST_URL, UPSTASH_REDIS_REST_TOKEN — pass to backend as env vars.
Free Tier Notes
⚠️ Free tier: 10,000 commands/day, 256MB max database size.
- Suitable for: development, low-traffic apps, queues with moderate volume
- Not suitable for: high-frequency caching (use Upstash paid or self-hosted Redis)
- For BullMQ: each job enqueue + process = ~2-5 Redis commands
On Failure
- API returns 401: verify UPSTASH_EMAIL and UPSTASH_API_KEY are correct
- REST_TOKEN empty: the database may still be provisioning — wait 5 seconds and check the dashboard
- REDIS_URL connection refused: verify TLS is enabled (the URL must start with
rediss://)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

