usage-tracker-5-trend-analysis

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

5 stars

Best use case

usage-tracker-5-trend-analysis is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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

Teams using usage-tracker-5-trend-analysis 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/5-trend-analysis/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/_core/bash/usage-tracker/5-trend-analysis/SKILL.md"

Manual Installation

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

How usage-tracker-5-trend-analysis Compares

Feature / Agentusage-tracker-5-trend-analysisStandard 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: 5. Trend Analysis (+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

# 5. Trend Analysis (+1)

## 5. Trend Analysis


Analyze usage trends over time:

```bash
#!/bin/bash
# ABOUTME: Usage trend analysis
# ABOUTME: Compare periods and identify patterns

# Get daily totals for last N days
get_daily_trend() {
    local days="${1:-7}"
    local category="${2:-}"

    for i in $(seq $days -1 0); do
        local date=$(date -d "$i days ago" +%Y-%m-%d)
        local count

        if [[ -n "$category" ]]; then
            count=$(grep "$date" "$USAGE_LOG" 2>/dev/null | \
                    grep "|${category}|" | \
                    awk -F'|' '{sum+=$4} END {print sum+0}')
        else
            count=$(grep "$date" "$USAGE_LOG" 2>/dev/null | \
                    awk -F'|' '{sum+=$4} END {print sum+0}')
        fi

        echo "$date $count"
    done
}

# Calculate moving average
moving_average() {
    local window="${1:-3}"
    local values=("${@:2}")
    local sum=0
    local count=0

    for val in "${values[@]}"; do
        sum=$((sum + val))
        count=$((count + 1))

        if [[ $count -ge $window ]]; then
            echo $((sum / window))
            sum=$((sum - ${values[$((count - window))]}))
        fi
    done
}

# Display trend chart (ASCII)
display_trend_chart() {
    local days="${1:-14}"
    local max_width=40

    echo ""
    echo "Usage Trend (Last $days days)"
    echo "────────────────────────────────────────"

    local max_val=0
    declare -a daily_data

    while read -r date count; do
        daily_data+=("$date:$count")
        [[ $count -gt $max_val ]] && max_val=$count
    done < <(get_daily_trend "$days")

    [[ $max_val -eq 0 ]] && max_val=1

    for entry in "${daily_data[@]}"; do
        local date="${entry%:*}"
        local count="${entry#*:}"
        local bar_len=$((count * max_width / max_val))
        local bar=$(printf "%${bar_len}s" | tr ' ' '█')

        printf "%s │%s %d\n" "${date:5}" "$bar" "$count"
    done

    echo "────────────────────────────────────────"
}
```


## 6. Export and Reporting


Export data for external analysis:

```bash
#!/bin/bash
# ABOUTME: Export usage data to various formats
# ABOUTME: CSV, JSON, Markdown reports

# Export to CSV
export_csv() {
    local period="${1:-week}"
    local output="${2:-usage_export.csv}"

    echo "timestamp,category,item,value,metadata" > "$output"
    get_usage_period "$period" | tr '|' ',' >> "$output"

    echo "Exported to $output"
}

# Export to JSON
export_json() {
    local period="${1:-week}"
    local output="${2:-usage_export.json}"

    echo "[" > "$output"
    local first=true

    while IFS='|' read -r ts cat item val meta; do
        [[ "$ts" =~ ^#.*$ ]] && continue
        [[ -z "$ts" ]] && continue

        [[ "$first" == "false" ]] && echo "," >> "$output"
        first=false

        cat >> "$output" << EOF
  {
    "timestamp": "$ts",
    "category": "$cat",
    "item": "$item",
    "value": $val,
    "metadata": "$meta"
  }
EOF
    done < <(get_usage_period "$period")

    echo "]" >> "$output"
    echo "Exported to $output"
}

# Generate markdown report
generate_markdown_report() {
    local period="${1:-week}"
    local output="${2:-usage_report.md}"

    cat > "$output" << EOF
# Usage Report - Week of $(date +%Y-%m-%d)

Related Skills

mnt-analysis-cleanup

5
from vamseeachanta/workspace-hub

Survey, classify, and clean up `/mnt/local-analysis/` (or any sibling-to-workspace-hub directory holding orphan worktrees, codex-burn artifacts, agent log accumulations, and outer-clone duplicates) without losing useful code/work. Surfaces a tiered approval menu rather than baking decisions; defers all destructive ops until user confirms.

repo-architecture-analysis

5
from vamseeachanta/workspace-hub

Scan a Python repo's package structure, count classes/functions, classify module maturity (PRODUCTION/DEVELOPMENT/SKELETON/GAP), and generate architecture reports with Mermaid diagrams. Use when asked to analyze codebase structure, find untested packages, or assess module maturity.

viv-analysis

5
from vamseeachanta/workspace-hub

Assess vortex-induced vibration (VIV) for risers and tubular members with natural frequency and safety factor calculations. Use for VIV susceptibility analysis, natural frequency calculation, vortex shedding assessment, and tubular member fatigue from VIV.

structural-analysis

5
from vamseeachanta/workspace-hub

Structural analysis for marine and offshore structures per DNV/API/ISO codes. Use when performing ULS/ALS limit state checks, column buckling, beam deflection, tubular joint capacity (DNV-RP-C203), or stiffened panel analysis. Covers section properties, combined loading, and ALS dented pipe assessment.

signal-analysis

5
from vamseeachanta/workspace-hub

Perform signal processing, rainflow cycle counting, and spectral analysis for fatigue and time series data. Use for analyzing stress time histories, computing FFT/PSD, extracting fatigue cycles (ASTM E1049-85), and batch processing OrcaFlex signals.

orcawave-qtf-analysis

5
from vamseeachanta/workspace-hub

Second-order wave force QTF computation in OrcaWave. Use when computing mean drift forces, difference-frequency or sum-frequency QTFs, slow-drift response, or applying Newman approximation for offshore structures.

orcaflex-modal-analysis

5
from vamseeachanta/workspace-hub

Perform modal and frequency analysis on OrcaFlex models to extract natural frequencies, mode shapes, and identify dominant DOF responses. Use for VIV assessment, resonance identification, and structural dynamics characterization.

orcaflex-jumper-analysis

5
from vamseeachanta/workspace-hub

Rigid and flexible jumper modelling in OrcaFlex covering installation analysis, in-place analysis, VIV screening, and fatigue assessment.

orcaflex-installation-analysis

5
from vamseeachanta/workspace-hub

Create and analyze OrcaFlex models for offshore installation sequences including subsea structure lowering, pipeline installation, and crane operations. Generate models at multiple water depths and orientations for installation feasibility studies.

orcaflex-extreme-analysis

5
from vamseeachanta/workspace-hub

Extract extreme response values with linked statistics from OrcaFlex simulations. Use for design load identification, max/min extraction with associated values, and extreme event characterization.

diffraction-analysis

5
from vamseeachanta/workspace-hub

Master skill for hydrodynamic diffraction analysis - AQWA, OrcaWave, and BEMRosetta integration

aqwa-analysis

5
from vamseeachanta/workspace-hub

Integrate with AQWA hydrodynamic software for RAO computation, damping analysis, and coefficient extraction. Hub skill — delegates to aqwa-input, aqwa-output, aqwa-reference for details.