Skip to content

Show custom slash commands from .claude/commands/*.md in the slash menu#205

Open
leonidasbarkas98-cpu wants to merge 2 commits into
andrepimenta:mainfrom
leonidasbarkas98-cpu:feat/custom-slash-commands
Open

Show custom slash commands from .claude/commands/*.md in the slash menu#205
leonidasbarkas98-cpu wants to merge 2 commits into
andrepimenta:mainfrom
leonidasbarkas98-cpu:feat/custom-slash-commands

Conversation

@leonidasbarkas98-cpu

Copy link
Copy Markdown

The "/" popup was a static list. This scans workspace and home .claude/commands/ (top level, missing dirs tolerated), parses the frontmatter description:, dedupes with workspace precedence, and shows a "Project & User Commands" section. Clicking inserts /name into the input.

Fixes #135
Also covers the custom-commands part of #70.

🤖 Generated with Claude Code

Jonas Kunert and others added 2 commits July 22, 2026 07:17
Scan workspace and global .claude/commands/ directories when the slash
commands modal opens and render matches as a dynamic section, using
frontmatter description if present; clicking inserts "/name " into the
input without sending. Workspace commands take precedence over global
ones on name collisions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…pimenta#11)

Set the command name via dataset assignment instead of interpolating it
into an HTML attribute string, since escapeHtml does not escape double
quotes and a crafted filename could break out of data-command and inject
handlers. Also decode command file contents fully before truncating the
frontmatter preview, avoiding a corrupted trailing multi-byte character.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

handle custom Claude Code slash commands defined as .md files in the .claude folder

1 participant