/context display ignores 'name' frontmatter for commands shown in Skills section
Description
The /context command displays the name frontmatter field for skill files (.claude/skills/**/SKILL.md) but ignores it for command files (.claude/commands/*.md) that appear in the Skills section via disable-model-invocation: false.
Steps to Reproduce
- Create a skill file with a
namefield in frontmatter:
``yaml``
# .claude/skills/my-skill/SKILL.md
---
name: "Skill: My Skill (my-skill)"
description: Does something
---
- Create a command file with
disable-model-invocation: falseand anamefield:
``yaml``
# .claude/commands/my-command.md
---
name: "Command: My Command (my-command)"
description: Does something else
disable-model-invocation: false
---
- Run
/context
Expected Behavior
Both items should display using their name frontmatter field:
Skills · /skills
Project
└ Skill: My Skill (my-skill): XX tokens
└ Command: My Command (my-command): XX tokens
Actual Behavior
The skill displays its name field, but the command only displays the bare filename/slug:
Skills · /skills
Project
└ Skill: My Skill (my-skill): XX tokens
└ my-command: XX tokens
Context
Commands with disable-model-invocation: false appear in the Skills section of /context output. While skills correctly render their name frontmatter field, commands in the same section fall back to displaying just the slug identifier. This makes the display inconsistent when both types coexist in the Skills section.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗