Claude-skill-registry btr-stats
Display LOCAL BTR statistics (NOT ByteRover/brv). Use when the user asks "how much time saved", "context statistics", "usage metrics", "BTR statistics", "BTR metrics", "BTR usage", or wants to see the value of their context library.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/btr-stats" ~/.claude/skills/majiayu000-claude-skill-registry-btr-stats && rm -rf "$T"
skills/data/btr-stats/SKILL.mdBTR Stats
⚠️ CRITICAL: BTR ≠ ByteRover
This skill uses
(local context tree), NOT btr
(ByteRover CLI).brv
| Command | Tool | Syntax |
|---|---|---|
| ✓ CORRECT | | / / |
| ✗ WRONG | | Different tool, different syntax, requires auth |
PREFER MCP tools when available:
- For searchingmcp__btr__query_context
- For browsingmcp__btr__list_contexts
- For statisticsmcp__btr__get_stats
Only use Bash
btr commands if MCP tools are unavailable.
Show analytics and ROI metrics for your context library.
Quick Start
btr stats [--format json|table]
Metrics Displayed
- Total Contexts: Number of stored knowledge items
- Contexts by Domain: Distribution across domains
- Most Retrieved: Top 10 most frequently accessed contexts
- Total Retrievals: How many times contexts have been used
- Estimated Time Saved: Based on usage count x avg retrieval time (15 min)
Example Output
BTR Statistics ==================== Total Contexts: 42 Total Domains: 8 Total Retrievals: 156 Estimated Time Saved: 39 hours Top Domains: auth: 12 contexts (45 retrievals) api: 10 contexts (38 retrievals) database: 8 contexts (29 retrievals) Most Retrieved: 1. auth/jwt-validation (23 retrievals) 2. api/rate-limiting (18 retrievals) 3. database/connection-pooling (15 retrievals)
Command Options
Basic Statistics
btr stats
Shows overall statistics in a human-readable table format.
JSON Output
btr stats --format json
Outputs structured JSON for programmatic use or dashboards.
Time Period Filter
btr stats --period 30d # Last 30 days btr stats --period 7d # Last 7 days btr stats --period 1y # Last year
Domain-Specific Stats
btr stats --domain auth
Shows detailed statistics for a specific domain.
Understanding ROI Metrics
Time Saved Calculation
The time saved estimate is calculated as:
Time Saved = Total Retrievals x Average Time to Find Info Manually Where: - Average Time to Find Info Manually = 15 minutes (default) - This accounts for searching docs, Stack Overflow, or reimplementing
Value Proposition
| Retrievals | Time Saved | Equivalent Value* |
|---|---|---|
| 10 | 2.5 hours | $250 |
| 50 | 12.5 hours | $1,250 |
| 100 | 25 hours | $2,500 |
| 500 | 125 hours | $12,500 |
*Based on $100/hour developer cost
Advanced ROI Calculation
For detailed ROI analysis with customizable parameters, run the Python script:
python .claude/skills/btr-stats/scripts/calculate-roi.py
Options:
: Developer hourly rate (default: $100)--hourly-rate
: Average manual search time in minutes (default: 15)--avg-time
: Output format (json, csv, markdown)--format
Tracking Tips
-
Consistent Retrieval: Use
to ensure retrievals are trackedbtr query -
Review Regularly: Check stats monthly to identify valuable patterns
-
Prune Unused: Remove contexts with zero retrievals after 90 days
-
Enhance Popular: Add more detail to frequently-accessed contexts
Integration with Dashboards
Export stats for external dashboards:
# Daily export to JSON btr stats --format json > /path/to/metrics/btr-$(date +%Y%m%d).json # Append to CSV log btr stats --format csv >> /path/to/metrics/btr-stats.csv