usage-tracker-3-usage-summary-reports

Sub-skill of usage-tracker: 3. Usage Summary Reports (+1).

5 stars

Best use case

usage-tracker-3-usage-summary-reports is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Sub-skill of usage-tracker: 3. Usage Summary Reports (+1).

Teams using usage-tracker-3-usage-summary-reports 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

$curl -o ~/.claude/skills/3-usage-summary-reports/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/_core/bash/usage-tracker/3-usage-summary-reports/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/3-usage-summary-reports/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How usage-tracker-3-usage-summary-reports Compares

Feature / Agentusage-tracker-3-usage-summary-reportsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Sub-skill of usage-tracker: 3. Usage Summary Reports (+1).

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

# 3. Usage Summary Reports (+1)

## 3. Usage Summary Reports


Generate human-readable reports:

```bash
#!/bin/bash
# ABOUTME: Usage summary report generation
# ABOUTME: Pattern from check_claude_usage.sh

# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
CYAN='\033[0;36m'
NC='\033[0m'

# Generate usage summary
generate_summary() {
    local period="${1:-today}"

    # Get counts
    local opus_count=$(count_by_item "$period" "model" | grep opus | awk '{print $2}')
    local sonnet_count=$(count_by_item "$period" "model" | grep sonnet | awk '{print $2}')
    local haiku_count=$(count_by_item "$period" "model" | grep haiku | awk '{print $2}')

    opus_count=${opus_count:-0}
    sonnet_count=${sonnet_count:-0}
    haiku_count=${haiku_count:-0}

    local total=$((opus_count + sonnet_count + haiku_count))

    if [[ $total -eq 0 ]]; then
        echo -e "${YELLOW}No usage recorded for $period${NC}"
        return
    fi

    # Calculate percentages
    local opus_pct=$((opus_count * 100 / total))
    local sonnet_pct=$((sonnet_count * 100 / total))
    local haiku_pct=$((haiku_count * 100 / total))

    # Display report
    echo -e "${CYAN}═══════════════════════════════════════${NC}"
    echo -e "${CYAN}  Usage Summary - ${period}${NC}"
    echo -e "${CYAN}═══════════════════════════════════════${NC}"
    echo ""
    echo -e "  Total tasks: ${BLUE}${total}${NC}"
    echo ""
    echo -e "  ${GREEN}Opus:${NC}   ${opus_count} tasks (${opus_pct}%)"
    echo -e "  ${BLUE}Sonnet:${NC} ${sonnet_count} tasks (${sonnet_pct}%)"
    echo -e "  ${YELLOW}Haiku:${NC}  ${haiku_count} tasks (${haiku_pct}%)"
    echo ""

    # Recommendations
    if [[ $sonnet_pct -gt 50 ]]; then
        echo -e "${RED}⚠️  High Sonnet usage (${sonnet_pct}%)${NC}"
        echo -e "   Consider shifting tasks to Opus or Haiku"
        echo ""
    fi

    if [[ $haiku_pct -lt 20 ]]; then
        echo -e "${YELLOW}ℹ️  Low Haiku usage (${haiku_pct}%)${NC}"
        echo -e "   Opportunity to use Haiku for quick tasks"
        echo ""
    fi

    echo -e "${CYAN}═══════════════════════════════════════${NC}"
    echo -e "  ${GREEN}Target Distribution:${NC}"
    echo -e "  Opus: 30% | Sonnet: 40% | Haiku: 30%"
    echo -e "${CYAN}═══════════════════════════════════════${NC}"
}
```


## 4. Threshold Monitoring


Monitor against limits and thresholds:

```bash
#!/bin/bash
# ABOUTME: Threshold monitoring with alerts
# ABOUTME: Check usage against limits

# Thresholds
declare -A THRESHOLDS=(
    ["opus_daily"]=50
    ["sonnet_daily"]=100
    ["haiku_daily"]=200
    ["total_daily"]=250
    ["warning_pct"]=70
    ["critical_pct"]=90
)

# Check single threshold
check_threshold() {
    local current="$1"
    local limit="$2"
    local name="$3"

    if [[ $limit -eq 0 ]]; then
        return 0
    fi

    local pct=$((current * 100 / limit))

    if [[ $pct -ge ${THRESHOLDS[critical_pct]} ]]; then
        echo -e "${RED}⚠️  CRITICAL: $name at ${pct}% (${current}/${limit})${NC}"
        return 2
    elif [[ $pct -ge ${THRESHOLDS[warning_pct]} ]]; then
        echo -e "${YELLOW}⚠️  WARNING: $name at ${pct}% (${current}/${limit})${NC}"
        return 1
    else
        echo -e "${GREEN}✓ $name: ${pct}% (${current}/${limit})${NC}"
        return 0
    fi
}

# Check all thresholds
check_all_thresholds() {
    local period="${1:-today}"
    local status=0

    echo -e "${CYAN}Checking usage thresholds...${NC}"
    echo ""

    local opus=$(count_by_item "$period" "model" | grep opus | awk '{print $2}')
    local sonnet=$(count_by_item "$period" "model" | grep sonnet | awk '{print $2}')
    local haiku=$(count_by_item "$period" "model" | grep haiku | awk '{print $2}')
    local total=$((${opus:-0} + ${sonnet:-0} + ${haiku:-0}))

    check_threshold "${opus:-0}" "${THRESHOLDS[opus_daily]}" "Opus" || status=$?
    check_threshold "${sonnet:-0}" "${THRESHOLDS[sonnet_daily]}" "Sonnet" || status=$?
    check_threshold "${haiku:-0}" "${THRESHOLDS[haiku_daily]}" "Haiku" || status=$?
    check_threshold "$total" "${THRESHOLDS[total_daily]}" "Total" || status=$?

    return $status
}
```

Related Skills

extract-and-archive-tax-summary-data

5
from vamseeachanta/workspace-hub

Capture structured tax return summaries as YAML when PDF downloads are blocked or inaccessible

export-tax-summary-with-year-comparison

5
from vamseeachanta/workspace-hub

Extract and structure tax return data into YAML format for year-over-year comparison across different filing products

github-issue-tracker

5
from vamseeachanta/workspace-hub

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.

gtm-parametric-demo-reports

5
from vamseeachanta/workspace-hub

Create parametric engineering demo reports (HTML+PDF) for cold outreach to marine/offshore contractors. Data-first architecture: input DBs → parametric sweep → output DBs → comparison matrices → branded interactive report.

usage-optimization

5
from vamseeachanta/workspace-hub

Optimize AI usage efficiency through script-first patterns, batch operations, and input preparation

agent-usage-optimizer

5
from vamseeachanta/workspace-hub

Reads quota state and recommends optimal Codex/Codex/Gemini allocation per task

skill-creator-advanced-usage

5
from vamseeachanta/workspace-hub

Sub-skill of skill-creator: Advanced Usage.

usage-tracker-5-trend-analysis

5
from vamseeachanta/workspace-hub

Sub-skill of usage-tracker: 5. Trend Analysis (+1).

usage-tracker-1-basic-usage-logging

5
from vamseeachanta/workspace-hub

Sub-skill of usage-tracker: 1. Basic Usage Logging (+1).

gmsh-openfoam-orcaflex-agent-usage-pattern

5
from vamseeachanta/workspace-hub

Sub-skill of gmsh-openfoam-orcaflex: Agent Usage Pattern.

solver-benchmark-programmatic-usage

5
from vamseeachanta/workspace-hub

Sub-skill of solver-benchmark: Programmatic Usage.

solver-benchmark-mandatory-checks-before-committing-reports

5
from vamseeachanta/workspace-hub

Sub-skill of solver-benchmark: Mandatory Checks Before Committing Reports (+2).