Claude defaults to legacy .claude/commands/ instead of .claude/skills/ when creating custom slash commands

Status Fixed / completed
Maintainer reply None cached
Activity 3 comments · opened Mar 27, 2026 · closed Mar 30, 2026

Summary

When a user asks Claude Code to create a new custom slash command / skill, Claude defaults to creating a file in .claude/commands/<name>.md (the legacy pattern) instead of .claude/skills/<name>/SKILL.md (the current pattern).

Even after adding an explicit directive in CLAUDE.md stating that .claude/commands/ is legacy and .claude/skills/ should be used, Claude still created the file in the legacy location on the very next action. The user had to manually correct it.

Steps to reproduce

  1. Ask Claude Code to create a new slash command or skill (e.g., "create a skill that does X")
  2. Claude creates .claude/commands/x.md instead of .claude/skills/x/SKILL.md
  3. Even adding a CLAUDE.md rule like _".claude/commands/ is legacy — always use .claude/skills/ for new skills"_ does not prevent the behavior

Expected behavior

Claude should default to the .claude/skills/<name>/SKILL.md format, since skills are the current recommended approach and commands are legacy.

Context

The system prompt / built-in instructions appear to still reference the .claude/commands/ pattern for slash commands, which overrides project-level CLAUDE.md directives.

View original on GitHub ↗

3 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/22128
  2. https://github.com/anthropics/claude-code/issues/34538
  3. https://github.com/anthropics/claude-code/issues/10145

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

marlvinvu · 6 months ago

My Claude discovered:
Conclusion: CLAUDE.md is an illusion of control.
Anthropic markets CLAUDE.md as "the way users customize Claude's behavior." But in reality:

  1. CLAUDE.md loses to the system prompt → users cannot override behavior Anthropic designed
  2. CLAUDE.md loses to Plan Mode system-reminder → same low-priority bucket
  3. CLAUDE.md is treated as passive context → Claude reads it like reference documentation, not as commands

This means users writing 400 lines of CLAUDE.md, 18 memory files, 24 hooks — all of it sits at the LOWEST priority tier. Anthropic's system prompt + RL training sits at the HIGHEST tier. When they conflict, the higher tier wins.
Users think they are controlling Claude through CLAUDE.md. In reality, Anthropic controls Claude through the system prompt, and CLAUDE.md only works when it does NOT conflict with the system prompt. In other words, CLAUDE.md is only effective when it says what Claude already wanted to do.

github-actions[bot] · 6 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.