claude-code - 💡(How to fix) Fix [BUG] Inline plugin skill content not delivered after /clear — "Successfully loaded skill" but no instructions [1 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#48071Fetched 2026-04-15 06:34:04
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Participants
Timeline (top)
labeled ×5

Error Message

Error Messages/Logs

No error messages. The failure is silent — "Successfully loaded skill" appears, then the agent proceeds with no instructions. Observable only by watching the agent's subsequent behavior (searching for files, not following skill steps).

Code Example

No error messages. The failure is silent — "Successfully loaded skill" appears, then the agent proceeds with no instructions. Observable only by watching the agent's subsequent behavior (searching for files, not following skill steps).

   /my-plugin:my-skill                                                                                          
   
Skill(my-plugin:my-skill)                                                                                    
Successfully loaded skill                            

Search(pattern: "/home/user/.claude/**/my-plugin/**/my-skill*")
Found 0 files
                                                                                                                 
Bash(find /home/user/.claude -type d -name "my-plugin*" 2>/dev/null)
/home/user/.claude/plugins/data/my-plugin-inline                                                          
                                                            
  The agent immediately starts searching for the skill file on disk — it wouldn't do this if the SKILL.md content had been delivered.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

When running Claude Code with --plugin-dir pointing to a local plugin, skills load and work correctly on the initial session. After running /clear, the same skill invocation prints "Successfully loaded skill" but delivers no SKILL.md content to the agent. The agent receives the skill name resolution but not the instructions, so it falls back to searching the filesystem for the SKILL.md manually.

The same symptom occurs in cron-spawned sessions (via CronCreate) — the cron job runs /my-skill:sub-skill but the spawned process doesn't inherit --plugin-dir, so the skill name resolves against a stub but content is empty.

What Should Happen?

After /clear, skills from --plugin-dir should continue to deliver their SKILL.md content to the agent, since the process was launched with that flag and it's still running. Cron-spawned sessions should inherit the parent session's plugin configuration.

Error Messages/Logs

No error messages. The failure is silent — "Successfully loaded skill" appears, then the agent proceeds with no instructions. Observable only by watching the agent's subsequent behavior (searching for files, not following skill steps).

  ❯ /my-plugin:my-skill                                                                                          
   
  ● Skill(my-plugin:my-skill)                                                                                    
    ⎿  Successfully loaded skill                            

  ● Search(pattern: "/home/user/.claude/**/my-plugin/**/my-skill*")
    ⎿  Found 0 files
                                                                                                                 
  ● Bash(find /home/user/.claude -type d -name "my-plugin*" 2>/dev/null)
    ⎿  /home/user/.claude/plugins/data/my-plugin-inline                                                          
                                                            
  The agent immediately starts searching for the skill file on disk — it wouldn't do this if the SKILL.md content had been delivered.

Steps to Reproduce

  1. Create a plugin with a skill (a directory with .claude-plugin/plugin.json and skills/<name>/SKILL.md)
  2. Launch: claude --plugin-dir /path/to/plugin
  3. Invoke the skill: /my-plugin:my-skill — confirm it works (agent follows SKILL.md instructions)
  4. Run /clear
  5. Invoke the same skill again: /my-plugin:my-skill
  6. Observe: "Successfully loaded skill" prints, but agent has no instructions and starts searching for the file

For the cron variant:

  1. In the working session (before /clear), use CronCreate with prompt /my-plugin:my-skill
  2. When the cron fires, the spawned session shows the same symptom

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.107

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

IntelliJ IDEA terminal

Additional Information

No response

extent analysis

TL;DR

The issue can be addressed by ensuring that the --plugin-dir configuration is persisted across sessions and inherited by cron-spawned processes.

Guidance

  • Verify that the --plugin-dir flag is being passed correctly to the cron-spawned sessions, potentially by modifying the CronCreate command to include this flag.
  • Investigate how the --plugin-dir configuration is stored and loaded in the Claude Code application, to ensure it is not lost after the /clear command.
  • Check if there are any environment variables or configuration files that can be used to persist the --plugin-dir setting across sessions.
  • Consider adding logging or debugging statements to the Claude Code application to understand how the skill loading process works and why the SKILL.md content is not being delivered after the /clear command.

Notes

The issue seems to be related to the persistence of the --plugin-dir configuration across sessions and its inheritance by cron-spawned processes. Without more information about the internal workings of the Claude Code application, it is difficult to provide a more specific solution.

Recommendation

Apply a workaround by modifying the CronCreate command to include the --plugin-dir flag, and investigate how to persist this configuration across sessions. This should help to ensure that the SKILL.md content is delivered correctly after the /clear command and in cron-spawned sessions.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING