diagnostics-and-tooling

Diagnose Marine Video Portal health with read-only scripts for env vars, Redis, and bunny.net.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/MarineTeam/fable-video --skill diagnostics-and-tooling-marineteam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diagnostics-and-tooling
Source: https://github.com/MarineTeam/fable-video/tree/main/.claude/skills/diagnostics-and-tooling
Command: npx skills add https://github.com/MarineTeam/fable-video --skill diagnostics-and-tooling-marineteam

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @upstash/redis, and includes scripts (resource) components.

What problem does it solve? When something looks wrong in the Marine Video Portal, guessing wastes time. This Skill replaces assumptions with measurements: it verifies whether environment variables actually resolved at runtime, whether Redis is reachable and what keys it holds, whether the bunny.net library is healthy, and whether a playback embed token matches what the app should have signed. ## Core Features & Use Cases - Environment inventory: check-env.mjs reports every required and optional env var, flags missing ones, and explains the degraded mode each absence causes, including Vercel's suffix-prefixed Redis variables. - Redis census: check-redis.mjs connects through the app's own lib/redis.js, pings, and scans the keyspace by family while counting orphaned pvp:* keys left over from a prefix rename, printing counts only to avoid leaking viewer emails. - bunny.net health and token signing: check-bunny.mjs reports library video counts by Stream status code, and sign-embed.mjs recomputes the exact signed embed URL the app would produce so you can diff it against what was actually served. - Measurement recipes: curl-based recipes for timing page loads, measuring payload bytes, and tracing how many Redis commands a route costs per request. - Use Case: An admin reports all admin tabs returning 502. Run check-env.mjs to confirm the Redis variables resolved, then check-redis.mjs to confirm the credentials actually ping, isolating config drift from code bugs in minutes. ## Quick Start Ask the AI to run the diagnostics skill's check-env script to verify whether all required environment variables for the portal are resolved.

Frequently Asked Questions about diagnostics-and-tooling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if environment variables are actually resolved in a Next.js app on Vercel?

Run check-env.mjs from the repo root with node. It loads .env.local without overriding real environment variables, resolves every required and optional var including Vercel's suffix-prefixed Redis variables, and exits 1 with a MISSING table if anything required is absent.

How do I inspect Upstash Redis keys without leaking user data?

Use check-redis.mjs, which scans the keyspace with a cursor loop and prints only per-family counts, never key names or values. A read-only proxy wraps the client and throws on any command outside ping, scan, hgetall, get, ttl, type, and dbsize.

How do I debug a bunny.net playback token mismatch?

Run sign-embed.mjs with the video GUID and an optional TTL. It recomputes the exact SHA256-signed embed URL the app's lib/bunny.js produces, so you can diff the token and expiry against what the app actually served in browser network logs.

Can these diagnostic scripts modify production Redis or bunny.net data?

No. check-redis.mjs enforces read-only access in code through a proxy that blocks set, del, flushall, and all other mutating commands before they reach the network. check-bunny.mjs makes a single GET request, and sign-embed.mjs performs pure local computation with no network calls.

Why does a MODULE_TYPELESS_PACKAGE_JSON warning appear when running the scripts?

The warning is expected and harmless. The scripts import the repo's lib/redis.js and lib/bunny.js directly for fidelity, and because package.json has no type field, Node 22 reparses those files as ES modules after detecting import syntax.

When should I not use these diagnostic scripts?

Skip them when a known symptom already maps to a root cause in the debugging playbook, or when you need to confirm a specific viewer's stored email, since the Redis census deliberately never prints values or key names for PII reasons. Use the admin Viewers UI for that case.