debug prod issues
БесплатноБез исполняемых скриптовНе проверенDebug production issues on Vercel using logs, database inspection, and proper deployment waiting
от different-ai★ 256 звёзд на GitHubОб этом скилле
What I Do
- Debug production issues on Vercel
- View and filter Vercel function logs
- Wait for deployments correctly
- Connect to production Neon database
- Inspect tables and data for debugging
Vercel Debugging (0 Finance)
IMPORTANT: Always use --scope prologe for the 0 Finance project:
# All Vercel commands need --scope prologe
vercel logs www.0.finance --scope prologe
vercel ls --scope prologe
vercel env ls --scope prologe
Viewing Logs
# Stream live logs (waits for new logs)
vercel logs www.0.finance --scope prologe
# Logs since a specific time
vercel logs www.0.finance --scope prologe --since 5m
vercel logs www.0.finance --scope prologe --since 1h
# Filter logs (pipe to grep)
vercel logs www.0.finance --scope prologe 2>&1 | grep -i "error"
vercel logs www.0.finance --scope prologe 2>&1 | grep "ai-email"
Note: vercel logs can be slow/hang. Use timeout or Ctrl+C if needed:
timeout 30 vercel logs www.0.finance --scope prologe --since 5m 2>&1 | head -100
Checking Deployments
# List recent deployments
vercel ls --scope prologe | head -10
# Check specific deployment status
vercel inspect <deployment-url> --scope prologe
# Get latest deployment URL
vercel ls --scope prologe 2>/dev/null | head -1
Waiting for Deployments
DO NOT just sleep and hope. Use vercel inspect --wait:
# Get the latest deployment URL
LATEST=$(vercel ls --scope prologe 2>/dev/null | head -1)
# Wait for it to be ready (up to 5 minutes)
vercel inspect "$LATEST" --scope prologe --wait --timeout 5m
# Check the status in the output:
# status: ● Building -> still building
# status: ● Ready -> deployed and live!
# status: ● Error -> build failed
Full workflow after pushing code:
# 1. Push your changes
git push origin main
# 2. Wait a few seconds for Vercel to pick it up
sleep 5
# 3. Get the new deployment URL
LATEST=$(vercel ls --scope prologe 2>/dev/null | head -1)
echo "Waiting for: $LATEST"
# 4. Wait for it to complete
vercel inspect "$LATEST" --scope prologe --wait --timeout 5m
# 5. Now your changes are live!
Check deployment details:
# See build info, aliases, and status
vercel inspect <deployment-url> --scope prologe
# See build logs if something failed
vercel inspect <deployment-url> --scope prologe --logs
Triggering a Redeploy
# Redeploy production from current state
vercel --prod --scope prologe
# Or push to git and wait
git push origin main
# Then use the waiting method above
Environment Variables
# List env vars
vercel env ls --scope prologe
# Add an env var (will prompt for value)
echo "value" | vercel env add VAR_NAME production --scope prologe
# Pull env vars to local .env
vercel env pull .env.local --scope prologe
Database Debugging
Environment Setup
CRITICAL: Always load .env.production.local for production database:
import * as dotenv from 'dotenv';
import path from 'path';
// Load production env
dotenv.config({
path: path.resolve(__dirname, '../.env.production.local'),
});
Or in a script:
cd /path/to/zerofinance/packages/web
pnpm tsx -e "
import * as dotenv from 'dotenv';
dotenv.config({ path: '.env.production.local' });
// Now use db...
import { db } from './src/db';
"
Database Locations
Zero Finance uses Neon Postgres:
| Environment | Host Pattern | Used By |
|---|---|---|
| Development | ep-aged-cherry-* |
Local dev, some scripts |
| Production | ep-wispy-recipe-* or similar |
Vercel deployment, prod data |
Always verify which database you're connecting to:
[DB] Connecting to database host: ep-xxxxx-pooler.us-east-1.aws.neon.tech
Key Tables
| Table | Purpose |
|---|---|
user_safes |
Safe addresses linked to users/workspaces |
incoming_deposits |
Incoming USDC transfers (synced from Safe API) |
outgoing_transfers |
Outgoing transactions from Safes |
users |
User records with primaryWorkspaceId |
workspace_members |
User-workspace membership |
earn_deposits |
Vault deposit records |
ai_email_sessions |
AI email agent conversation sessions |
Script Template
import * as dotenv from 'dotenv';
dotenv.config({ path: '.env.production.local' });
import { db } from './src/db';
import { userSafes, incomingDeposits } from './src/db/schema';
import { eq } from 'drizzle-orm';
async function main() {
// Your debugging code here
const safes = await db.select().from(userSafes);
console.log('Total safes:', safes.length);
}
main()
.then(() =>
Установить debug prod issues в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл debug prod issues?
Debug production issues on Vercel using logs, database inspection, and proper deployment waiting
Как установить скилл debug prod issues?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл debug prod issues запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic