Custom skills in three-level nested directories not discovered

Resolved 💬 4 comments Opened Mar 26, 2026 by rayguo-gcg Closed Apr 25, 2026

Bug Report

Claude Code version: 2.1.84
OS: Ubuntu 22.04

Problem

Custom skills placed in three-level nested directories under .claude/skills/ are NOT discovered by Claude Code, while two-level nested skills work correctly.

Works (two-level):

.claude/skills/my-skill/SKILL.md  →  /my-skill works

Does NOT work (three-level):

.claude/skills/common/my-skill/SKILL.md  →  /my-skill "Unknown skill"

Minimal Reproduction

mkdir -p /tmp/test-repo && cd /tmp/test-repo && git init

# Two-level: works
mkdir -p .claude/skills/hello
cat > .claude/skills/hello/SKILL.md << 'SKILL'
---
name: hello
description: Test skill
---
# hello
Say hello.
SKILL

# Three-level: does NOT work
mkdir -p .claude/skills/common/goodbye
cat > .claude/skills/common/goodbye/SKILL.md << 'SKILL'
---
name: goodbye
description: Test skill in subdirectory
---
# goodbye
Say goodbye.
SKILL

# Start Claude Code
claude
# Type /hello → works ✅
# Type /goodbye → "Unknown skill" ❌

Expected Behavior

Skill discovery should recursively scan .claude/skills/ at any nesting depth, discovering any directory containing a valid SKILL.md with proper frontmatter.

Workaround

Creating symlinks at two-level depth pointing to three-level directories:

cd .claude/skills
ln -s common/goodbye goodbye
# Now /goodbye works ✅

Use Case

We maintain a skills registry with 49 skills organized into tiers for selective distribution to downstream projects:

.claude/skills/
├── common/          # 40 skills — pulled by all projects
├── L3/              # 1 skill  — pulled by L3 projects only
├── L4/              # 7 skills — pulled by L4 projects only
└── ops/             # 1 skill  — pulled on demand

This tier-based organization is essential for our multi-project architecture, but Claude Code's two-level-only discovery forces us to maintain 47 symlinks as a workaround.

Additional Context

  • SLASH_COMMAND_TOOL_CHAR_BUDGET is set to 100000 (not a budget issue)
  • All SKILL.md files have valid name: and description: frontmatter
  • All files are tracked in git (not gitignored)
  • /context shows Skills section as completely empty with three-level structure

View original on GitHub ↗

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