View Contextune detection statistics
View detection performance metrics and usage statistics from the observability database, showing tier performance, top commands, and confidence distribution.
/plugin marketplace add Shakes-tzd/contextune/plugin install contextune@ContextuneDisplay detection performance metrics and usage statistics from the observability database.
This command runs automatically via the executable script. The markdown provides documentation only.
Script: commands/slashsense-stats.py
Execution: Automatic when command is triggered
Data Source: ~/.claude/plugins/contextune/data/observability.db
Step 1: Load Statistics
Reads detection data from the observability database:
sqlite3 ~/.claude/plugins/contextune/data/observability.db \
"SELECT tier, COUNT(*), AVG(latency_ms), AVG(confidence)
FROM detections GROUP BY tier"
Step 2: Generate Report
Creates formatted output using Rich library showing:
Detection Performance by Tier
Top Detected Commands
Confidence Distribution
Step 3: Display to User
Outputs formatted tables and panels to terminal.
╭─────────────────────────── Contextune Statistics ───────────────────────────╮
│ │
│ Total Detections: 1,247 │
│ │
│ Performance by Tier │
│ ┌───────────────┬────────────┬─────────────┬──────────┐ │
│ │ Tier │ Detections │ Avg Latency │ Accuracy │ │
│ ├───────────────┼────────────┼─────────────┼──────────┤ │
│ │ Keyword │ 892 │ 0.05ms │ 98% │ │
│ │ Model2Vec │ 245 │ 0.18ms │ 94% │ │
│ │ Semantic │ 110 │ 47.30ms │ 89% │ │
│ └───────────────┴────────────┴─────────────┴──────────┘ │
│ │
│ Top Commands │
│ 1. /sc:analyze 324 detections │
│ 2. /sc:implement 218 detections │
│ 3. /sc:test 187 detections │
│ 4. /sc:git 156 detections │
│ 5. /sc:improve 134 detections │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
If observability.db exists:
If observability.db doesn't exist:
Tier Performance:
Latency Analysis:
100ms: Needs optimization
Accuracy Expectations:
"No data available":
ℹ️ No detection data found. Using example statistics.
"Database error":
ls ~/.claude/plugins/contextune/data/observability.db/ctx:usage - View token usage and cost optimization/ctx:help - View all available commands/ctx:configure - Configure Contextune settings