[BUG] Skills with prefix name relationships - shorter name not loaded

Resolved 💬 2 comments Opened Jan 15, 2026 by paulsmith Closed Feb 28, 2026

Preflight Checklist

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

What's Wrong?

Summary

When two skills exist where one skill's name is a prefix of another's name, the shorter-named skill is not loaded into the available skills list.

Evidence

This is affecting real skills:

  • using-jj (missing) and using-jj-workspaces (present)

Both skills have identical directory structure, valid frontmatter, and correct permissions. The only commonality is the prefix relationship.

What Should Happen?

Expected Behavior

Both test-prefix and test-prefix-extended appear in the available skills list.

Actual Behavior

Only test-prefix-extended appears. test-prefix is missing.

Error Messages/Logs

Steps to Reproduce

Reproduction Steps

  1. Create two skills with a prefix relationship:
~/.claude/skills/
├── test-prefix/SKILL.md
└── test-prefix-extended/SKILL.md
  1. test-prefix/SKILL.md:
---
name: test-prefix
description: Test skill for reproducing prefix bug - the shorter name
---

# Test Prefix Skill
This is the shorter-named skill.
  1. test-prefix-extended/SKILL.md:
---
name: test-prefix-extended
description: Test skill for reproducing prefix bug - the longer name
---

# Test Prefix Extended Skill
This is the longer-named skill.
  1. Start a new Claude Code session
  2. Check available skills list

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.7 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

  • Invoking the missing skill directly with the Skill tool does work - the skill loads and executes correctly
  • The issue is specifically with the skill discovery/listing at session start
  • Workaround: rename skills to avoid prefix relationships (e.g., jj-basics instead of using-jj)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗