Add auto_invoke flag for skills to prevent eager pattern matching
Problem
Skills with descriptions that match common natural language patterns get auto-invoked when users don't intend to use them. For example, a skill called pr-review with a description mentioning "code review" and "remote PR" gets triggered whenever a user says "review this PR" — even when they just want Claude to read the diff directly.
There's no way to prevent this without:
- The user explicitly saying "don't use pr-review" in every message
- The user denying the permission prompt each time it fires
- Making the skill description less accurate (counterproductive)
The root cause is that Claude pattern-matches the skill description (not the skill name) against natural language in user messages. Any skill whose description overlaps with common phrasing will false-positive.
Proposed Solution
Add an auto_invoke: false frontmatter flag (or similar, e.g. user_invocable: explicit) to SKILL.md files. When set:
- The skill would only be invoked via explicit
/skill-namesyntax - It would not be pattern-matched against natural language in user messages
- The skill would still appear in
/helpor skill listings so users know it exists
Example
---
description: Run pr code review (local diff or remote PR)...
auto_invoke: false
---
With this flag, saying "review this PR" would NOT trigger the skill, but /pr-review pr 34714 still would.
Why This Matters
Teams build specialized skills (CI runners, code review tools, deployment helpers) whose descriptions naturally overlap with common user requests. Without this flag, users get interrupted by false-positive skill matches and have to either deny the prompt or add "don't use X" disclaimers to every message. This is especially frustrating for skills that launch expensive subagents or run external tools before the user can intervene.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗