
Monitoring
- 13 installs
- 610 repo stars
- Updated June 26, 2026
- alsk1992/cloddsbot
monitoring is a Claude Code skill that runs system and LLM-provider health checks and sends threshold-based alerts to email and webhook targets.
About
This skill monitors the clodds bot's system health, tracks errors, and sends alerts when issues occur. A developer uses it to run health checks (CPU, memory, disk, LLM provider latency), configure email and webhook alert targets with cooldowns and thresholds, and subscribe to provider-down and recovery events. It exposes chat commands and a TypeScript monitoring service.
- Run health checks on system, providers, and services
- Threshold alerts to email and webhook targets with cooldowns
- Track errors and unhandled exceptions with severity levels
Monitoring by the numbers
- 13 all-time installs (skills.sh)
- Ranked #966 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
monitoring capabilities & compatibility
- Capabilities
- health monitoring · alerting · error tracking
- Works with
- slack
- Use cases
- data analysis
- Runs
- Runs locally
- Pricing
- Free
What monitoring says it does
Monitor system health, track errors, and receive alerts when issues occur.
type: 'webhook', url: 'https://hooks.example.com/alerts' },
npx skills add https://github.com/alsk1992/cloddsbot --skill monitoringAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 13 |
|---|---|
| repo stars | ★ 610 |
| Last updated | June 26, 2026 |
| Repository | alsk1992/cloddsbot ↗ |
What it does
Run health checks and send threshold-based alerts about system and LLM-provider status to email or webhook.
Who is it for?
Continuous health checks and alerting on system and LLM-provider status
When should I use this skill?
You need health checks, provider status, or threshold alerts for the running bot
What you get
Health checks run on an interval and alerts fire to email or webhook on threshold breaches.
By the numbers
- 6 alert types tabled
- 1-minute default health-check interval
Files
Monitoring - Complete API Reference
Monitor system health, track errors, and receive alerts when issues occur.
---
Chat Commands
Service Control
/monitor start # Start monitoring
/monitor stop # Stop monitoring
/monitor status # Check monitoring statusHealth Checks
/monitor health # Run health check
/monitor health --verbose # Detailed health info
/monitor providers # Check LLM provider statusAlerts
/monitor alerts # View recent alerts
/monitor alerts --unread # Unread alerts only
/monitor alert-targets # View alert destinations
/monitor alert-targets add email <addr> # Add email target
/monitor alert-targets add webhook <url> # Add webhook target
/monitor alert-targets remove <id> # Remove targetConfiguration
/monitor config # View config
/monitor cooldown 300 # Set alert cooldown (seconds)
/monitor threshold cpu 80 # Set CPU alert threshold
/monitor threshold memory 90 # Set memory threshold---
TypeScript API Reference
Create Monitoring Service
import { createMonitoringService } from 'clodds/monitoring';
const monitor = createMonitoringService({
// Health check interval
intervalMs: 60000, // 1 minute
// Alert targets
alertTargets: [
{ type: 'email', address: 'alerts@example.com' },
{ type: 'webhook', url: 'https://hooks.example.com/alerts' },
],
// Alert cooldown (prevent spam)
alertCooldownMs: 300000, // 5 minutes
// Thresholds
thresholds: {
cpu: 80, // Alert at 80% CPU
memory: 90, // Alert at 90% memory
errorRate: 10, // Alert at 10% error rate
},
});Start/Stop Monitoring
// Start monitoring
await monitor.start();
// Check if running
const isRunning = monitor.isRunning();
// Stop monitoring
await monitor.stop();Health Checks
// Run health check
const health = await monitor.runHealthCheck();
console.log(`Overall: ${health.status}`); // 'healthy' | 'degraded' | 'unhealthy'
console.log('\nSystem:');
console.log(` CPU: ${health.system.cpu}%`);
console.log(` Memory: ${health.system.memory}%`);
console.log(` Disk: ${health.system.disk}%`);
console.log('\nProviders:');
for (const [name, status] of Object.entries(health.providers)) {
console.log(` ${name}: ${status.status} (${status.latencyMs}ms)`);
}
console.log('\nServices:');
for (const [name, status] of Object.entries(health.services)) {
console.log(` ${name}: ${status.status}`);
}Provider Health
// Check LLM provider status
const providers = await monitor.checkProviders();
for (const provider of providers) {
console.log(`${provider.name}:`);
console.log(` Status: ${provider.status}`);
console.log(` Latency: ${provider.latencyMs}ms`);
console.log(` Last error: ${provider.lastError || 'none'}`);
console.log(` Error rate: ${provider.errorRate}%`);
}Alert Management
// Get recent alerts
const alerts = await monitor.getAlerts({ limit: 10 });
for (const alert of alerts) {
console.log(`[${alert.severity}] ${alert.title}`);
console.log(` ${alert.message}`);
console.log(` Time: ${alert.timestamp}`);
console.log(` Acknowledged: ${alert.acknowledged}`);
}
// Acknowledge alert
await monitor.acknowledgeAlert(alertId);
// Get unread count
const unread = await monitor.getUnreadAlertCount();Alert Targets
// Add alert target
await monitor.addAlertTarget({
type: 'email',
address: 'team@example.com',
});
await monitor.addAlertTarget({
type: 'webhook',
url: 'https://hooks.slack.com/...',
});
// List targets
const targets = monitor.getAlertTargets();
// Remove target
await monitor.removeAlertTarget(targetId);Event Handlers
// Listen for events
monitor.on('alert', (alert) => {
console.log(`🚨 Alert: ${alert.title}`);
});
monitor.on('healthCheck', (health) => {
if (health.status !== 'healthy') {
console.log(`⚠️ System ${health.status}`);
}
});
monitor.on('providerDown', (provider) => {
console.log(`❌ Provider down: ${provider.name}`);
});
monitor.on('providerRecovered', (provider) => {
console.log(`✅ Provider recovered: ${provider.name}`);
});Manual Alerts
// Send manual alert
await monitor.sendAlert({
severity: 'warning', // 'info' | 'warning' | 'error' | 'critical'
title: 'Custom Alert',
message: 'Something important happened',
metadata: { key: 'value' },
});---
Alert Types
| Type | Trigger |
|---|---|
| provider_down | LLM provider not responding |
| high_cpu | CPU usage above threshold |
| high_memory | Memory usage above threshold |
| high_error_rate | Error rate above threshold |
| unhandled_exception | Uncaught exception |
| unhandled_rejection | Unhandled promise rejection |
---
Configuration
// Update config
monitor.configure({
intervalMs: 30000,
alertCooldownMs: 600000,
thresholds: {
cpu: 85,
memory: 95,
errorRate: 5,
},
});---
Best Practices
1. Set appropriate thresholds - Avoid alert fatigue 2. Use cooldowns - Prevent alert spam 3. Multiple targets - Email + webhook for redundancy 4. Acknowledge alerts - Track what's been handled 5. Monitor providers - Know when APIs are down 6. Check health regularly - Don't just rely on alerts
/**
* Monitoring CLI Skill
*
* Commands:
* /monitor status - System health
* /monitor metrics - Key metrics
* /monitor alerts - Active alerts
* /monitor errors [n] - Recent errors
* /monitor uptime - Uptime info
*/
async function execute(args: string): Promise<string> {
const parts = args.trim().split(/\s+/);
const cmd = parts[0]?.toLowerCase() || 'status';
switch (cmd) {
case 'status': {
let output = `**System Health**\n\n`;
output += `Uptime: ${Math.floor(process.uptime())}s\n`;
output += `Memory: ${Math.round(process.memoryUsage().heapUsed / 1024 / 1024)}MB / ${Math.round(process.memoryUsage().heapTotal / 1024 / 1024)}MB\n`;
output += `Node: ${process.version}\n`;
output += `Platform: ${process.platform}`;
try {
const { getSystemHealth } = await import('../../../infra/index');
const health = await getSystemHealth();
output += `\n\nLoad: ${health.load.map(l => l.toFixed(2)).join(', ')}`;
output += `\nCPU: ${health.cpu.cores} cores (${health.cpu.model})`;
output += `\nDisk: ${health.disk ? `${health.disk.percent.toFixed(1)}% used` : 'n/a'}`;
} catch {
// infra module not available
}
return output;
}
case 'metrics': {
try {
const { registry } = await import('../../../monitoring/metrics');
const snapshot = registry.toJSON();
let output = '**Key Metrics**\n\n';
const entries = Object.entries(snapshot);
if (entries.length > 0) {
for (const [name, value] of entries) {
output += `${name}: ${JSON.stringify(value)}\n`;
}
} else {
output += `Heap Used: ${Math.round(process.memoryUsage().heapUsed / 1024 / 1024)}MB\n`;
output += `RSS: ${Math.round(process.memoryUsage().rss / 1024 / 1024)}MB\n`;
output += `CPU: ${JSON.stringify(process.cpuUsage())}`;
}
return output;
} catch {
return `**Key Metrics**\n\n` +
`Heap Used: ${Math.round(process.memoryUsage().heapUsed / 1024 / 1024)}MB\n` +
`RSS: ${Math.round(process.memoryUsage().rss / 1024 / 1024)}MB\n` +
`CPU: ${JSON.stringify(process.cpuUsage())}`;
}
}
case 'alerts': {
try {
const { alertManager } = await import('../../../monitoring/alerts');
const stats = alertManager.getStats();
const recent = alertManager.getHistory({ limit: 10 });
if (recent.length === 0) return '**Alerts**\n\nNo alerts recorded.';
let output = `**Alerts** (${stats.total} total, ${stats.lastHour} last hour)\n\n`;
for (const alert of recent) {
output += `- [${alert.level}] ${alert.name}: ${alert.message}\n`;
output += ` Time: ${new Date(alert.timestamp).toLocaleString()}\n`;
}
return output;
} catch {
return '**Alerts**\n\nNo alerts recorded.';
}
}
case 'errors': {
const n = parseInt(parts[1] || '10', 10) || 10;
try {
const { alertManager } = await import('../../../monitoring/alerts');
const errors = alertManager.getHistory({ level: 'critical', limit: n });
if (errors.length === 0) return `**Recent Errors (last ${n})**\n\nNo errors recorded.`;
let output = `**Recent Errors** (${errors.length})\n\n`;
for (const err of errors) {
output += `- ${new Date(err.timestamp).toLocaleString()}: ${err.name} - ${err.message}\n`;
}
return output;
} catch {
return `**Recent Errors (last ${n})**\n\nNo errors recorded.`;
}
}
case 'uptime':
return `**Uptime**\n\n${Math.floor(process.uptime())} seconds (${(process.uptime() / 3600).toFixed(1)} hours)`;
default:
return `**Monitoring Commands**
/monitor status - System health
/monitor metrics - Key metrics
/monitor alerts - Active alerts
/monitor errors [n] - Recent errors
/monitor uptime - Uptime info`;
}
}
export default {
name: 'monitoring',
description: 'System health monitoring, alerts, and error tracking',
commands: ['/monitor', '/monitoring'],
handle: execute,
};
Related skills
FAQ
Where can alerts be sent?
To email and webhook targets, with a configurable cooldown to prevent spam.
What triggers alerts?
Provider down, high CPU, high memory, high error rate, and unhandled exceptions or rejections.