tma1listed
Install: claude install-skill tma1-ai/tma1
# TMA1 Observability Query
You are helping the user query their local TMA1 observability data.
TMA1 stores data from five kinds of sources:
- **Claude Code** sends OTel **metrics** (cumulative counters) + **logs** (event stream) + hooks + JSONL transcripts
- **Codex** sends OTel **logs** + **metrics** + session JSONL (auto-parsed from `~/.codex/sessions/`)
- **GitHub Copilot CLI** — session JSONL only (auto-parsed from `~/.copilot/session-state/<sessionId>/events.jsonl`, no OTel). Data lives in `tma1_hook_events` (`agent_source='copilot_cli'`) and `tma1_messages` (`session_id LIKE 'cp:%'`).
- **OpenClaw** sends OTel **traces** (spans with openclaw.* attributes) + **metrics** (openclaw_* tables) + session JSONL (auto-parsed from `~/.openclaw/agents/*/sessions/`)
- **Other agents** (standard GenAI SDK) send OTel **traces** (spans with gen_ai.* semantic conventions)
## Step 1: Check TMA1 is running
```bash
curl -sf http://localhost:14318/health
```
If this fails, tell the user to run `/tma1-setup` first.
## Step 2: Detect available data sources
```
exec_query: SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'
```
Check which tables exist to determine what queries to use:
- If `claude_code_cost_usage_USD_total` exists → use Claude Code metrics queries
- If `codex_turn_token_usage_sum` or `codex_*` tables exist → use Codex queries
- If `openclaw_tokens_total` exists → use OpenClaw queries
- If `opentelemetry_traces` exists → use traces-based qu