Slash command does not expand skill/command file content (@ references) into assistant context

Resolved 💬 2 comments Opened Feb 24, 2026 by manabu0926 Closed Mar 24, 2026

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:

  1. The SKILL.md content should be expanded into the assistant's context
  2. The @docs/agent-skills/create-pr.md reference within SKILL.md should also be expanded
  3. 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

  1. Create .claude/skills/create-pr/SKILL.md with @ reference to a detailed workflow file
  2. Verify the skill appears in CLI autocomplete suggestions (it does)
  3. Invoke /create-pr in Claude Code
  4. 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.

View original on GitHub ↗

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