claude-code - 💡(How to fix) Fix Skills created mid-session not available in slash-command autocomplete until session restart [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#45275Fetched 2026-04-09 08:09:10
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×5commented ×1

When a new skill is created at ~/.claude/skills/*/SKILL.md during an active Claude Code session (either in the CLI or via the Cursor/VS Code extension), the skill is registered in the Claude Code runtime's internal skill list but does not appear in the slash-command autocomplete dropdown until the session is restarted.

Root Cause

Close and reopen the Claude Code panel in Cursor. The skill appears on the next session start because the runtime re-scans ~/.claude/skills/ during initialization.

Fix Action

Workaround

Close and reopen the Claude Code panel in Cursor. The skill appears on the next session start because the runtime re-scans ~/.claude/skills/ during initialization.

RAW_BUFFERClick to expand / collapse

Description

When a new skill is created at ~/.claude/skills/*/SKILL.md during an active Claude Code session (either in the CLI or via the Cursor/VS Code extension), the skill is registered in the Claude Code runtime's internal skill list but does not appear in the slash-command autocomplete dropdown until the session is restarted.

Steps to reproduce

  1. Open a Claude Code session in Cursor
  2. Create a new skill: mkdir -p ~/.claude/skills/my-skill && echo "# my-skill\nDoes something." > ~/.claude/skills/my-skill/SKILL.md
  3. Type /my-skill in the chat input
  4. Expected: The skill appears in the autocomplete dropdown
  5. Actual: The skill does not appear. It only appears after closing and reopening the Claude Code panel.

Environment

  • Claude Code in Cursor (VS Code extension)
  • macOS
  • Skills located at ~/.claude/skills/

Expected behavior

Skills created during a session should be immediately available in the slash-command autocomplete without requiring a session restart. Either:

  1. The skill index should hot-reload when new SKILL.md files are detected (file watcher on the skills directory)
  2. A built-in command (e.g., /refresh) should force re-scanning of the skills directory
  3. The autocomplete index should re-scan on each keystroke or on a short polling interval

Impact

In workflows where skills are created programmatically (e.g., an AI assistant building a new skill as part of a task), the operator cannot immediately invoke the skill. This creates a workflow interruption where the operator must restart the session to use something that was just built.

Workaround

Close and reopen the Claude Code panel in Cursor. The skill appears on the next session start because the runtime re-scans ~/.claude/skills/ during initialization.

extent analysis

TL;DR

Implementing a file watcher or a refresh mechanism for the skills directory could resolve the issue of newly created skills not appearing in the autocomplete dropdown until the session is restarted.

Guidance

  • Investigate the possibility of adding a file watcher to the ~/.claude/skills/ directory to detect new SKILL.md files and trigger a hot-reload of the skill index.
  • Consider introducing a built-in command (e.g., /refresh) to manually force re-scanning of the skills directory when new skills are created.
  • Explore the option of re-scanning the skills directory on each keystroke or at a short polling interval to ensure the autocomplete index remains up-to-date.
  • Review the current implementation of the autocomplete feature to identify potential bottlenecks or areas for optimization.

Example

// Pseudo-code example of a file watcher
const watcher = require('chokidar');
const skillsDir = '~/.claude/skills/';

watcher.watch(skillsDir, {
  persistent: true
}).on('add', (path) => {
  if (path.endsWith('SKILL.md')) {
    // Trigger hot-reload of skill index
    reloadSkillIndex();
  }
});

Notes

The exact implementation details may vary depending on the underlying technology stack and framework used by Claude Code. Additionally, introducing a file watcher or refresh mechanism may have performance implications that need to be carefully evaluated.

Recommendation

Apply a workaround by introducing a built-in /refresh command to manually force re-scanning of the skills directory, as this seems to be a more straightforward and low-risk solution compared to implementing a file watcher or modifying the autocomplete index update mechanism.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Skills created during a session should be immediately available in the slash-command autocomplete without requiring a session restart. Either:

  1. The skill index should hot-reload when new SKILL.md files are detected (file watcher on the skills directory)
  2. A built-in command (e.g., /refresh) should force re-scanning of the skills directory
  3. The autocomplete index should re-scan on each keystroke or on a short polling interval

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING