
Doctor
- 11 installs
- 610 repo stars
- Updated June 26, 2026
- alsk1992/cloddsbot
Doctor is a Claude Code skill that runs system health diagnostics and troubleshooting for the clodds bot framework, checking OS, Node.js, network, API keys, database, and channels.
About
Doctor is a diagnostics skill for the clodds trading-bot framework that checks system health across OS resources, Node.js runtime, network connectivity, API key validity, database, and channel connections. A developer runs it via /doctor commands or the createDoctorService TypeScript API to get a report classifying the system as healthy, degraded, or unhealthy. It is used to troubleshoot a running bot and confirm dependencies and credentials are working.
- Runs system health diagnostics across OS, Node.js, network, API keys, database, and channels
- Returns healthy/degraded/unhealthy status with per-check pass/warn/fail results
- Exposes both slash commands (/doctor, /health, /status) and a TypeScript createDoctorService API
Doctor by the numbers
- 11 all-time installs (skills.sh)
- Ranked #418 of 596 Debugging skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
doctor capabilities & compatibility
- Capabilities
- health check · diagnostics · system status · api key validation
- Use cases
- debugging
What doctor says it does
Run system diagnostics, check health status, and troubleshoot issues.
console.log(`Overall: ${report.status}`); // 'healthy' | 'degraded' | 'unhealthy'
npx skills add https://github.com/alsk1992/cloddsbot --skill doctorAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 11 |
|---|---|
| repo stars | ★ 610 |
| Last updated | June 26, 2026 |
| Repository | alsk1992/cloddsbot ↗ |
What it does
Run health diagnostics on a running clodds bot to check system resources, API keys, database, and channel connections.
Who is it for?
Troubleshooting a running clodds bot and validating environment health before or during operation.
When should I use this skill?
You need to check whether a running bot's system, network, API keys, database, and channels are healthy.
What you get
A single diagnostic report showing overall health status and which components pass, warn, or fail.
- diagnostic report
- component health checks
By the numbers
- 8 diagnostic checks (system, node, network, api, database, channels, mcp, dependencies)
- 3 status levels: healthy, degraded, unhealthy
Files
Doctor - Complete API Reference
Run system diagnostics, check health status, and troubleshoot issues.
---
Chat Commands
Health Checks
/doctor Run all diagnostics
/doctor quick Quick health check
/doctor full Full diagnostic scan
/doctor <component> Check specific componentComponent Checks
/doctor system OS, memory, disk
/doctor node Node.js version, memory
/doctor network Connectivity tests
/doctor api API key validation
/doctor database Database connection
/doctor channels Channel healthStatus
/health Quick health status
/status System status overview
/status verbose Detailed status---
TypeScript API Reference
Create Doctor Service
import { createDoctorService } from 'clodds/doctor';
const doctor = createDoctorService({
// Checks to run
checks: ['system', 'node', 'network', 'api', 'database', 'channels'],
// Thresholds
thresholds: {
memoryWarning: 80, // % memory usage
memoryCritical: 95,
diskWarning: 80, // % disk usage
diskCritical: 95,
latencyWarning: 1000, // ms
latencyCritical: 5000,
},
// Timeout
timeoutMs: 30000,
});Run Diagnostics
// Run all checks
const report = await doctor.runDiagnostics();
console.log(`Overall: ${report.status}`); // 'healthy' | 'degraded' | 'unhealthy'
console.log(`Checks passed: ${report.passed}/${report.total}`);
for (const check of report.checks) {
const icon = check.status === 'pass' ? '✓' : check.status === 'warn' ? '⚠' : '✗';
console.log(`${icon} ${check.name}: ${check.message}`);
if (check.details) {
console.log(` ${JSON.stringify(check.details)}`);
}
}Run Specific Check
// Check system resources
const system = await doctor.checkSystem();
console.log(`OS: ${system.os} ${system.version}`);
console.log(`CPU: ${system.cpuUsage}%`);
console.log(`Memory: ${system.memoryUsage}% (${system.memoryUsedGB}/${system.memoryTotalGB} GB)`);
console.log(`Disk: ${system.diskUsage}% (${system.diskUsedGB}/${system.diskTotalGB} GB)`);Check Node.js
const node = await doctor.checkNode();
console.log(`Node.js: ${node.version}`);
console.log(`Heap: ${node.heapUsed}/${node.heapTotal} MB`);
console.log(`RSS: ${node.rss} MB`);
console.log(`Uptime: ${node.uptime} seconds`);Check Network
const network = await doctor.checkNetwork();
console.log(`Internet: ${network.internet ? 'Connected' : 'Disconnected'}`);
console.log(`DNS: ${network.dns ? 'Working' : 'Failed'}`);
for (const [endpoint, result] of Object.entries(network.endpoints)) {
console.log(`${endpoint}: ${result.reachable ? 'OK' : 'Failed'} (${result.latencyMs}ms)`);
}Check API Keys
const api = await doctor.checkApiKeys();
for (const [provider, status] of Object.entries(api)) {
console.log(`${provider}: ${status.valid ? 'Valid' : 'Invalid'}`);
if (status.error) {
console.log(` Error: ${status.error}`);
}
if (status.quota) {
console.log(` Quota: ${status.quota.used}/${status.quota.limit}`);
}
}Check Database
const db = await doctor.checkDatabase();
console.log(`Connected: ${db.connected}`);
console.log(`Latency: ${db.latencyMs}ms`);
console.log(`Version: ${db.version}`);
console.log(`Tables: ${db.tables}`);
console.log(`Size: ${db.sizeMB} MB`);Check Channels
const channels = await doctor.checkChannels();
for (const channel of channels) {
console.log(`${channel.name}: ${channel.status}`);
if (channel.error) {
console.log(` Error: ${channel.error}`);
}
console.log(` Connected: ${channel.connected}`);
console.log(` Last message: ${channel.lastMessage}`);
}Format Report
// Get formatted report
const report = await doctor.runDiagnostics();
const formatted = doctor.formatReport(report);
console.log(formatted);
// Outputs nicely formatted diagnostic report---
Diagnostic Checks
| Check | What it Tests |
|---|---|
| system | OS, CPU, memory, disk |
| node | Node.js version, heap, memory |
| network | Internet, DNS, API endpoints |
| api | API key validity and quotas |
| database | Connection, latency, schema |
| channels | Channel connections, health |
| mcp | MCP server connections |
| dependencies | npm packages, versions |
---
Status Levels
| Status | Meaning |
|---|---|
| healthy | All checks pass |
| degraded | Some warnings, still functional |
| unhealthy | Critical failures, action needed |
Check Results
| Result | Meaning |
|---|---|
| pass | Check succeeded |
| warn | Warning threshold exceeded |
| fail | Critical failure |
| skip | Check skipped (not applicable) |
---
CLI Commands
# Run all diagnostics
clodds doctor
# Quick check
clodds doctor --quick
# Check specific component
clodds doctor --check system
# JSON output
clodds doctor --json---
Common Issues
High Memory Usage
⚠ Memory: 85% usedSolution: Restart the service or increase available memory
API Key Invalid
✗ Anthropic API: Invalid keySolution: Check ANTHROPIC_API_KEY in .env
Database Connection Failed
✗ Database: Connection refusedSolution: Check DATABASE_URL and ensure PostgreSQL is running
Channel Disconnected
⚠ Telegram: DisconnectedSolution: Check TELEGRAM_BOT_TOKEN and network connectivity
---
Best Practices
1. Run regularly — Check health daily or after changes 2. Monitor trends — Watch for gradual degradation 3. Set alerts — Alert on unhealthy status 4. Fix warnings — Don't wait for failures 5. Review before deploy — Run doctor before production changes
/**
* Doctor CLI Skill
*
* Commands:
* /doctor - Run full system diagnostics
* /doctor <component> - Run specific check (system|node|network|channels|mcp|dependencies)
* /doctor quick - Run critical checks only (node version, network)
* /health, /status - Aliases for /doctor
*/
// Map user-facing component names to internal check names
const COMPONENT_MAP: Record<string, string[]> = {
system: ['os', 'memory', 'diskSpace', 'configDir'],
node: ['nodeVersion'],
network: ['internet', 'anthropicApi'],
channels: ['configDir'], // channels use config dir
mcp: ['configDir', 'nodeVersion'], // MCP depends on config + node
dependencies: ['git', 'python', 'docker', 'macosPermissions'],
};
const QUICK_CHECKS = ['nodeVersion', 'internet'];
async function execute(args: string): Promise<string> {
const parts = args.trim().split(/\s+/);
const cmd = parts[0]?.toLowerCase() || 'full';
try {
const { runDoctor, getCheckNames } = await import('../../../doctor/index');
const allCheckNames = getCheckNames();
let categories: string[] | undefined;
let title = 'System Diagnostics';
if (cmd === 'quick') {
categories = QUICK_CHECKS.filter(c => allCheckNames.includes(c));
title = 'Quick Health Check';
} else if (cmd in COMPONENT_MAP) {
categories = COMPONENT_MAP[cmd].filter(c => allCheckNames.includes(c));
title = `Diagnostics: ${cmd}`;
} else if (cmd === 'full' || cmd === 'all' || cmd === '') {
// Run all checks (no category filter)
categories = undefined;
} else {
// Check if the arg matches an actual internal check name
if (allCheckNames.includes(cmd)) {
categories = [cmd];
title = `Diagnostics: ${cmd}`;
} else {
// Unknown argument - show help and run full
categories = undefined;
}
}
const options = categories ? { categories } : {};
const report = await runDoctor(options);
let output = `**${title}**\n\n`;
for (const check of report.checks) {
const icon = check.status === 'pass' ? '[OK]' : check.status === 'warn' ? '[WARN]' : check.status === 'fail' ? '[FAIL]' : '[SKIP]';
output += `${icon} ${check.name}`;
if (check.message) output += ` - ${check.message}`;
output += '\n';
}
output += `\n${report.summary.passed} passed, ${report.summary.warnings} warnings, ${report.summary.failed} failed, ${report.summary.skipped} skipped`;
if (report.healthy) {
output += '\nSystem is healthy.';
} else {
output += '\nIssues detected.';
}
return output;
} catch (error) {
return `Error: ${error instanceof Error ? error.message : String(error)}`;
}
}
export default {
name: 'doctor',
description: 'System health diagnostics and troubleshooting',
commands: ['/doctor', '/diag', '/health', '/status'],
handle: execute,
};