V

Vercel Error Tailored

Battle-tested setting for intelligent, error, monitoring, system. Includes structured workflows, validation checks, and reusable patterns for statusline.

SettingClipticsstatuslinev1.0.0MIT
0 views0 copies

Vercel Error Tailored

Intelligent Vercel error monitoring statusline with deployment failure tracking, desktop notifications, and error count history.

When to Use This Setting

Apply this setting when you need to:

  • Actively monitor your Vercel deployments for errors with automatic desktop notification alerts
  • Track error counts across your recent deployments to catch recurring failure patterns
  • Get immediate visual feedback when any deployment in your recent history enters an error state Consider alternatives when:
  • You already have Vercel built-in email or Slack notifications configured for deployment failures
  • Desktop notifications from the terminal are disabled or not supported in your operating system

Quick Start

Configuration

name: vercel-error-tailored type: setting category: statusline

Example Application

claude setting:apply vercel-error-tailored

Example Output

Setting applied. Changes:
- statusLine.type: command
- statusLine.command: bash vercel-error-alert inline
- api_scan: last 5 deployments
- alert_method: macOS osascript notification
- error_tracking: session-persisted count file
- states_monitored: ERROR, BUILDING

Core Concepts

Error Monitoring Overview

AspectDetails
Deployment ScanFetches the 5 most recent deployments and counts those in ERROR state
Desktop AlertsTriggers macOS native notification via osascript when errors are detected
Build TrackingSeparately counts BUILDING state deployments for active build awareness
Error PersistenceWrites error count to a session-keyed file for historical tracking
Status DisplayShows consolidated alert with error count, building count, and project name

Error Alert Architecture

+-------------------+     +-----------------------+     +------------------+
| Vercel API Call   |---->| State Counter         |---->| Error Evaluator  |
| /v6/deployments   |     | grep ERROR | wc -l    |     | errors > 0?      |
| limit=5           |     | grep BUILDING | wc -l  |     | trigger alert    |
+-------------------+     +-----------------------+     +------------------+
                                    |                          |
                                    v                          v
                          +---------------------+     +------------------+
                          | Error File Writer   |     | Notification     |
                          | /tmp/vercel_errors  |---->| osascript display|
                          | session-keyed       |     | notification cmd |
                          +---------------------+     +------------------+

Configuration

ParameterTypeDefaultDescription
vercel_tokenstring""Bearer token for Vercel API authentication
vercel_project_idstring""Project identifier from your Vercel dashboard
scan_depthinteger5Number of recent deployments to scan for errors
enable_notificationsbooleantrueEnable desktop notification alerts on error detection
notification_methodstring"osascript"Platform-specific notification command (osascript for macOS)

Best Practices

  1. Adjust scan depth for deployment frequency - If you deploy frequently, increase scan_depth to 10 to catch errors that might scroll past with rapid deployments. For less active projects, the default 5 provides sufficient coverage.
  2. Add cross-platform notification support - The default uses macOS osascript. For Linux, replace with notify-send. For Windows WSL, use powershell.exe. Extend the script with OS detection to support your entire team.
  3. Combine with error log aggregation - The statusline shows error counts but not error details. Pair this setting with a log viewer or error tracking service like Sentry to quickly drill into the root cause when the error alert triggers.
  4. Suppress duplicate notifications - The current script triggers a notification on every statusline refresh while errors exist. Add a last-notified timestamp to the error file and only re-notify if a new error appears, preventing notification fatigue.
  5. Monitor across multiple projects - If you maintain several Vercel projects, create separate statusline configurations for each or extend the script to iterate over multiple project IDs and aggregate error counts across your portfolio.

Common Issues

  1. Notifications never appear - On macOS, ensure Terminal or your terminal emulator has notification permissions in System Preferences > Notifications. The osascript command requires explicit permission to display alerts.
  2. Error count seems stuck - The error file from a previous session may persist in /tmp. Delete the vercel_errors cache files to reset the error tracking state for a fresh session.
  3. API error shown instead of status - The VERCEL_TOKEN may have expired or been revoked. Generate a new token from vercel.com/account/tokens and update your environment variable.
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates