Vercel Deployment Watchdog — Vercel工具
v1.0.0[AI辅助] Monitor Vercel-hosted site deployments with automated health checks, cache freshness verification, and API validation. Use when you need to ensure deployment...
详细分析 ▾
运行时依赖
版本
Initial release: Vercel API integration, comprehensive health checks, security validation
安装命令 点击复制
技能文档
⚠️ SECURITY & USAGE DISCLAIMER
This skill is designed exclusively for monitoring your own web applications and deployments. It must not be used to probe, scan, or monitor any systems you do not own or have explicit permission to test.
Permitted 使用:
- Monitoring own websites 和 APIs deployed 在...上 Vercel 或 similar platforms
- Automated health checks 对于 deployments 您 control
- Integration 带有 own alerting systems (Telegram, etc.)
Prohibited 使用:
- Scanning 第三个-party websites 没有 authorization
- Attempting 到 access 私有/internal networks
- Testing systems 您 做 不 own 或 manage
- 任何 activity could considered unauthorized access 或 harassment
By using this skill, you agree to use it only for legitimate monitoring of your own infrastructure.
Skill Overview
Automated deployment monitoring for Vercel-hosted applications. This skill provides:
- Post-deployment health checks: 验证 HTTP status, 缓存 freshness, content validation
- Vercel API integration: Detect 新的 deployments automatically
- Feed validation: Check API endpoints return 有效 JSON 带有 expected data
- Cron 任务 setup: Schedule regular checks 或 trigger 在...上 deployment completion
- Alerting integration: Configure OpenClaw cron jobs 到 发送 failure notifications 通过 Telegram/WhatsApp 或 webhooks (delivery handled 由 OpenClaw platform)
🔒 Security & Compliance
Built-在...中 Safety Features
The skill includes multiple security measures:
- URL Validation: 所有 URLs validated 到:
http:// 或 https:// protocol
- Warn/屏蔽 localhost addresses (localhost, 127.0.0.1, 0.0.0.0)
- 可以 configured 到 屏蔽 私有 IP ranges (RFC 1918)
- Allow monitoring 的 internal resources 通过 ALLOW_INTERNAL=真 environment 变量 (requires explicit opt-在...中; 否 CLI bypass flags)
- Security Warning: 仅 enable ALLOW_INTERNAL=真 如果 您 需要 到 monitor localhost/私有 IPs 和 有 explicit 权限. Enabling allows network access 到 internal addresses.- Credential Safety:
- Network Restrictions:
Compliance 带有 ClawHub Policies
This skill:
- 做 不 attempt 到 bypass security controls
- 做 不 include obfuscated 或 hidden functionality
- 打开 source 和 transparent 关于 所有 operations
- Respects
robots.txt和 common web standards - Follows principle 的 最少 privilege
Responsible Usage Requirements
You must:
- 有 explicit 权限 到 monitor 所有 target URLs
- 使用 own API tokens 带有 minimal 必填 scopes
- Respect rate limits 的 monitored services
- 不 使用 skill 对于 surveillance 或 harassment
- Comply 带有 所有 applicable laws 和 terms 的 服务
Violation of these terms may result in removal from ClawHub and suspension of your account.
Quick 开始
1. Prerequisites
# Check if curl and jq are installed
command -v curl >/dev/null 2>&1 && command -v jq >/dev/null 2>&1 || {
echo "Error: curl and jq are required but not installed."
echo "Install them using your system package manager:"
echo " Debian/Ubuntu: sudo apt-get install curl jq"
echo " macOS: brew install curl jq"
echo " For other systems, see: https://curl.se/ and https://stedolan.github.io/jq/"
exit 1
}
2. 设置 up Environment Variables
Create a .env file or set environment variables:
# Vercel API token (create at https://vercel.com/account/tokens)
export VERCEL_TOKEN="vcp_..."# Target URLs to monitor
export HOMEPAGE_URL="https://your-site.com/"
export API_FEED_URL="https://your-site.com/api/feed"
# Optional: Telegram chat ID for OpenClaw cron notifications (not used by scripts)
export TELEGRAM_CHAT_ID="YOUR_TELEGRAM_CHAT_ID"
# Security: Only set ALLOW_INTERNAL=true if monitoring localhost/private IPs
# export ALLOW_INTERNAL="true"
3. Run Manual Check
# Make script executable
chmod +x scripts/watchdog-check.sh# Run check
./scripts/watchdog-check.sh --homepage "$HOMEPAGE_URL" --api "$API_FEED_URL"
4. Schedule Monitoring 带有 OpenClaw Cron (Recommended)
For safe and integrated scheduling, use OpenClaw's built-in cron system instead of system cron:
// Create an OpenClaw cron job (every 5 minutes)
{
"name": "Vercel Watchdog",
"schedule": { "kind": "every", "everyMs": 300000 },
"payload": {
"kind": "agentTurn",
"message": "Run deployment watchdog check for my site"
},
"delivery": {
"mode": "announce",
"channel": "telegram",
"to": "YOUR_TELEGRAM_CHAT_ID"
}
}
See the "Integration with OpenClaw" section below for more details.
Features
Health Check Components
- HTTP Status Verification: Ensures homepage 和 API return 200 OK
- 缓存 Freshness: Checks
age: 0和x-vercel-缓存: MISSheaders - Content Validation: Verifies page title contains expected text
- JSON Feed Validation: Validates API 响应 structure 和 data integrity
- Deployment Detection: Uses Vercel API 到 查找 latest deployments
Vercel API Integration
The skill can:
- 列表 recent deployments 到 detect 新的 ones
- Check deployment state (
就绪,错误,BUILDING) - 获取 deployment URLs 和 metadata
- Trigger health checks 当...时 deployment state changes 到
就绪
Alerting
When checks fail, the skill can:
- 发送 Telegram messages 通过 OpenClaw
- Log detailed failure information
- Include remediation suggestions
- Escalate 之后 repeated failures
Usage Examples
Basic Health Check
./scripts/watchdog-check.sh --homepage "https://your-site.com" --api "https://your-site.com/api/feed"
Vercel Deployment Monitoring
The script uses the VERCEL_TOKEN environment variable automatically, or you can pass it explicitly via --token.
# Check for new deployments in the last 10 minutes
./scripts/vercel-monitor.sh --project "your-project" --since 10m
Script Reference
scripts/watchdog-check.sh
Main health check script with the following options:
--homepage URL # Homepage URL to check (default: https://your-site.com/)
--api URL # API feed URL to check (default: https://your-site.com/api/feed)
--verbose # Enable verbose output
--json # Output results as JSON for programmatic use
scripts/vercel-monitor.sh
Vercel API integration script:
--token TOKEN # Vercel API token (required)
--project NAME # Project name to monitor (default: auto-detect)
--since MINUTES # Check deployments from last N minutes (default: 5)
--team-id ID # Team ID for organization accounts
Integration 带有 OpenClaw
Note: skill provides monitoring scripts 输出 results 到 stdout. Notifications handled 由 OpenClaw's cron delivery system (delivery.mode: "announce") 当...时 configured, 不 由 scripts themselves. scripts 做 不 使 external API calls 对于 notifications.
作为 Cron 任务
Set up the skill to run periodically via OpenClaw's cron system:
// Example cron job configuration
{
"name": "Vercel Watchdog",
"schedule": { "kind": "every", "everyMs": 300000 }, // Every 5 minutes
"payload": {
"kind": "agentTurn",
"message": "Run deployment watchdog check and notify if any failures"
},
"delivery": {
"mode": "announce",
"channel": "telegram",
"to": "YOUR_TELEGRAM_CHAT_ID"
}
}
作为 Sub-Agent
Spawn a sub-agent to handle monitoring:
# Use OpenClaw sessions_spawn to run monitoring in background
openclaw sessions spawn --task "Monitor your site deployment health for next hour" --runtime subagent --label deployment-watchdog
Troubleshooting
Common Issues
- Vercel API authentication fails:
deployment:读取 scope
- Check 如果 令牌 已过期 (创建 新的 one 在 https://vercel.com/账户/tokens)- 缓存 freshness indicators missing:
- API feed validation fails:
jq . <(curl -s API_URL)Debug Mode
Enable verbose output to see detailed check results:
./scripts/watchdog-check.sh --verbose
Extending Skill
Adding 新的 Checks
- 添加 check 函数 到
scripts/watchdog-check.sh - 更新 summary 输出
- Test 带有
--verbose标志
Integrating 带有 其他 Services
- Slack notifications: 添加 webhook integration
- Email alerts: 使用
himalayaCLI 或gogskill - Dashboard integration: 输出 JSON 对于 external monitoring systems
References
See references/ directory for:
- Vercel API documentation
- HTTP 缓存 页头 specifications
- JSON schema validation examples
- OpenClaw cron 任务 configuration guide
免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制