claude-code - 💡(How to fix) Fix [BUG] Skill auto-activation appears to use token/keyword overlap, not semantic matching [2 comments, 2 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#46952Fetched 2026-04-12 13:28:50
View on GitHub
Comments
2
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
commented ×2labeled ×2

Based on third-party empirical analysis, skill auto-activation in Claude Code appears to rely on token and keyword overlap between the user's prompt and the skill's description field, rather than semantic matching. This contradicts the common mental model (and how many skill authors write descriptions). Clarity on the intended behavior would help authors write descriptions that actually trigger.

Root Cause

Based on third-party empirical analysis, skill auto-activation in Claude Code appears to rely on token and keyword overlap between the user's prompt and the skill's description field, rather than semantic matching. This contradicts the common mental model (and how many skill authors write descriptions). Clarity on the intended behavior would help authors write descriptions that actually trigger.

RAW_BUFFERClick to expand / collapse

Summary

Based on third-party empirical analysis, skill auto-activation in Claude Code appears to rely on token and keyword overlap between the user's prompt and the skill's description field, rather than semantic matching. This contradicts the common mental model (and how many skill authors write descriptions). Clarity on the intended behavior would help authors write descriptions that actually trigger.

Evidence

Scott Spence ran sandboxed evals across skill descriptions and concluded: "Claude isn't doing semantic matching at the activation layer. It's doing something closer to keyword matching."

Source: https://scottspence.com/posts/measuring-claude-code-skill-activation-with-sandboxed-evals

Follow-up post documenting additional reproduction: https://scottspence.com/posts/claude-code-skills-dont-auto-activate

Separate analysis by fsck.com documents a related constraint. Skill descriptions share a budget of approximately "15,000 characters (or around 4000 tokens)". Beyond that, skills are not surfaced for activation.

Source: https://blog.fsck.com/2025/12/17/claude-code-skills-not-triggering/

Expected behavior

Given Claude's semantic capabilities, users expect skill descriptions to be matched against user intent semantically. A description like "Formats and validates JSON files" should trigger on prompts like "clean up this data file" when the file is JSON.

Actual behavior

Activation appears to require surface-level token overlap. Descriptions written semantically (explaining purpose in natural language) do not trigger reliably. Descriptions stuffed with literal keywords from anticipated user prompts trigger more reliably. This is the opposite of how skill authoring guidance is written.

Why existing issues do not cover this

  • #32184, #34648, #36570 are scoped to headless mode (claude -p) specifically. This report is about interactive mode activation mechanism.
  • #39390 reports explicit /skill-name invocation being overridden by keyword matching on arguments. That is a symptom of the same underlying mechanism, but framed as "explicit invocation should win" rather than "document or fix the activation mechanism."
  • #43259 and #46383 propose per-skill fixes (narrower descriptions, auto_invoke flag) without documenting the activation layer itself.
  • None of the above reference the empirical sandboxed eval data or the 15,000 character budget constraint.

Request

  1. Confirm or correct the public understanding that activation uses token and keyword overlap rather than semantic matching.
  2. Document the character and token budget constraint for the skills block.
  3. Provide official skill authoring guidance consistent with the actual mechanism.

Suggested labels: bug, area:skills, documentation

extent analysis

TL;DR

The most likely fix is to update the skill authoring guidance to reflect the actual token and keyword overlap mechanism used for skill auto-activation, rather than semantic matching.

Guidance

  • Review the empirical analysis from Scott Spence and fsck.com to understand the current activation mechanism and its limitations.
  • Consider updating skill descriptions to include relevant keywords that users are likely to use in their prompts, while staying within the 15,000 character budget constraint.
  • Document the character and token budget constraint for the skills block to help authors optimize their descriptions.
  • Provide official guidance on writing effective skill descriptions that take into account the token and keyword overlap mechanism.

Example

No code snippet is provided as this issue is related to documentation and guidance rather than a specific code fix.

Notes

The current understanding of the activation mechanism is based on third-party empirical analysis, and official confirmation or correction from the developers is needed to ensure accuracy.

Recommendation

Apply a workaround by updating skill descriptions to include relevant keywords and staying within the budget constraint, while awaiting official guidance and potential fixes to the activation mechanism. This is because the current mechanism is not aligned with the expected semantic matching behavior, and updating descriptions can help improve skill activation reliability.

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…

FAQ

Expected behavior

Given Claude's semantic capabilities, users expect skill descriptions to be matched against user intent semantically. A description like "Formats and validates JSON files" should trigger on prompts like "clean up this data file" when the file is JSON.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING