sync-health-monitor — команда для Claude Code: диагностика
Слэш-команда проверяет здоровье синхронизации GitHub и Linear: лимиты API, вебхуки, задержки, ошибки. Пригодится, когда задачи перестали доезжать.
npx claude-code-templates@latest --command sync/sync-health-monitorЧто делает sync-health-monitor
Команда собирает состояние окружения синхронизации: остаток лимита GitHub API через gh api rate_limit, доступность Linear MCP-сервера и его авторизацию, активные вебхуки и метрики обработки событий. Дальше идёт диагностика по шести направлениям: здоровье API, пропускная способность и задержки, повторяющиеся ошибки, доставка вебхуков, целостность данных и автоматические попытки починки.
Область проверки задаётся аргументом: --github, --linear, --webhooks, --performance или --report. Без аргумента команда берёт общий обзор. На выходе — отчёт с метриками, разбором ошибок и рекомендациями.
Для работы нужен настроенный gh CLI и авторизованный Linear MCP-сервер. Если GitHub API не отвечает, команда просто напишет, что проверка нужна, и дальше не пойдёт — это повод проверить токен и лимиты до запуска.
Какие задачи решает
- узнать, сколько запросов осталось до лимита GitHub API
- проверить, авторизован ли Linear MCP-сервер
- найти повторяющиеся ошибки синхронизации задач
- проверить доставку и задержку вебхуков
- сверить записи и найти осиротевшие задачи после сбоя
Примеры запросов агенту
- /sync-health-monitor --report
- /sync-health-monitor --webhooks
- /sync-health-monitor --performance
Как установить sync-health-monitor
1Через claude-code-templates
npx claude-code-templates@latest --command sync/sync-health-monitor2Вручную: положить файлы
.claude/commands/sync-health-monitor.mdВызов — /sync-health-monitor. Для всех проектов — ~/.claude/commands/
Вручную: положить файлы
~/.codex/prompts/sync-health-monitor.mdВызов — /prompts:sync-health-monitor. В Codex этот формат помечен устаревшим, замена — скиллы
Вручную: положить файлы
.github/prompts/sync-health-monitor.prompt.mdВручную: положить файлы
.gemini/commands/sync-health-monitor.tomlGemini хранит команды в TOML: текст запроса — в поле prompt
Вопросы о sync-health-monitor
Как установить sync-health-monitor в Claude?
Через шаблоны: npx claude-code-templates@latest --command sync/sync-health-monitor. Файл команды появится по пути .claude/commands/sync-health-monitor.md.
Что делает sync-health-monitor?
Проверяет состояние синхронизации GitHub и Linear: лимиты API, подключение к Linear, вебхуки, задержки и ошибки. По итогам выдаёт отчёт с рекомендациями.
Что нужно для работы команды?
Настроенный gh CLI и авторизованный Linear MCP-сервер. Без них проверка GitHub API и Linear не пройдёт.
Исходный текст
sync-health-monitor.md · MIT
--- allowed-tools: Read, Write, Edit, Bash argument-hint: "[scope] | --github | --linear | --webhooks | --performance | --report" description: Monitor and diagnose GitHub-Linear sync health with performance analytics and automated troubleshooting --- # Sync Health Monitor Monitor comprehensive GitHub-Linear synchronization health and performance: **$ARGUMENTS** ## Current Sync Environment - GitHub API status: !`gh api rate_limit -q '.rate | "GitHub: \(.remaining)/\(.limit) requests"' 2>/dev/null || echo "GitHub API check needed"` - Linear connectivity: Linear MCP server status and authentication validation - Webhook status: Active webhook configurations and event processing health - Sync performance: Current throughput, latency metrics, and error rates ## Task Implement comprehensive sync health monitoring with automated diagnostics and performance optimization: **Monitor Scope**: Use $ARGUMENTS to specify GitHub health, Linear connectivity, webhook diagnostics, performance analysis, or complete health report **Health Monitoring Framework**: 1. **API Health Assessment** - Monitor GitHub/Linear API status, rate limits, authentication, connectivity issues 2. **Sync Performance Analysis** - Track throughput metrics, latency patterns, processing times, queue depths 3. **Error Pattern Detection** - Identify recurring failures, classify error types, analyze failure trends 4. **Webhook Diagnostics** - Validate webhook configurations, test event delivery, monitor processing latency 5. **Data Integrity Validation** - Verify sync consistency, detect orphaned records, validate cross-references 6. **Automated Troubleshooting** - Run diagnostic tests, suggest fixes, implement automated recovery procedures **Advanced Features**: Real-time health dashboards, predictive failure detection, automated recovery workflows, comprehensive performance profiling. **Diagnostic Capabilities**: Deep error analysis, bottleneck identification, configuration validation, automated testing suites. **Output**: Complete health assessment with performance metrics, error analysis, recommended optimizations, and automated diagnostic reports.
© davila7 · MIT · davila7/claude-code-templates