Harness Notes

Skill usage

Updated 2026-11-22,

On this page

Whether you can tell which skills get used: in a session, as local counts, in account reports, or as telemetry you collect yourself.

QuestionClaude Codechecked at 2.1.300
Skills used in a session

Each session's transcript at ~/.claude/projects/<project>/<session>.jsonl records every tool call, so skills Claude loaded appear as Skill tool calls and ones you typed appear as /name prompts. To capture them live, add a PreToolUse or PostToolUse hook with matcher Skill for Claude-initiated skills plus a UserPromptExpansion hook, which fires with command_name when you type /skillname and bypasses PreToolUse.

Transcripts are deleted after cleanupPeriodDays, so they are not a permanent usage log.

Local usage counts

Claude Code keeps a skillUsage map in ~/.claude.json, keyed by skill or command name, with usageCount and lastUsedAt (Unix milliseconds) for each entry. /skill-doctor (v2.1.252+) turns this into a report of how often each skill is used and what it costs in context, and flags skills that have never been invoked. The report opens in the /plugin manager's Stats tab, or prints as text with -p.

The counter is approximate: repeated uses of the same skill within 60 seconds in one session are counted once.

Nested skills may be recorded under either <dir>:<name> or the bare <name> key.

/skill-doctor needs feature-flag fetching and doesn't work over Remote Control.

Account or team reports

On the Enterprise plan, GET /v1/organizations/analytics/skills in the Claude Enterprise Analytics API returns daily per-skill rows. Filtered to product claude_code, they include invocation_count, distinct_session_skill_used_count, distinct_user_count and attributed spend. A Primary Owner creates the read:analytics key at claude.ai/analytics/api-keys. The claude.ai/analytics/claude-code dashboard and the Console Claude Code dashboard show no per-skill breakdown.

Not available on the Team plan. invocation_count is null when invocation reporting isn't enabled for the organization.

Names of members' private skills are withheld or shown as opaque ids.

For individuals, /usage on Pro, Max, Team or Enterprise shows the share of recent usage attributed to each skill, computed from local history on that machine.

Telemetry you can collect

With CLAUDE_CODE_ENABLE_TELEMETRY=1 and an OTLP exporter, every invocation emits a claude_code.skill_activated event. The event carries skill.name, skill.source, and invocation_trigger (user-slash, claude-proactive or nested-skill), so slash-typed and model-initiated uses are both covered. The claude_code.cost.usage and claude_code.token.usage metrics also carry a skill.name attribute, and claude_code.tool_result events for the Skill tool include skill_name in tool_parameters.

Names of user-defined and third-party plugin skills are redacted (custom_skill or third-party) unless you set OTEL_LOG_TOOL_DETAILS=1.

Whether a skill run succeeded

Partly

When Claude calls the Skill tool, the claude_code.tool_result event reports success and error_type, and a PostToolUseFailure hook with matcher Skill fires if loading the skill fails. Those signals only show whether the skill was loaded. Nothing reports whether the work the skill describes was finished, and /name invocations you type don't go through the tool at all.

skill_activated has no success or outcome attribute.

Notes and sources

Claude Code, 7 sources
Skills used in a session, 2
Local usage counts, 2
Account or team reports, 2
Telemetry you can collect, 1
Whether a skill run succeeded, 2