usage-tracker
Track and analyze usage metrics with timestamped logging, reporting, and trend detection
Best use case
usage-tracker is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Track and analyze usage metrics with timestamped logging, reporting, and trend detection
Teams using usage-tracker should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/usage-tracker/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How usage-tracker Compares
| Feature / Agent | usage-tracker | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Track and analyze usage metrics with timestamped logging, reporting, and trend detection
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Usage Tracker
## When to Use This Skill
✅ **Use when:**
- Need to track tool/resource usage over time
- Generating usage reports (daily, weekly, monthly)
- Monitoring quotas or limits
- Analyzing usage patterns
- Building dashboards
❌ **Avoid when:**
- Real-time metrics (use proper monitoring tools)
- High-frequency events (>100/second)
- Sensitive data without encryption
## Summary
$(generate_summary "$period" | sed 's/\x1b\[[0-9;]*m//g')
## Daily Breakdown
| Date | Opus | Sonnet | Haiku | Total |
|------|------|--------|-------|-------|
EOF
for i in $(seq 6 -1 0); do
local date=$(date -d "$i days ago" +%Y-%m-%d)
local opus=$(grep "$date" "$USAGE_LOG" | grep "|opus|" | wc -l)
local sonnet=$(grep "$date" "$USAGE_LOG" | grep "|sonnet|" | wc -l)
local haiku=$(grep "$date" "$USAGE_LOG" | grep "|haiku|" | wc -l)
local total=$((opus + sonnet + haiku))
echo "| $date | $opus | $sonnet | $haiku | $total |" >> "$output"
done
cat >> "$output" << EOF
## Recommendations
Based on current usage patterns:
$(generate_recommendations)
---
Generated: $(date)
EOF
echo "Report generated: $output"
}
```
## Complete Example: Usage Monitor CLI
```bash
#!/bin/bash
# ABOUTME: Complete usage monitoring CLI tool
# ABOUTME: Track, analyze, and report on usage metrics
set -e
# ─────────────────────────────────────────────────────────────────
# Configuration
# ─────────────────────────────────────────────────────────────────
SCRIPT_NAME="usage-monitor"
USAGE_DIR="${HOME}/.${SCRIPT_NAME}"
USAGE_LOG="$USAGE_DIR/usage.log"
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
CYAN='\033[0;36m'
NC='\033[0m'
# ─────────────────────────────────────────────────────────────────
# Core Functions
*See sub-skills for full details.*
## Resources
- [awk One-Liners](https://catonmat.net/awk-one-liners-explained-part-one)
- [sed/awk Tutorial](https://www.grymoire.com/Unix/Awk.html)
- [Date Manipulation in Bash](https://www.cyberciti.biz/faq/linux-unix-formatting-dates-for-display/)
---
## Version History
- **1.0.0** (2026-01-14): Initial release - extracted from workspace-hub check_claude_usage.sh
## Sub-Skills
- [1. Basic Usage Logging (+1)](1-basic-usage-logging/SKILL.md)
- [3. Usage Summary Reports (+1)](3-usage-summary-reports/SKILL.md)
- [5. Trend Analysis (+1)](5-trend-analysis/SKILL.md)
- [Best Practices](best-practices/SKILL.md)Related Skills
xurl
X/Twitter via xurl CLI: post, search, DM, media, v2 API.
xitter
Interact with X/Twitter via the x-cli terminal client using official X API credentials. Use for posting, reading timelines, searching tweets, liking, retweeting, bookmarks, mentions, and user lookups.
research-paper-writing
End-to-end pipeline for writing ML/AI research papers — from experiment design through analysis, drafting, revision, and submission. Covers NeurIPS, ICML, ICLR, ACL, AAAI, COLM. Integrates automated experiment monitoring, statistical analysis, iterative writing, and citation verification.
cli-productivity
Essential CLI tools and shell productivity patterns for efficient terminal workflows
state-directory-manager
Manage persistent state directories with XDG-compliant paths and cleanup for bash scripts
parallel-batch-executor
Parallel task execution patterns using xargs and job control for significant performance gains
json-config-loader
Configuration file parsing patterns for bash scripts (INI, key=value, JSON)
interactive-menu-builder
Build multi-level interactive CLI menus with navigation and selection for bash scripts
git-sync-manager
Multi-repository git synchronization and fetch-pull-push patterns for batch operations across workspaces
complexity-scorer
Score task complexity using keyword matching, heuristic analysis, and configurable threshold rules
bash-cli-framework
Universal bash CLI patterns for colors, logging, headers, and error handling
github-issue-tracker
Intelligent issue management and project coordination with automated tracking, progress monitoring, and team coordination. Use for issue creation with smart templates, progress tracking with swarm coordination, multi-agent collaboration, and cross-repository synchronization.