claude-code - 💡(How to fix) Fix [BUG] The skill_activated event emits custom_skill instead of actual skill name [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#58674Fetched 2026-05-14 03:42:21
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2

Error Message

Error Messages/Logs

Code Example



---

{
  "env": {
    "CLAUDE_CODE_ENABLE_TELEMETRY": "1",
    "OTEL_METRICS_EXPORTER": "otlp",
    "OTEL_LOGS_EXPORTER": "otlp",
    "OTEL_EXPORTER_OTLP_PROTOCOL": "http/json",
    "OTEL_EXPORTER_OTLP_ENDPOINT": "https://yourendpoint.com",
    "OTEL_LOG_USER_PROMPTS": "0",
    "OTEL_LOG_TOOL_DETAILS": "1",
    "CLAUDE_CODE_ENHANCED_TELEMETRY_BETA": "1",
    "OTEL_TRACES_EXPORTER": "otlp",
    "OTEL_EXPORTER_OTLP_HEADERS": "X-API-Key=YOUR_API_KEY",
    "CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL": "1"
  }
}

---

SELECT
  e.event_timestamp,
  e.user_email,
  e.session_id,
  e.terminal_type,
  (SELECT JSON_VALUE(a, '$.value.stringValue')
   FROM UNNEST(JSON_EXTRACT_ARRAY(e.raw_attributes)) a
   WHERE JSON_VALUE(a, '$.key') = 'skill.name')         AS skill_name,
  COALESCE(
   (SELECT JSON_VALUE(a, '$.value.stringValue')
    FROM UNNEST(JSON_EXTRACT_ARRAY(e.raw_attributes)) a
    WHERE JSON_VALUE(a, '$.key') = 'invocation_trigger'),
   '(unknown)')                                          AS invocation_trigger,
  (SELECT JSON_VALUE(a, '$.value.stringValue')
   FROM UNNEST(JSON_EXTRACT_ARRAY(e.raw_attributes)) a
   WHERE JSON_VALUE(a, '$.key') = 'skill.source')       AS skill_source,
  (SELECT JSON_VALUE(a, '$.value.stringValue')
   FROM UNNEST(JSON_EXTRACT_ARRAY(e.raw_attributes)) a
   WHERE JSON_VALUE(a, '$.key') = 'plugin.name')        AS plugin_name
FROM `maxxton-develop.mxt.claude_otel_events` e
WHERE e.event_type = 'skill_activated'
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

When a skill is activated, the skill_activated OTel event sometimes records skill.name = "custom_skill" instead of the actual skill name. This affects all three source types: plugin, projectSettings, and userSettings.

What's wrong is that skill.name is often custom_skill, and no other attribute in the event carries the real name.

What Should Happen?

I'd expect that skill.name contains the skill's actual name (e.g. brainstorming, review).

Error Messages/Logs

Steps to Reproduce

  1. Enable Otel telemetry tracking through managed settings:
{
  "env": {
    "CLAUDE_CODE_ENABLE_TELEMETRY": "1",
    "OTEL_METRICS_EXPORTER": "otlp",
    "OTEL_LOGS_EXPORTER": "otlp",
    "OTEL_EXPORTER_OTLP_PROTOCOL": "http/json",
    "OTEL_EXPORTER_OTLP_ENDPOINT": "https://yourendpoint.com",
    "OTEL_LOG_USER_PROMPTS": "0",
    "OTEL_LOG_TOOL_DETAILS": "1",
    "CLAUDE_CODE_ENHANCED_TELEMETRY_BETA": "1",
    "OTEL_TRACES_EXPORTER": "otlp",
    "OTEL_EXPORTER_OTLP_HEADERS": "X-API-Key=YOUR_API_KEY",
    "CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL": "1"
  }
}
  1. Have different users activate skills (manually or through model invocable skills).
  2. Query your (BigQuery) data for the skill usage.

We've used this BigQuery data source in Google's Data Studio:

SELECT
  e.event_timestamp,
  e.user_email,
  e.session_id,
  e.terminal_type,
  (SELECT JSON_VALUE(a, '$.value.stringValue')
   FROM UNNEST(JSON_EXTRACT_ARRAY(e.raw_attributes)) a
   WHERE JSON_VALUE(a, '$.key') = 'skill.name')         AS skill_name,
  COALESCE(
   (SELECT JSON_VALUE(a, '$.value.stringValue')
    FROM UNNEST(JSON_EXTRACT_ARRAY(e.raw_attributes)) a
    WHERE JSON_VALUE(a, '$.key') = 'invocation_trigger'),
   '(unknown)')                                          AS invocation_trigger,
  (SELECT JSON_VALUE(a, '$.value.stringValue')
   FROM UNNEST(JSON_EXTRACT_ARRAY(e.raw_attributes)) a
   WHERE JSON_VALUE(a, '$.key') = 'skill.source')       AS skill_source,
  (SELECT JSON_VALUE(a, '$.value.stringValue')
   FROM UNNEST(JSON_EXTRACT_ARRAY(e.raw_attributes)) a
   WHERE JSON_VALUE(a, '$.key') = 'plugin.name')        AS plugin_name
FROM `maxxton-develop.mxt.claude_otel_events` e
WHERE e.event_type = 'skill_activated'
  1. Notice that the most used skill is the "custom_skill", giving you no meaningful insight.
<img width="793" height="622" alt="Image" src="https://github.com/user-attachments/assets/61c3fd83-35f7-41fa-b97a-5d29743c619c" />

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

No response

Claude Code Version

2.1.140

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] The skill_activated event emits custom_skill instead of actual skill name [1 participants]