Trading Monitor Skill
Overview
Monitor trading bot health and performance through log analysis and process inspection. Extract actionable metrics without spawning expensive sub-agents.
Use Cases
- Check if trading bot is running (PID status)
- Tail logs for recent errors or trades
- Extract performance metrics (P&L, win rate, trades)
- Monitor VPIN/kill switch status
- Debug trading issues
Core Tools
1. Check Bot Status
# Check if process is running
ps aux | grep "python.*main\.py" | grep -v grep
# Check specific PID
ps -p <PID> -o pid,etime,%cpu,%mem,command
2. Tail Trading Log
# Recent activity (last 50 lines)
tail -50 /tmp/nemo-trading-fixed.log
# Search for specific patterns
grep -E "(ERROR|WARNING|Trade|Position)" /tmp/nemo-trading-fixed.log | tail -20
# Extract metrics from status lines
grep "Balance:" /tmp/nemo-trading-fixed.log | tail -1
3. Extract Metrics
# Parse metrics from log
grep -oP "Balance: \$[0-9.]+" /tmp/nemo-trading-fixed.log | tail -1
grep -oP "Trades: [0-9]+" /tmp/nemo-trading-fixed.log | tail -1
grep -oP "Win Rate: [0-9.]+%" /tmp/nemo-trading-fixed.log | tail -1
grep -oP "VPIN: [✅⚠️🔴]" /tmp/nemo-trading-fixed.log | tail -1
4. Count Errors
# Error count in last hour
grep "$(date '+%Y-%m-%d %H:')" /tmp/nemo-trading-fixed.log | grep -c "ERROR"
# VPIN kill switch activations
grep -c "VPIN KILL SWITCH ACTIVATED" /tmp/nemo-trading-fixed.log
Workflow
Quick Health Check
- Check PID running
- Tail last 10 log lines
- Extract current metrics
- Report status
Deep Analysis
- Get error count (last hour)
- Count trades executed
- Analyze VPIN patterns
- Check Kelly/Chainlink status
- Generate summary
Output Format
## Trading Bot Status — HH:MM
| Metric | Value |
|--------|-------|
| Status | 🟢 Running / 🔴 Stopped |
| PID | 75997 |
| Runtime | 2h 15min |
| Trades | 12 |
| Balance | $500.00 |
| Win Rate | 0.0% |
| VPIN | ✅ OK |
### Recent Activity
- Last 5 log entries...
### Issues (if any)
- Error count: 2
- Warnings: 5 VPIN alerts
Log Locations
| Bot | Log Path |
|---|---|
| Snipe+Maker (fixed) | /tmp/nemo-trading-fixed.log |
| Snipe+Maker (original) | /tmp/nemo-trading-kelly.log |
| Coinbase | /tmp/nemo-trading.log |
Common Patterns
Healthy Bot
- PID running
- Regular "cycle" log entries
- VPIN: ✅ OK or occasional warnings
- New rounds detected every 5 min
Issues to Watch
- "ERROR" in logs
- VPIN: 🔴 CRITICAL for extended periods
- No trades in >30 min during market hours
- Kill switch active >10 min (stuck)
Error Patterns
float division by zero— Position sizing mathVPIN calculation failed— Flow toxicity detectionStrategy error— Individual trade failure
Integration
Use this skill instead of spawning agents for:
- Hourly status checks
- Quick debugging
- Metrics extraction
- Log grepping
Cost: $0 (vs $0.004 per agent)
Speed: 5 seconds (vs 30 min)