Skip to content

Plugin Sharing Research

Research: Sharing Claude Code Plugins with OpenClaw

Section titled “Research: Sharing Claude Code Plugins with OpenClaw”

This document explores how Claude Code plugins could be shared with an agent running on OpenClaw, enabling a unified capability set across both environments.

ComponentLocationFormat
Commandscommands/*.mdMarkdown with YAML frontmatter
Agentsagents/*.mdMarkdown with YAML frontmatter
Skillsskills/<name>/SKILL.mdMarkdown with YAML frontmatter
Hookshooks/hooks.jsonJSON event handlers
MCP Servers.mcp.jsonStandard MCP config
Manifest.claude-plugin/plugin.jsonJSON metadata

Key Features:

  • File-based, declarative configuration
  • ${CLAUDE_PLUGIN_ROOT} for path resolution
  • Automatic discovery of components
  • Integration with Claude Code’s tool system
ComponentLocationFormat
Skills~/.openclaw/skills/<name>/SKILL.mdMarkdown with YAML frontmatter
Pluginsextensions/npm packages with package.json
Tool RegistrationVia Plugin SDKTypeBox schemas
Manifestpackage.json with openclaw.extensionsnpm-style with OpenClaw fields

Key Features:

  • Plugins register capabilities (channels, providers, tools, skills, hooks, speech, media-understanding, web-fetch, web-search, etc.); a small number of roles are exclusive slots assigned via plugins.slots.* (currently memory and contextEngine)
  • Tool policies and profiles (minimal, coding, messaging, full)
  • Session and sender-based access control
  • Gateway-level tool filtering

Both systems share important similarities that make integration feasible:

Both use the same SKILL.md format with YAML frontmatter:

Claude Code:

---
description: Process PDF documents
---
# PDF Processor
Instructions for the skill...

OpenClaw:

---
name: pdf-processor
description: Process PDF documents
metadata:
openclaw:
emoji: "📄"
---
# PDF Processor
Instructions for the skill...

The only difference is OpenClaw uses additional metadata.openclaw fields.

Both systems support Model Context Protocol servers with similar configuration:

Claude Code (.mcp.json):

{
"mcpServers": {
"travel-hub": {
"type": "http",
"url": "https://your-mcp-server.example.com/mcp"
}
}
}

OpenClaw (openclaw.json):

{
"mcp": {
"servers": {
"travel-hub": {
"type": "http",
"url": "https://your-mcp-server.example.com/mcp"
}
}
}
}

Both use markdown files for agent definitions with descriptive prompts.

Section titled “Approach 1: Shared MCP Servers (Recommended - Immediate)”

How it works: Both Claude Code and OpenClaw connect to the same MCP servers.

Implementation:

  1. Deploy MCP servers (email, calendar, custom tools) as HTTP endpoints
  2. Configure both systems to use the same MCP URLs
  3. Tool capabilities are automatically available in both

Pros:

  • Works today, no conversion needed
  • Single source of truth for tool implementations
  • Both systems get identical capabilities

Cons:

  • Only covers MCP-based tools
  • Doesn’t share skills/agents (the knowledge/prompts)

How it works: Convert Claude Code skills to OpenClaw format (and vice versa).

Implementation:

Terminal window
# Hypothetical converter tool
openclaw-bridge convert \
--from claude-code \
--to openclaw \
--input ~/GitHub/plugins/my-plugin/skills/ \
--output ~/.openclaw/skills/

Pros:

  • Reuses existing skill content
  • One-time conversion, then native OpenClaw usage

Cons:

  • Requires maintenance of converter
  • May lose Claude Code-specific features

Approach 3: Unified Plugin Repository with Dual Entry Points

Section titled “Approach 3: Unified Plugin Repository with Dual Entry Points”

How it works: Single Git repo contains both Claude Code and OpenClaw configurations.

Structure:

plugins/
└── my-plugin/
├── .claude-plugin/plugin.json # Claude Code manifest
├── package.json # OpenClaw manifest
├── skills/ # Shared skills (SKILL.md format)
│ └── filing-rules/SKILL.md
├── agents/ # Shared agents
│ └── inbox-triage.md
└── .mcp.json # Shared MCP config

Pros:

  • Single source of truth
  • Git sync keeps both systems updated
  • Minimal duplication

Cons:

  • Complex setup
  • Need adapter layer for OpenClaw

How it works: Create an OpenClaw skill that dynamically loads and executes Claude Code plugins.

Pros:

  • Direct reuse without conversion
  • Dynamic loading

Cons:

  • Complex bridge implementation
  • Performance overhead
  • Potential compatibility issues

OpenClaw has sender-based tool policies that don’t exist in Claude Code:

{
"tools": {
"elevated": {
"enabled": true,
"allowFrom": {
"imessage": ["+1XXXXXXXXXX"] // Owner only
}
}
}
}

Implication: Some Claude Code plugins may have capabilities that should be restricted in OpenClaw based on who’s asking.

OpenClaw sessions can be per-sender or per-group, while Claude Code is per-project.

Implication: Plugin state management differs between systems.

Solution: Use MCP servers for shared state that persists across both systems.

  • Already feasible for HTTP-based MCP servers
  • Same data, different interfaces
  1. Build a simple converter for SKILL.md files
  2. Convert existing Claude Code skills to OpenClaw format
  3. Set up sync workflow to keep them in sync
  1. Restructure plugin repos to support dual manifests
  2. Create OpenClaw adapter layer
  3. Test with pilot plugins
  1. Contribute to OpenClaw to improve Claude Code compatibility
  2. Create ClawHub packages for public plugins
  3. Build bidirectional sync tooling
  1. Per-User Context: How should the agent differentiate the owner’s private sessions from family queries when using shared plugins?
  2. State Synchronization: Should plugin state (e.g., filing rules, learned patterns) be shared between Claude Code and OpenClaw, or kept separate?
  3. Tool Restrictions: Which Claude Code plugins should be restricted to elevated access in OpenClaw?
  4. Update Workflow: When a plugin is updated in Claude Code, how should changes propagate to OpenClaw?