Warn when plugin folders are dropped into skills directories#3805
Draft
jpshackelford wants to merge 1 commit into
Draft
Warn when plugin folders are dropped into skills directories#3805jpshackelford wants to merge 1 commit into
jpshackelford wants to merge 1 commit into
Conversation
Skills directories (.agents/skills/, .openhands/skills/) do not auto-load plugins, so a folder containing only a .claude-plugin/plugin.json (or .plugin/plugin.json) manifest and no SKILL.md was silently ignored. This is confusing for users migrating from Claude Code, where such folders auto-load. Add a find_plugin_manifest() helper and warn_on_plugin_dirs() to the skills loader so these folders now produce one clear, actionable warning pointing at the explicit PluginSource load path. Behavior is otherwise unchanged: real skills load as before and plugins still load only when referenced explicitly. Also document the asymmetry in the Plugin docstring for Claude Code migrators. Closes #3804 Co-authored-by: openhands <openhands@all-hands.dev>
Contributor
Python API breakage checks — ✅ PASSEDResult: ✅ PASSED |
Contributor
REST API breakage checks (OpenAPI) — ✅ PASSEDResult: ✅ PASSED |
Contributor
Coverage Report •
|
|||||||||||||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #3804.
OpenHands adopted Claude Code's plugin format (
.claude-plugin/plugin.json,skills/ hooks/ agents/ commands/ .mcp.json) but does not auto-discover plugins placed in a skills directory. Today, dropping a plugin folder into.agents/skills/or.openhands/skills/:is silently ignored — the skills loader only matches
SKILL.md/*.md, so nothing loads and no warning is printed. This is a confusing papercut for users migrating from Claude Code, where the same folder auto-loads.What this changes (UX-first, low-risk)
Detect & warn instead of silently ignoring. When the skills loader finds a folder containing a plugin manifest (
.claude-plugin/plugin.jsonor.plugin/plugin.json) but noSKILL.md, it now logs one clear, actionable line:No other behavior changes: real skills load exactly as before, and plugins still load only when referenced explicitly via
plugins=[PluginSource(...)]/load_installed_plugins(). This intentionally preserves the SDK's security posture (plugins bundle hooks/MCP/code-running components that are gated behind explicit loading).Changes
skills/utils.py: addfind_plugin_manifest()andwarn_on_plugin_dirs()helpers. Manifest-dir constants are defined locally (with a comment) to avoid a circular import withplugin.plugin.skills/skill.py: callwarn_on_plugin_dirs()fromload_skills_from_dir().plugin/plugin.py: document the Claude Code asymmetry in thePlugindocstring.tests/sdk/skills/test_skill_utils.py: cover manifest detection (both layouts), the warning, the skip-when-also-a-skill case, plain folders, and end-to-end loading.Testing
pytest tests/sdk/skills/ tests/sdk/plugin/→ 354 passedruff check/ruff format --check→ cleanpyrighton changed files → 0 errorsFollow-up (out of scope)
True opt-in auto-discovery of plugins from skills directories was deliberately deferred — it's a larger behavioral change with security implications worth a separate discussion.
This PR was created by an AI agent (OpenHands) on behalf of @jpshackelford.
@jpshackelford can click here to continue refining the PR
Agent Server images for this PR
• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server
Variants & Base Images
eclipse-temurin:17-jdknikolaik/python-nodejs:python3.13-nodejs22-slimgolang:1.21-bookwormPull (multi-arch manifest)
# Each variant is a multi-arch manifest supporting both amd64 and arm64 docker pull ghcr.io/openhands/agent-server:2bec351-pythonRun
All tags pushed for this build
About Multi-Architecture Support
2bec351-python) is a multi-arch manifest supporting both amd64 and arm642bec351-python-amd64) are also available if needed