Skip to content
Development
Command

/analytics

Show usage analytics dashboard - command invocations, skill activations, agent spawns. Supports --export json/csv and --since filtering. Activates for analytics, usage stats, command stats, what commands used, skill usage, agent usage.

From plugin
specweave
15673 skills20 agents73 commands
Install
> /plugin marketplace add anton-abyzov/specweave
> /plugin install sw@specweave

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/analytics

Context preview

What this command does when you run it.

Show usage analytics dashboard - command invocations, skill activations, agent spawns. Supports --export json/csv and --since filtering. Activates for analytics, usage stats, command stats, what commands used, skill usage, agent usage.

Command definition

analytics.md
description: Show usage analytics dashboard - command invocations, skill activations, agent spawns. Supports --export json/csv and --since filtering. Activates for analytics, usage stats, command stats, what commands used, skill usage, agent usage.

Analytics Command

**Show SpecWeave usage statistics and analytics.**

Usage

sw:analytics [OPTIONS]

Options

| Option | Description | Default | |--------|-------------|---------| | `--since TIME` | Time filter (24h, 7d, 30d) | All time | | `--export FORMAT` | Export to json or csv | None | | `--limit N` | Number of items in top lists | 10 | | `--type TYPE` | Filter by type (command/skill/agent) | All | | `--json` | Output raw JSON for scripting | False |

Examples

# Show dashboard (all time)
sw:analytics

# Last 7 days
sw:analytics --since 7d

# Last 24 hours
sw:analytics --since 24h

# Export to JSON
sw:analytics --export json

# Export to CSV
sw:analytics --export csv

# Show only commands
sw:analytics --type command

# Raw JSON output for scripting
sw:analytics --json

Execution

**Use the SpecWeave CLI command:**

specweave analytics [OPTIONS]

Examples:

# Show dashboard
specweave analytics

# Filter last 7 days
specweave analytics --since 7d

# Export JSON
specweave analytics --export json

# Export CSV with time filter
specweave analytics --since 30d --export csv

# JSON output for scripting
specweave analytics --json

# Filter by type
specweave analytics --type command
specweave analytics --type skill
specweave analytics --type agent

Output Format

๐Ÿ“Š SpecWeave Analytics Dashboard

Period: 2025-12-01 โ†’ 2025-12-30
Total Events: 1,234
Success Rate: 98.5%

๐Ÿ”ง Top Commands:
     156 โ”‚ sw:do
      89 โ”‚ sw:increment
      67 โ”‚ sw:progress
      34 โ”‚ sw:done
      28 โ”‚ sw:validate

โšก Top Skills:
      45 โ”‚ increment
      34 โ”‚ spec-generator
      28 โ”‚ qa-engineer

๐Ÿค– Top Agents:
      23 โ”‚ architect
      18 โ”‚ frontend-architect
      15 โ”‚ qa-engineer

๐Ÿ“… Daily Activity (last 7 days):
   2025-12-24 โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ (34)
   2025-12-25 โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ (45)
   2025-12-26 โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ (28)
   2025-12-27 โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ (36)
   2025-12-28 โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ (21)
   2025-12-29 โ”‚ โ–ˆโ–ˆโ–ˆ (12)
   2025-12-30 โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆ (15)

Data Sources

| Source | Location | |--------|----------| | Events log | `.specweave/state/analytics/events.jsonl` | | Daily summary | `.specweave/state/analytics/daily-summary.json` | | Cache | `.specweave/state/analytics/cache.json` |

Event Schema

interface AnalyticsEvent {
  timestamp: string;      // ISO 8601
  type: 'command' | 'skill' | 'agent';
  name: string;
  plugin?: string;
  increment?: string;
  duration?: number;      // milliseconds
  success: boolean;
  error?: string;
  metadata?: Record<string, unknown>;
}

Related Commands

| Command | Purpose | |---------|---------| | `sw:status` | Show increment status | | `sw:progress` | Show task progress | | `sw:jobs` | Show background jobs |

Notes

  • Analytics data is stored locally only (no remote telemetry)
  • Log rotation occurs automatically when events.jsonl > 10MB
  • Cache is refreshed every 5 minutes
  • Historical data is preserved in archive/ subdirectory
Read more
Ships withspecweave

Spec-first AI development: describe a feature โ†’ AI creates spec + plan + tasks, builds autonomously, syncs to GitHub/JIRA. Domain-expert skills for PM, Architect, Frontend, QA learn your patterns permanently. Claude Code, Codex, Cursor, Copilot & more.

Get the whole plugin