Telemetry API
The Telemetry module tracks skill usage metrics for effectiveness analysis while respecting user privacy. It records per-skill usage events with timing, outcome, and agent context in a local SQLite database.Privacy Principles
- No PII collected - No usernames, IPs, file paths, or identifying data
- No content capture - No search queries, file contents, or user input
- Aggregate only - Counts, timing, scores (not specific values)
- Fire-and-forget - Never blocks, silent failures
- Transparent opt-out - Environment variables:
AUTO_SKILL_NO_TELEMETRY=1orDO_NOT_TRACK=1 - CI-aware - Automatically disabled in CI environments
Functions
createTelemetryCollector
Create a telemetry collector instance. Records per-skill usage events in a local SQLite database and provides aggregation queries for effectiveness analysis.Path to the SQLite database file. Defaults to
~/.claude/auto-skill/telemetry.dbExample
isTelemetryDisabled
Check if anonymous telemetry is disabled. Telemetry is disabled when:AUTO_SKILL_NO_TELEMETRYenvironment variable is setDO_NOT_TRACKenvironment variable is set (universal standard)- Any CI environment variable is detected (
CI,GITHUB_ACTIONS,GITLAB_CI, etc.)
boolean - True if telemetry should be suppressed
Example
track
Fire-and-forget anonymous telemetry beacon. Sends a lightweight GET request to the telemetry endpoint with aggregate data only (no PII). The request is non-blocking and failures are silently ignored.Event name (e.g., “skill_used”, “skill_generated”)
Optional aggregate data (counts, timing, scores - never PII)
Example
Methods
The object returned bycreateTelemetryCollector has the following methods:
recordEvent
Record a skill usage telemetry event. Persists the event to SQLite and fires an anonymous telemetry beacon with aggregate data (outcome, agent, duration).Unique identifier for the skill
Human-readable skill name
Session identifier for grouping related events
Event outcome: “success”, “failure”, “partial”, or “skipped”
Coding agent identifier (e.g., “claude-code”, “cursor”)
Duration in milliseconds
TelemetryEvent - The recorded event with generated ID and timestamp
getEffectivenessReport
Get effectiveness reports for skills. Aggregates usage events by skill name, computing success rates, average durations, and unique agent lists.Optional filter to a specific skill. If omitted, returns reports for all skills.
EffectivenessReport[] - Array of effectiveness reports, sorted by total uses descending
getEvents
Get raw telemetry events.Optional filter to a specific skill
Maximum number of events to return
TelemetryEvent[] - Array of events, newest first
Types
TelemetryEvent
A single skill usage telemetry event.ULID event identifier
Skill identifier
Human-readable skill name
Session identifier
Agent identifier (defaults to “unknown”)
Duration in milliseconds (null if not recorded)
Event outcome: “success”, “failure”, “partial”, or “skipped”
ISO-8601 timestamp
EffectivenessReport
Aggregated effectiveness data for a skill.Skill name
Total number of times the skill was used
Number of successful uses
Number of failed uses
Success rate (0.0-1.0), rounded to 3 decimal places
Average duration in milliseconds (null if no durations recorded)
List of unique agent IDs that used this skill
ISO-8601 timestamp of most recent use
Environment Variables
Telemetry respects the following environment variables:| Variable | Effect |
|---|---|
AUTO_SKILL_NO_TELEMETRY | Disables all telemetry when set to any value |
DO_NOT_TRACK | Universal opt-out standard, disables telemetry when set |
CI, GITHUB_ACTIONS, GITLAB_CI, etc. | Automatically disables telemetry in CI environments |