Slash command does not expand skill/command file content (@ references) into assistant context
Bug Description
When a custom skill (/create-pr) is invoked via the CLI slash command, the skill content (SKILL.md and its @ references) is not expanded into the assistant's context. The assistant only receives <command-name> and <command-message> tags with the raw command name, not the expanded skill content.
Skill Definition
The skill is defined at .claude/skills/create-pr/SKILL.md with the following frontmatter:
---
name: create-pr
description: GitHub PRを自動作成するワークフロー。レビュアー設定、Assignee設定、Projects v2ステータス更新、Slackメッセージ生成を含む。
context: fork
allowed-tools:
- Read
- Bash
- MCPSearch
visibility: public
---
The SKILL.md body references a detailed workflow file via @docs/agent-skills/create-pr.md.
The CLI correctly recognizes this skill and shows it in the autocomplete suggestions as /create-pr.
Expected Behavior
When /create-pr is invoked:
- The SKILL.md content should be expanded into the assistant's context
- The
@docs/agent-skills/create-pr.mdreference within SKILL.md should also be expanded - The assistant should receive the full workflow instructions and follow them
Actual Behavior
<command-message>only contains"create-pr"(the raw command name)- The SKILL.md content is NOT expanded into the assistant's context
- The
@reference to the detailed workflow file is NOT resolved - The assistant has no visibility into the skill definition and falls back to default behavior (in this case, generic PR creation instead of the custom workflow)
Reproduction
- Create
.claude/skills/create-pr/SKILL.mdwith@reference to a detailed workflow file - Verify the skill appears in CLI autocomplete suggestions (it does)
- Invoke
/create-prin Claude Code - Observe that the assistant does not receive the expanded skill content
Environment
- Claude Code v2.1.51
- Model: Opus 4.6
Impact
Custom skills defined via .claude/skills/ are effectively non-functional since the assistant cannot see the workflow instructions when the skill is invoked via slash command. The skill is recognized by the CLI (appears in suggestions) but its content is not delivered to the assistant.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗