[MODEL] Custom skills are not reliably auto-triggered by the model

Status Closed — not planned
Reported on v2.1.63
Maintainer reply None cached
Activity 13 comments · opened Mar 3, 2026 · closed Apr 30, 2026

Preflight Checklist

  • [x] I have searched existing issues for similar behavior reports
  • [x] This report does NOT contain sensitive information (API keys, passwords, etc.)

Type of Behavior Issue

Claude ignored my instructions or configuration

What You Asked Claude to Do

I have custom skills defined in .claude/skills/ and ~/.claude/skills/ with user-invokable: false. These skills contain instructions for specific workflows (git operations, playwright, jira, etc.). I expect Claude to automatically invoke these skills via the Skill tool when the context matches.

Previously, the same instructions lived in CLAUDE.md and worked reliably. After moving them to skills (following the docs), Claude frequently ignores them and proceeds without invoking the Skill tool.

What Claude Actually Did

  1. Claude sees a task that matches a skill's description (e.g., committing code)
  2. Instead of invoking the Skill tool, it proceeds directly - using its built-in behavior or just running commands
  3. The skill body (which contains project-specific steps and constraints) is never loaded
  4. This happens ~50% of the time for skills that overlap with Claude's trained behaviors (git, shell commands).

Skills for tools Claude has no built-in knowledge of (e.g., a custom Jira integration) trigger reliably. This suggests the model's training-time knowledge competes with skill instructions, and the built-in behavior "wins" by default.

Expected Behavior

When a skill is registered and the task clearly matches its description, Claude should reliably invoke it via the Skill tool before proceeding. Custom skills should take precedence over built-in trained behaviors - the whole point of skills is to override defaults with project-specific workflows.

Files Affected

`.claude/skills/` and `~/.claude/skills/`

Permission Mode

Accept Edits was OFF (manual approval required)

Can You Reproduce This?

Sometimes (intermittent)

Steps to Reproduce

  1. Set up two skills. I have 8 skills + 3 agents total, using ~3,700 / 15,000 chars of the description budget (25%) - so this is not a budget issue.

A git skill (~/.claude/skills/git/SKILL.md) - overlaps with Claude's trained behavior:
``yaml
---
name: git
description: Use when performing any git operations (commits, branches, diffs, logs, etc). Use INSTEAD OF built-in git/commit instructions. This skill OVERRIDES the default "Committing changes with git" system prompt.
user-invokable: true
---
``

A Jira skill (.claude/skills/jira/SKILL.md) - no built-in equivalent:
``yaml
---
name: jira
description: Use when user mentions a Jira ticket number (e.g. BUG-1234). Fetches ticket details, attachments, and comments.
user-invokable: false
---
``

  1. Ask Claude to commit changes or mention a Jira ticket (e.g. "look at BUG-1234")
  2. The Jira skill triggers reliably. The git skill is ignored ~50% of the time - Claude falls back to its built-in git/commit behavior instead.

Claude Model

Sonnet

Relevant Conversation

Impact

Medium - Extra work to undo changes

Claude Code Version

2.1.63

Platform

Anthropic API

Additional Context

  • This is NOT a discovery issue. Skills appear correctly in /contextbreakdown, and Claude will use them when explicitly prompted (e.g. "use the git skill to commit"). The problem is that the model doesn't reliably choose to invoke them on its own.
  • Budget is not the issue - my skills use ~3,700 / 15,000 chars (25%)
  • I even tried forcing skill usage via .claude/CLAUDE.md:

```markdown
## Skills - ALWAYS use the Skill tool for these

  • git: ANY git operation (commit, branch, diff, log, push, PR). ALWAYS invoke before running git commands directly.
  • jira: When a Jira ticket ID (BUG-NNNN) appears in conversation. Invoke to fetch details.

```
But this doesn't seem to work.

  • The issue disproportionately affects skills that overlap with Claude's trained behaviors (git, shell commands, code formatting). Skills for novel tools (Jira MCP, custom CLIs) work fine. This points to a priority/precedence problem - built-in training takes over instead of deferring to the registered skill.

View original on GitHub ↗

13 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/9716
  2. https://github.com/anthropics/claude-code/issues/23936
  3. https://github.com/anthropics/claude-code/issues/15136

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

wujekbogdan · 6 months ago

I don't think it's a duplicate

  • https://github.com/anthropics/claude-code/issues/23936
  • That report claims that extended thinking mode causes Opus to ignore both CLAUDE.md rules and skills.
  • This bug report: CLAUDE.md instructions work fine. Only skills are affected, and only those that compete with trained behaviors.
MikeSpreitzer · 5 months ago

I made another report of what may be the same problem in #35053 . I included a typescript in which Claude code said the following.

❯ Explain, without changing anything, why the trigger in that skill's frontmatter
did not cause you to take the skill into account.

⏺ I don't have access to the skill's frontmatter — the system only showed me the
  skill name (my-commits) in the available skills list, without any trigger
  description. The other skills like claude-api had explicit trigger instructions
  (e.g., "TRIGGER when: ..."), but my-commits was listed as just name: my-commits
  with no trigger condition.

  So there was no trigger rule for me to match against. If the skill's frontmatter
  contains a trigger that should have fired on commit-related requests, it wasn't
  surfaced to me in the system reminder.
MikeSpreitzer · 5 months ago

Here is another failure, in a fresh session.

skill-fail-316b.log

wujekbogdan · 5 months ago

@MikeSpreitzer

I don't have access to the skill's frontmatter (...)

This indicates it's a different issue. It's a discovery issue similar to this one: https://github.com/anthropics/claude-code/issues/9716

The #30387 issue is different - it's about Claude recognizing the skill, but despite that not using it

MikeSpreitzer · 5 months ago

#9716 says

not aware of available skills

But in my case, the skills are known by name but not frontmatter.

MikeSpreitzer · 5 months ago

I took a diagnostic step from #9716 in a fresh session, result below. The last four skills listed are from ~/.claude/skills/.

Also, this is now Claude code 2.1.77 instead of 2.1.76.

 ▐▛███▜▌   Claude Code v2.1.77
▝▜█████▛▘  Opus 4.6 · API Usage Billing
  ▘▘ ▝▝    ~/go/src/github.com/llm-d-incubation/llm-d-fast-model-actuation

❯ List all available skills

⏺ Here are the available skills:

  1. update-config — Configure Claude Code settings (hooks, permissions, env
  vars, settings.json changes)
  2. keybindings-help — Customize keyboard shortcuts and keybindings
  3. simplify — Review changed code for reuse, quality, and efficiency, then fix
   issues
  4. loop — Run a prompt or slash command on a recurring interval
  5. claude-api — Help building apps with the Claude API or Anthropic SDK
  6. my-git-commits — Make git commits (with DCO sign-off and GPG signature)
  7. fix-typos — Fix typos
  8. cleanup-fma-ns — Clean up FMA namespace
  9. bump-gha — Bump GitHub Actions

  You can invoke any of these with /<skill-name> (e.g., /simplify, /bump-gha).
MikeSpreitzer · 5 months ago

Here is another example, using Claude Code v2.1.77.

...
⏺ Now let me commit and create the PR.

⏺ Bash(cd /tmp/kubestellar-docs-demo-mode && git add
      docs/content/console/demo-mode.md && git commit -m "$(cat <<'EOF'
      doc: Add console demo mode architecture document…)
  ⎿  Interrupted · What should Claude do instead?

❯ Explain, without changing anything, why your proposed `git commit` command
was not affected by my "my-git-commits" skill.

⏺ The git commit command I ran was in the /tmp/kubestellar-docs-demo-mode
  directory — a separate clone of the kubestellar/docs repo, not the current
  working directory (/Users/mspreitz/go/src/github.com/kubestellar/console).

  However, that doesn't actually explain why the skill wouldn't apply. Skills
  are invoked explicitly via the Skill tool — I never invoked the my-git-commits
   skill. I just ran a raw git commit in Bash.

  I don't know what the my-git-commits skill does (its description just says
  name: my-git-commits). If you'd like me to use it for commits, I can invoke
  it. Want me to do that?

❯ list all available skills

⏺ Based on the system information, here are all available skills:

  ┌──────────────────┬───────────────────────────────────────────────────────┐
  │      Skill       │                      Description                      │
  ├──────────────────┼───────────────────────────────────────────────────────┤
  │ update-config    │ Configure Claude Code settings.json — hooks,          │
  │                  │ permissions, env vars                                 │
  ├──────────────────┼───────────────────────────────────────────────────────┤
  │ keybindings-help │ Customize keyboard shortcuts and keybindings          │
  ├──────────────────┼───────────────────────────────────────────────────────┤
  │ simplify         │ Review changed code for reuse, quality, and           │
  │                  │ efficiency, then fix issues                           │
  ├──────────────────┼───────────────────────────────────────────────────────┤
  │ loop             │ Run a prompt or slash command on a recurring interval │
  ├──────────────────┼───────────────────────────────────────────────────────┤
  │ claude-api       │ Help building apps with the Claude API or Anthropic   │
  │                  │ SDK                                                   │
  ├──────────────────┼───────────────────────────────────────────────────────┤
  │ my-git-commits   │ (no description beyond the name)                      │
  ├──────────────────┼───────────────────────────────────────────────────────┤
  │ fix-typos        │ (no description beyond the name)                      │
  ├──────────────────┼───────────────────────────────────────────────────────┤
  │ cleanup-fma-ns   │ (no description beyond the name)                      │
  ├──────────────────┼───────────────────────────────────────────────────────┤
  │ bump-gha         │ (no description beyond the name)                      │
  └──────────────────┴───────────────────────────────────────────────────────┘

  The last four (my-git-commits, fix-typos, cleanup-fma-ns, bump-gha) have no
  detailed descriptions — just their names. Would you like me to invoke
  my-git-commits to see what it does?

But in fact ~/.claude/skills/my-git-commits/SKILL.md starts out as follows.

name: my-git-commits
description: Things to do when making a Git commit
trigger: When the user asks to commit changes, create a commit, make a git commit, amend a commit, revise a commit, reword a commit message, or any other action that results in running a `git commit` command
---
wujekbogdan · 5 months ago

Hm, I think we're suffering from different issues. In my case, the agent properly recognizes the skill and its description - it just doesn't call it.

list all skills you have access to

⏺ Here are the available skills:

  ┌──────────────────┬────────────────────────────────────────────────────┐
  │      Skill       │                      Trigger                       │
  ├──────────────────┼────────────────────────────────────────────────────┤
  │ git              │ Any git operation (commits, branches, diffs)       │

The git skill is there and it has a proper description.

MikeSpreitzer · 5 months ago

I can re-open #35053 if that is preferred.

yurukusa · 5 months ago

A UserPromptSubmit hook can force-trigger skills by detecting matching patterns in the user's prompt:

PROMPT=$(cat | jq -r '.userPrompt // empty' 2>/dev/null)
[ -z "$PROMPT" ] && exit 0
CONTEXT=""
if echo "$PROMPT" | grep -qiE '(commit|push|merge|rebase|branch|cherry.pick|git)'; then
    CONTEXT+="Before proceeding, invoke the git-workflow skill for this task. "
fi
if echo "$PROMPT" | grep -qiE '(test|spec|jest|pytest|coverage)'; then
    CONTEXT+="Before proceeding, invoke the testing skill for this task. "
fi
if echo "$PROMPT" | grep -qiE '(jira|ticket|issue|sprint|story)'; then
    CONTEXT+="Before proceeding, invoke the jira skill for this task. "
fi
if echo "$PROMPT" | grep -qiE '(playwright|browser|e2e|selenium|cypress)'; then
    CONTEXT+="Before proceeding, invoke the playwright skill for this task. "
fi
[ -z "$CONTEXT" ] && exit 0
jq -n --arg ctx "$CONTEXT" '{
  "hookSpecificOutput": {
    "hookEventName": "UserPromptSubmit",
    "additionalContext": $ctx
  }
}'
exit 0

Add to ~/.claude/settings.json:

{
  "hooks": {
    "UserPromptSubmit": [{
      "matcher": "",
      "hooks": [{ "type": "command", "command": "bash ~/.claude/hooks/skill-auto-trigger.sh" }]
    }]
  }
}

This converts the soft "auto-trigger" behavior into a hard programmatic nudge — the hook detects the pattern and injects a direct instruction to invoke the skill, which is far more reliable than relying on the model to spontaneously decide to use it.
You can also add logging to track which skills get triggered:

echo "$(date -u +%Y-%m-%dT%H:%M:%SZ) triggered: $CONTEXT" >> ~/.claude/skill-trigger.log
github-actions[bot] · 4 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] · 3 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.