Problem
The pr-review plugin's agent_script.py loads skills manually via load_project_skills() and passes them directly to AgentContext:
project_skills = load_project_skills(cwd)
agent_context = AgentContext(load_public_skills=True, skills=project_skills)
agent = Agent(llm=llm, tools=tools, agent_context=agent_context, ...)
conversation = Conversation(agent=agent, workspace=cwd, secrets=secrets)
This bypasses the SDK's Plugin system, which provides a proper way to load bundled skills, hooks, and MCP config together via Plugin.load():
from openhands.sdk.plugin import Plugin
plugin = Plugin.load('/path/to/plugin')
agent_context = AgentContext(skills=plugin.skills)
agent = Agent(llm=llm, tools=tools, mcp_config=plugin.mcp_config or {}, agent_context=agent_context)
conversation = Conversation(agent=agent, hook_config=plugin.hooks)
Impact
- The
pr-review plugin's skills/ directory (which contains symlinks to codereview-roasted and github-pr-review) is never loaded via the Plugin system.
- Any hooks or MCP config added to the plugin in the future would be silently ignored.
- The plugin directory also lacks a
.plugin/plugin.json manifest, which is required by Plugin.load().
Suggested Fix
- Add
.plugin/plugin.json manifest to plugins/pr-review/
- Update
agent_script.py to use Plugin.load() for the pr-review plugin itself
- Combine plugin skills with project skills before passing to
AgentContext
- Pass
plugin.hooks and plugin.mcp_config to Conversation and Agent respectively
The new qa-changes plugin (#135) already follows this pattern and can be used as a reference.
This issue was created by an AI assistant (OpenHands).
Problem
The
pr-reviewplugin'sagent_script.pyloads skills manually viaload_project_skills()and passes them directly toAgentContext:This bypasses the SDK's Plugin system, which provides a proper way to load bundled skills, hooks, and MCP config together via
Plugin.load():Impact
pr-reviewplugin'sskills/directory (which contains symlinks tocodereview-roastedandgithub-pr-review) is never loaded via the Plugin system..plugin/plugin.jsonmanifest, which is required byPlugin.load().Suggested Fix
.plugin/plugin.jsonmanifest toplugins/pr-review/agent_script.pyto usePlugin.load()for the pr-review plugin itselfAgentContextplugin.hooksandplugin.mcp_configtoConversationandAgentrespectivelyThe new
qa-changesplugin (#135) already follows this pattern and can be used as a reference.This issue was created by an AI assistant (OpenHands).