observability-dashboard-creator
SKILL.md
Observability Dashboard Creator
Import pre-built Grafana dashboards and create custom visualizations for Claude Code monitoring.
When to Use
- After observability stack is running
- Need pre-built Claude Code dashboards
- Want to create custom dashboards
- Need to export/backup existing dashboards
Operations
import-all
Import all pre-built Claude Code dashboards to Grafana.
Dashboards Imported:
- Claude Code Overview - Sessions, tokens, costs, errors at-a-glance
- Tool Performance Matrix - Per-tool metrics (duration, failure rates)
- Cost Analysis - Token usage and API cost tracking
- Error Tracking - Error patterns and recent failures
- Session Analysis - Session duration and conversation patterns
Usage:
# Invoke skill operation
import-all
What Happens:
- Connects to Grafana API (localhost:3000)
- Creates "Claude Code" dashboard folder
- Imports all 5 dashboards via Grafana API
- Sets up dashboard links and navigation
- Verifies import success
import-dashboard
Import a specific dashboard by name.
Parameters:
name: Dashboard name (overview, tool-performance, cost-analysis, error-tracking, session-analysis)
Example:
import-dashboard --name overview
create-custom
Create custom dashboard from template.
Parameters:
name: Dashboard nametype: overview, tool-specific, cost, error, sessionpanels: Comma-separated panel types
Example:
create-custom \
--name "Bash Tool Deep Dive" \
--type tool-specific \
--panels "duration,errors,frequency,success-rate"
export-dashboards
Export all Claude Code dashboards to JSON (backup).
Output: .observability/backups/dashboards-YYYYMMDD_HHMMSS/*.json
list-dashboards
List all Claude Code dashboards in Grafana.
Output:
Claude Code Dashboards:
1. Claude Code Overview (ID: 42)
2. Tool Performance Matrix (ID: 43)
3. Cost Analysis (ID: 44)
4. Error Tracking (ID: 45)
5. Session Analysis (ID: 46)
Pre-built Dashboards
1. Claude Code Overview
Panels:
- Session Count (last 24h)
- Total Token Usage (last 24h)
- Total Cost (last 24h)
- Error Rate (last 1h)
- Token Usage Over Time (timeseries)
- Tool Call Frequency (timeseries by tool)
- Recent Errors (logs table)
Use Cases:
- Daily health check
- Quick status overview
- Anomaly detection
2. Tool Performance Matrix
Panels (per tool: Read, Write, Edit, Bash, etc.):
- Call count
- Average duration
- P95 latency
- P99 latency
- Success rate
- Failure rate
- Top error messages
Use Cases:
- Identify slow tools
- Find high-failure tools
- Performance optimization
3. Cost Analysis
Panels:
- Daily cost trend
- Weekly cost comparison
- Monthly projection
- Token usage breakdown (input vs output)
- Cost per session
- Budget alerts (configurable threshold)
- Top expensive sessions
Use Cases:
- Budget tracking
- Cost optimization
- Usage forecasting
4. Error Tracking
Panels:
- Error timeline (last 24h)
- Error types distribution (pie chart)
- Errors by tool (bar chart)
- Recent errors table (with details)
- Error rate trend
- Top error messages (frequency)
Use Cases:
- Debugging
- Error pattern detection
- Quality monitoring
5. Session Analysis
Panels:
- Session duration distribution (histogram)
- Sessions per day/week (timeseries)
- Active time vs idle time
- Conversation depth (turns per session)
- Session frequency by hour
- Average session length trend
Use Cases:
- Usage pattern analysis
- User engagement metrics
- Productivity insights
Dashboard Features
All dashboards include:
- Time range selector (last 15m, 1h, 6h, 24h, 7d, 30d)
- Auto-refresh (30s, 1m, 5m, off)
- Variables for filtering (tool_name, session_id, etc.)
- Annotations for important events
- Links between related dashboards
References
references/dashboards/claude-code-overview.json- Overview dashboardreferences/dashboards/tool-performance-matrix.json- Tool metricsreferences/dashboards/cost-analysis.json- Cost trackingreferences/dashboards/error-tracking.json- Error monitoringreferences/dashboards/session-analysis.json- Session analyticsreferences/grafana-api-guide.md- Grafana API usage
Scripts
scripts/import-all-dashboards.sh- Import all pre-built dashboardsscripts/export-dashboards.sh- Backup dashboards to JSONscripts/create-folder.sh- Create "Claude Code" dashboard folder