[BUG] Plugin agents and skills not discovered - only MCP servers load from plugins
Plugin agents and skills don't load, only MCP servers
Description
Plugins installed via ~/.claude/plugins/ correctly load MCP servers from .mcp.json, but agents from agents/ and skills from skills/ are not discovered or loaded.
Environment
- Claude Code version: 2.1.4
- Platform: macOS (Darwin 25.1.0)
- Plugin location:
~/.claude/plugins/atypicaltech-toolkit/
Plugin Structure
atypicaltech-toolkit/
├── .claude-plugin/
│ └── plugin.json
├── .mcp.json # ✅ MCP servers load correctly
├── agents/ # ❌ Not discovered
│ ├── software-engineer.md
│ └── ... (14 agents)
└── skills/ # ❌ Not discovered
├── dev-workflows/
└── ... (6 skills)
Expected Behavior
"Plugin subagents come from plugins you've installed. They appear in /agents alongside your custom subagents."
Expected:
/agentscommand lists plugin agents- Plugin skills are invocable
Actual Behavior
/agentsshows "No agents found" (empty list)- Plugin skills are not recognized
- MCP servers from
.mcp.jsondo work correctly
Steps to Reproduce
- Create a plugin with agents and MCP servers:
``bash``
mkdir -p ~/test-plugin/.claude-plugin ~/test-plugin/agents
echo '{"name":"test","version":"1.0.0"}' > ~/test-plugin/.claude-plugin/plugin.json
echo '{"mcpServers":{"time":{"command":"docker","args":["run","-i","--rm","mcp/time"]}}}' > ~/test-plugin/.mcp.json
cat > ~/test-plugin/agents/test-agent.md << 'EOF'
---
name: test-agent
description: Test agent for debugging
model: sonnet
---
You are a test agent.
EOF
- Install the plugin:
``bash``
ln -s ~/test-plugin ~/.claude/plugins/test-plugin
- Restart Claude Code
- Verify MCP servers work:
- Call
mcp__time__get_current_time→ works ✅
- Check agents:
- Run
/agents→ empty list ❌
Workaround
Symlink plugin directories to user-level locations:
# Agents
ln -s ~/.claude/plugins/test-plugin/agents ~/.claude/agents
# Skills (individual)
ln -s ~/.claude/plugins/test-plugin/skills/my-skill ~/.claude/skills/my-skill
This works, confirming the agent/skill format is correct - the plugin discovery is the issue.
Additional Context
- Tried adding
"agents": "./agents/"to plugin.json - no effect - Plugin appears in
~/.claude/plugins/installed_plugins.json - Agent markdown files follow exact format from official plugin examples
- Related issues: #4728, #4706, #8558 (similar symptoms but marked closed/fixed)
Impact
This makes plugin distribution difficult. Users expect a simple install, but must manually symlink each component. The docs suggest plugins should "just work" for agents.
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗