monitor
バックグラウンド監視。ビルド・テスト・ログの継続監視とアラート
When & Why to Use This Skill
This Claude skill provides automated background monitoring for critical development workflows, including builds, tests, logs, and system processes. It enhances developer productivity and system reliability by delivering real-time alerts and actionable insights the moment an error or crash is detected, enabling proactive incident response and faster debugging.
Use Cases
- Continuous Build Monitoring: Automatically track 'npm run build' or other build outputs in the background and receive instant alerts with error summaries to fix compilation issues immediately.
- Automated Test Oversight: Monitor long-running test suites and get notified of failures in real-time, eliminating the need for manual status checks and improving QA efficiency.
- Real-time Log Analysis: Continuously tail log files to detect specific error patterns or warnings, allowing developers to proactively troubleshoot runtime applications before they impact users.
- Process Health & Uptime: Monitor the status of development servers or background tasks for crashes, providing immediate notifications and suggested recovery actions to ensure system stability.
| name | monitor |
|---|---|
| description | アラート条件(error/warning/all) |
| - name | alert |
| required | false |
| default | "error" |
| - Bash(tail | *) |
| - Bash(ps | *) |
| - Bash(npm | *) |
| - Bash(npx | *) |
/monitor - バックグラウンド監視スキル
長時間タスクをバックグラウンドで監視し、問題発生時にアラート。
監視対象
build - ビルド監視
/monitor target=build
# → npm run build の出力を監視
# → エラー発生時に報告
test - テスト監視
/monitor target=test
# → npm run test の出力を監視
# → 失敗テスト発生時に報告
log - ログ監視
/monitor target=log interval=5
# → 指定ログファイルを tail -f
# → エラーパターン検出時に報告
process - プロセス監視
/monitor target=process
# → 開発サーバーの死活監視
# → クラッシュ時に報告・再起動提案
実行フロー
1. 監視開始
Task({ run_in_background: true })
↓
2. 継続監視
while(running) {
checkStatus()
sleep(interval)
}
↓
3. 問題検出
if (error) {
generateAlert()
}
↓
4. アラート
"❌ ビルドエラー検出: ..."
アラート形式
## 🚨 監視アラート
**対象**: build
**時刻**: 2026-01-08 22:30:00
**種別**: error
### 検出内容
Error: Cannot find module './missing' at /src/lib/index.ts:15:1
### 推奨アクション
1. missing.ts ファイルを確認
2. import パスを修正
3. 再ビルド実行
使用例
# ビルド監視(バックグラウンド)
/monitor target=build
# テスト監視(5秒間隔)
/monitor target=test interval=5
# ログ監視(警告も含む)
/monitor target=log alert=warning
監視停止
# TaskOutputで状態確認
TaskOutput({ task_id: "monitor-xxx" })
# KillShellで停止
KillShell({ shell_id: "monitor-xxx" })