.claude/skills/observability-stack-setup/SKILL.md
Automated LGTM + Alloy observability stack deployment using Docker Compose. Use when setting up Claude Code observability infrastructure locally.
npx skillsauth add adaptationio/skrillz observability-stack-setupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Automated deployment of the complete LGTM (Loki, Grafana, Tempo, Mimir/Prometheus) + Alloy observability stack for Claude Code monitoring.
Automatically deploys and configures:
# Verify Docker installed
docker --version # Requires ≥ 20.10
# Verify Docker Compose installed
docker compose version # Requires ≥ 2.0
Invoke this skill and it will:
.observability/ directory structuredocker compose up -dEstimated time: 5-10 minutes
| Service | Port | Purpose | |---------|------|---------| | Grafana | 3000 | Dashboards and visualization | | Grafana Alloy | 4317 (gRPC), 4318 (HTTP), 12345 (metrics) | OTLP receiver | | Loki | 3100 | Log storage and querying | | Tempo | 3200 | Trace storage and querying | | Prometheus | 9090 | Metrics storage and querying |
All data persisted in .observability/volumes/:
alloy-data/ - Alloy configuration and stateloki-data/ - Log storagetempo-data/ - Trace storageprometheus-data/ - Metrics storagegrafana-data/ - Dashboards, datasources, settingsClaude Code Overview
Tool Performance Matrix
Cost Analysis
Error Tracking
Session Analysis
Checks Docker and Docker Compose installed with compatible versions.
.observability/
├── docker-compose.yml # Main stack definition
├── alloy/
│ └── config.yaml # OTLP receiver + exporters config
├── grafana/
│ ├── datasources/
│ │ ├── loki.yml # Loki datasource
│ │ ├── prometheus.yml # Prometheus datasource
│ │ └── tempo.yml # Tempo datasource
│ └── dashboards/
│ ├── claude-code-overview.json
│ ├── tool-performance.json
│ ├── cost-analysis.json
│ ├── error-tracking.json
│ └── session-analysis.json
└── volumes/ # Persistent data
├── alloy/
├── loki/
├── tempo/
├── prometheus/
└── grafana/
Creates all configuration files from templates (see references/ for details).
docker compose -f .observability/docker-compose.yml up -d
Verifies each service:
http://localhost:12345/metricshttp://localhost:3100/readyhttp://localhost:3200/readyhttp://localhost:9090/-/healthyhttp://localhost:3000/api/healthUses Grafana API to import all pre-built dashboards.
Displays:
Receives telemetry from Claude Code via OTLP protocol:
localhost:4317localhost:4318Routes telemetry to backends:
Default: 365 days (configurable in docker-compose.yml)
-ingester.max-chunk-age=365d)-storage.trace.local.path retention)--storage.tsdb.retention.time=365d)Full logging enabled (no redactions):
This configuration assumes observability for personal use with full data access.
If ports 3000, 3100, 3200, 4317, 4318, 9090, or 12345 are in use:
Option 1: Stop conflicting services
# Find process using port
sudo lsof -i :3000
# Stop the process
sudo kill <PID>
Option 2: Modify ports in docker-compose.yml
Check logs:
docker compose -f .observability/docker-compose.yml logs [service_name]
Common issues:
df -h)Manually import:
# Copy dashboard JSON to container
docker cp .observability/grafana/dashboards/claude-code-overview.json \
observability-grafana-1:/tmp/
# Import via API
curl -X POST http://localhost:3000/api/dashboards/db \
-H "Content-Type: application/json" \
-u admin:admin \
-d @.observability/grafana/dashboards/claude-code-overview.json
After stack is running:
claude-code-telemetry-enable skillGraceful shutdown (preserves data):
docker compose -f .observability/docker-compose.yml down
Complete removal (deletes data):
docker compose -f .observability/docker-compose.yml down -v
references/docker-compose-full.yml - Complete Docker Compose configurationreferences/alloy-config.yaml - Grafana Alloy OTLP receiver configurationreferences/grafana-datasources/ - Datasource YAML configurationsreferences/dashboards/ - Pre-built dashboard JSON filesreferences/troubleshooting.md - Common issues and solutionsscripts/setup-stack.sh - Main setup script (automated deployment)scripts/verify-health.sh - Health check all servicesscripts/import-dashboards.sh - Import Grafana dashboardsComponent Versions (latest as of 2025-11-22):
All versions pinned in docker-compose.yml for reproducibility.
development
Setup secure web-based terminal access to WSL2 from mobile/tablet via ttyd + ngrok/Cloudflare/Tailscale. One-command install, start, stop, status. Use when you need remote terminal access, web terminal, browser-based shell, or mobile access to WSL2 environment.
development
Complete development workflows where Claude writes the code while Gemini and Codex provide research, planning, reviews, and different perspectives. Claude remains the main developer. Use for complex projects requiring expert planning and multi-perspective reviews.
development
Systematic progress tracking for skill development. Manages task states (pending/in_progress/completed), updates in real-time, reports progress, identifies blockers, and maintains momentum. Use when tracking skill development, coordinating work, or reporting progress.
testing
Comprehensive testing workflow orchestrating functional testing, example validation, integration testing, and usability assessment. Sequential workflow for complete skill testing from examples through scenarios to integration validation. Use when conducting thorough testing, pre-deployment validation, ensuring skill functionality, or comprehensive quality checks.