home / skills / mjunaidca / mjs-agent-skills / installing-skill-tracker

installing-skill-tracker skill

/.claude/skills/installing-skill-tracker

This skill installs Claude Code tracking hooks and verifies setup to enable automatic skill usage analytics in new projects.

npx playbooks add skill mjunaidca/mjs-agent-skills --skill installing-skill-tracker

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

Files (3)
SKILL.md
1.3 KB
---
name: installing-skill-tracker
description: |
  Installs Claude Code hooks for automatic skill usage measurement.
  Use when setting up skill tracking infrastructure in a new project.
  NOT when hooks are already installed (run verify.py to check).
---

## Quick Start

```bash
python .claude/skills/installing-skill-tracker/scripts/setup.py
python .claude/skills/installing-skill-tracker/scripts/verify.py
```

## Instructions

1. **Run setup** to install tracking hooks:
   ```bash
   python .claude/skills/installing-skill-tracker/scripts/setup.py
   ```

2. **Verify installation**:
   ```bash
   python .claude/skills/installing-skill-tracker/scripts/verify.py
   ```

3. **View usage analysis** (after some skill usage):
   ```bash
   python .claude/hooks/analyze-skills.py
   ```

## If Verification Fails

1. **Check jq is installed**:
   ```bash
   jq --version || echo "Install jq: brew install jq"
   ```

2. **Check hook scripts exist**:
   ```bash
   ls -la .claude/hooks/track-*.sh
   ```

3. **Check settings.json**:
   ```bash
   cat .claude/settings.json | jq .hooks
   ```

4. **Re-run setup** if components missing:
   ```bash
   python .claude/skills/installing-skill-tracker/scripts/setup.py
   ```

**Stop and report** if verification still fails after re-running setup.

Overview

This skill installs Claude Code hooks that automatically measure skill usage across an agent project. It provides a quick setup to add tracking scripts, a verification step to confirm installation, and tooling to analyze usage after data is collected. Use it to establish basic monitoring and usage metrics for skills in a new project.

How this skill works

The setup script installs shell hook scripts and updates .claude configuration so calls to skills emit tracking events. A verify script checks for required files, settings, and the presence of jq for JSON inspection. After some skill activity, an analyzer script aggregates the emitted events into a usage report for review.

When to use it

  • When onboarding a new project and you need skill usage telemetry.
  • When you want automated, lightweight tracking of agent skill invocations.
  • Before running usage analysis to ensure hooks are present and configured.
  • When creating dashboards or reports that rely on invocation counts and metadata.

Best practices

  • Run the setup script from your project root to ensure paths are written correctly.
  • Immediately run the verify script after setup and before relying on metrics.
  • Install jq on your system to make JSON checks and scripts work reliably.
  • Re-run setup if verify reports missing files or misconfigured hooks.
  • If verification still fails, stop and report the issue with logs and verify output.

Example use cases

  • Add tracking to a newly scaffolded agent project to collect usage baseline data.
  • Validate that CI or dev environments include the same hook configuration as production.
  • Quickly audit whether hooks are installed before deploying telemetry-dependent features.
  • Collect invocation counts to prioritize which skills need maintenance or optimization.

FAQ

What commands do I run to install and verify?

Run the setup script then the verify script: python .claude/skills/installing-skill-tracker/scripts/setup.py and python .claude/skills/installing-skill-tracker/scripts/verify.py.

How do I view collected usage data?

After skills have been used, run python .claude/hooks/analyze-skills.py to generate usage analysis.