home / skills / laurigates / claude-plugins / analytics-unused

This skill identifies never-used commands and skills to help you prune plugins and optimize your workflow.

npx playbooks add skill laurigates/claude-plugins --skill analytics-unused

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
3.9 KB
---
model: haiku
description: Show commands and skills that have never been used
args: ""
allowed-tools: Bash, Read, Glob
argument-hint: ""
created: 2026-01-10
modified: 2026-01-10
reviewed: 2026-01-10
name: analytics-unused
---

# /analytics:unused

Identify commands and skills that have never been invoked, helping you discover unused features or clean up unused plugins.

## Context

Check analytics availability:

```bash
if [[ ! -f ~/.claude-analytics/summary.json ]]; then
  echo "No analytics data yet. Cannot determine unused commands/skills."
  exit 0
fi
```

## Execution

**Scan for unused commands and skills:**

```bash
ANALYTICS_DIR="${HOME}/.claude-analytics"
SUMMARY_FILE="${ANALYTICS_DIR}/summary.json"

echo "🔍 Scanning for unused commands and skills..."
echo ""

# Get list of used commands/skills
if [[ -f "${SUMMARY_FILE}" ]]; then
  USED=$(cat "${SUMMARY_FILE}" | jq -r '.items | keys[]')
else
  USED=""
fi

# Find all command files in plugins
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "Unused Commands"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""

UNUSED_COUNT=0

# Scan for skill files
find . -type f \( -name "SKILL.md" -o -name "skill.md" \) -not -path "*/node_modules/*" 2>/dev/null | while read -r cmd_file; do
  # Extract command name from filename
  # Format: plugin-name/commands/plugin-command.md -> plugin:command
  BASENAME=$(basename "$cmd_file" .md)

  # Try to extract command name from frontmatter
  CMD_NAME=$(grep -A 20 "^---$" "$cmd_file" | grep "^# /" | head -1 | sed 's/^# \///' || echo "")

  if [[ -z "$CMD_NAME" ]]; then
    # Fallback: derive from filename (e.g., analytics-report.md -> analytics:report)
    CMD_NAME=$(echo "$BASENAME" | sed 's/-/:/' | sed 's/-/:/')
  fi

  # Check if command has been used
  if ! echo "$USED" | grep -q "^${CMD_NAME}$"; then
    echo "  📝 /${CMD_NAME}"
    echo "     File: ${cmd_file}"
    echo ""
    UNUSED_COUNT=$((UNUSED_COUNT + 1))
  fi
done

if [[ $UNUSED_COUNT -eq 0 ]]; then
  echo "  All commands have been used! 🎉"
  echo ""
fi

# Find all skill files
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "Unused Skills"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""

UNUSED_SKILLS=0

find . -type f -path "*/skills/*/skill.md" -not -path "*/node_modules/*" 2>/dev/null | while read -r skill_file; do
  # Extract skill name from directory name
  SKILL_DIR=$(dirname "$skill_file")
  SKILL_NAME=$(basename "$SKILL_DIR")

  # Try to get skill name from frontmatter
  FRONTMATTER_NAME=$(grep -A 5 "^---$" "$skill_file" | grep "^name:" | head -1 | sed 's/^name: *//' || echo "")

  if [[ -n "$FRONTMATTER_NAME" ]]; then
    SKILL_NAME="$FRONTMATTER_NAME"
  fi

  # Check if skill has been used
  if ! echo "$USED" | grep -qi "$SKILL_NAME"; then
    echo "  🎯 ${SKILL_NAME}"
    echo "     File: ${skill_file}"
    echo ""
    UNUSED_SKILLS=$((UNUSED_SKILLS + 1))
  fi
done

if [[ $UNUSED_SKILLS -eq 0 ]]; then
  echo "  All skills have been used! 🎉"
  echo ""
fi

echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""

if [[ $UNUSED_COUNT -eq 0 && $UNUSED_SKILLS -eq 0 ]]; then
  echo "✨ All commands and skills have been used at least once!"
else
  echo "💡 Consider:"
  echo "  • Trying out unused features to see if they're helpful"
  echo "  • Removing plugins you never use"
  echo "  • Sharing useful commands with your team"
fi

echo ""
```

## Post-actions

None.

Overview

This skill scans a development workspace to identify commands and skills that have never been invoked according to local Claude analytics. It helps surface unused features so you can try, document, or remove them to reduce clutter. The script reads a local analytics summary and compares it to plugin command and skill files to produce a concise report.

How this skill works

The skill checks for a local analytics summary.json and builds a list of used items. It then walks repository files looking for command and skill markdown files, extracts names from frontmatter or filenames, and compares them to the used list. Unused commands and skills are listed with file paths and a final suggestion block recommending actions.

When to use it

  • After installing many plugins to find features you never used
  • Before cleaning up or pruning plugins to avoid removing useful but unused items
  • When onboarding or auditing a repository to document available but unused capabilities
  • Regularly as part of maintenance to keep your workspace lean and relevant
  • When preparing a shareable plugin set to highlight actively used features

Best practices

  • Ensure analytics data exists at ~/.claude-analytics/summary.json before running
  • Run from the repository root so the script can find plugin and skills directories
  • Review extracted names — frontmatter can override directory-derived names
  • Use the results to test unfamiliar commands before deleting plugins
  • Combine this report with usage metrics and team feedback before pruning

Example use cases

  • Identify and try out untested commands added by recent contributors
  • Audit a monorepo to find skills that contributors never invoked
  • Clean up user machines by removing plugins with no recorded usage
  • Create a trimmed distribution of plugins that contains only actively used features
  • Document underused features to inform training or internal demos

FAQ

What happens if there is no analytics summary file?

The skill reports that analytics data is missing and cannot determine unused items; it exits without scanning.

How does it determine a command or skill name?

It prefers frontmatter values found in the markdown; if absent it derives names from filenames and directory structure.

Can this remove plugins automatically?

No. The tool only reports unused items and suggests actions; deletion must be done manually after review.