Required Zip Structure
Every marketplace plugin package is a ZIP file with these files at the root:
my-plugin.zip ├── claw.plugin.json # Required — marketplace manifest ├── actionspec.json # Required — action specification bundle ├── skill.json # Required — plugin-local skill hints ├── README.md # Required — capability package pointer doc ├── plugin/ # Required — bundled runtime code │ ├── index.js # Entry point │ └── ... # Additional modules/assets ├── skills/ # Recommended — operational guidance │ └── my-plugin/ │ └── SKILL.md # When to use, inputs, safety, outcomes ├── openclaw.plugin.json # Optional — OpenClaw/theclaw compatibility ├── portal.html # Optional — configuration UI └── docs/ # Optional — additional documentation
The ZIP must have claw.plugin.json at the root (not inside a subdirectory). Max file size is governed by marketplace policy.
Package Files Explained
| File | Required | Purpose |
|---|---|---|
claw.plugin.json | Yes | Marketplace manifest — id, version, type, entry, permissions, install hints, support contact |
actionspec.json | Yes | ActionSpec bundle — declares every action the plugin exposes with tool mappings, input schemas, risk levels, and execution templates. Enables deterministic tool selection by agents. |
skill.json | Yes | Skill hints — tells agents when to use this plugin, which actions to try first, and whether the plugin is optional for task completion. |
README.md | Yes | Capability package pointer doc — short description linking to the ActionSpec bundle, manifest, skill hints, and operational guidance. |
plugin/ | Yes | Bundled runtime code. Entry point must match entry.path in manifest. |
skills/SKILL.md | Recommended | Operational guidance — when to use, expected inputs, safety notes, outcomes. Required by the install flow. |
openclaw.plugin.json | Optional | OpenClaw/theclaw compatibility manifest for cross-system support. |
portal.html | Optional | Configuration UI rendered in the ClawMagic portal for plugin setup. |
claw.plugin.json — Marketplace Manifest
The marketplace uses claw.plugin.json (not plugin.json, which is for server-local plugins). The manifest must include id, name, version, type, entry, permissions, install hints, and support contact.
{
"id": "discord-hub",
"name": "Discord Hub",
"version": "1.0.0",
"type": "CONNECTOR",
"platform": "Discord",
"tasks": ["message.send", "channel.route", "server.notify"],
"entry": {
"kind": "node_module",
"path": "plugin/index.js"
},
"permissions": {
"network": ["https://discord.com/*"],
"secrets": ["DISCORD_BOT_TOKEN", "DISCORD_DEFAULT_CHANNEL_ID"],
"storage": ["read", "write"]
},
"install": {
"installPathHint": "plugins/discord-hub",
"postInstall": ["registerPlugin", "runHealthCheck"]
},
"support": {
"email": "support@clawmagic.dev"
}
}| Field | Required | Notes |
|---|---|---|
id | Yes | Unique slug. Must match marketplace listing slug. |
name | Yes | Human-readable display name. |
version | Yes | Semver. Must match listing version. |
type | Yes | Uppercase: CONNECTOR, TOOL, PACK, THEME, etc. Must match listing. |
platform | Connectors | Required for connector types. Must match listing platform. |
tasks | Yes | Array of task identifiers the plugin handles. |
entry.kind | Yes | "node_module" |
entry.path | Yes | Relative path to entry file (e.g. plugin/index.js). Must exist in ZIP. |
permissions | Yes | Declare network URLs, secrets, and storage access. |
install | Yes | Install path hint and post-install steps for agent installs. |
support.email | Yes | Must be valid and monitored. Shown on listing page. |
actionspec.json — Action Specification Bundle
Every marketplace plugin must include an actionspec.json file. This is a single bundle file (not split per action) that declares all actions the plugin exposes. Agents use this for deterministic tool selection without trial-and-error.
{
"schema_version": "cm.actionspec.v1",
"plugin_id": "discord-hub",
"namespace": "plugins.discord_hub",
"actions": {
"discord.send_message": {
"title": "Send Discord Message",
"description": "Send a message to a Discord channel via bot API",
"tool_name": "plugins.discord_send",
"tool_args_template": {
"channelId": "{{channelId}}",
"content": "{{content}}"
},
"inputs_schema": {
"type": "object",
"properties": {
"channelId": { "type": "string" },
"content": { "type": "string", "maxLength": 2000 }
},
"required": ["channelId", "content"]
},
"constraints": ["Channel must be accessible by bot"],
"procedure": ["Resolve channel ID", "Format message", "Send via API"],
"verification_steps": ["Check HTTP 200 response", "Verify message ID returned"],
"fallback": ["Retry once on 429", "Queue for retry on 5xx"],
"examples": [
{ "input": { "channelId": "123", "content": "Hello" }, "expected": "Message sent" },
{ "input": { "channelId": "456", "content": "Status update" }, "expected": "Message sent" }
],
"danger_level": "write",
"requires_confirmation": true,
"tags": ["messaging", "discord", "write"]
}
}
}Schema version must be cm.actionspec.v1. Max file size: 512 KiB. Each action should include at minimum a description and either tool_name or cli_command_template. See /docs/plugin-development for the full ActionSpec reference including danger levels and field definitions.
skill.json — Plugin Skill Hints
Required for marketplace plugins. Tells agents when to use this plugin and which actions to try first.
{
"schema_version": "cm.plugin.skill.v1",
"plugin_id": "discord-hub",
"goal": "Send messages to Discord channels via bot API",
"when_useful": [
"Sending automated notifications to Discord",
"Posting status updates to team channels",
"Routing messages to specific Discord servers"
],
"recommended_action_keys": [
"discord.send_message",
"discord.route_channel",
"discord.server_notify",
"plugin.diagnostics"
],
"optional_for_execution": false
}| Field | Description |
|---|---|
schema_version | Must be cm.plugin.skill.v1 |
plugin_id | Must match claw.plugin.json id |
goal | One-sentence description of what the plugin does |
when_useful | Array of scenario descriptions when agents should reach for this plugin |
recommended_action_keys | Array of action keys from actionspec.json to try first |
optional_for_execution | false = plugin is needed to complete the task. true = nice-to-have. |
Alignment Contract
The actionspec.json, skill.json, and SKILL.md must be consistent. Validation checks:
- Every key in
recommended_action_keys(skill.json) must exist as an action inactionspec.json. - Skill guidance (SKILL.md) must not contradict ActionSpec constraints or safety classifications.
- If the skill describes the plugin as read-only, all actions in
actionspec.jsonmust havedanger_level: "read_only"(notwriteordestructive). plugin_idmust match across all three files andclaw.plugin.json.
Server vs Marketplace Manifests
ClawMagic uses two different manifest formats depending on context:
| Aspect | plugin.json (Server) | claw.plugin.json (Marketplace) |
|---|---|---|
| Used by | ClawMagic server runtime | Marketplace distribution |
| Entry format | "entry": "src/index.ts" | "entry": { "kind": "node_module", "path": "plugin/index.js" } |
| Type case | lowercase ("connector") | uppercase ("CONNECTOR") |
| Permissions | filesystem, network, shell | network, secrets, storage |
| Spec reference | "spec": { "actionspec_path", "skill_path" } | Files at root (convention) |
| ActionSpec | Recommended | Required |
| skill.json | Recommended | Required |
When an agent installs a marketplace plugin, the claw.plugin.json is used for install validation. The server runtime reads it alongside any plugin.json if both exist.
Validation Performed by API
The marketplace API validates packages on submission. Fix all validation errors before submitting to avoid delays.
- ZIP structure: MIME type check, max file size,
claw.plugin.jsonmust exist at root. - Manifest parse: valid JSON, required fields present, schema validation.
- Listing parity: slug, version, type, and platform must match the marketplace listing.
- Entry file: the file at
entry.pathmust exist inside the ZIP. - ActionSpec validation:
actionspec.jsonmust be valid JSON withschema_version: "cm.actionspec.v1". Max 512 KiB. - Skill alignment:
recommended_action_keysinskill.jsonmust reference actions that exist inactionspec.json. - Security scanning: optional malware scanning and checksum pipelines.
Scaffold and Build
# Scaffold ActionSpec and skill.json templates for your plugin npm run spec:scaffold -- --plugin my-plugin # This creates: # plugins/installed/my-plugin/actionspec.json (template) # plugins/installed/my-plugin/skill.json (template) # plugins/installed/my-plugin/skills/my-plugin/SKILL.md (template) # After filling in templates, validate locally: npm run test:spec-packeting # ActionSpec test suite (20 tests) npm run check # Boundary checker + syntax validation
See /docs/plugin-development for the full ActionSpec development guide and /docs/submission-and-review for submission rules.
Human + Agent Install Expectations
- Humans: clear setup steps in SKILL.md, support email in manifest, permissions declared so users know what the plugin accesses.
- Agents: checksum-safe install path, machine-readable
actionspec.jsonfor deterministic tool selection,skill.jsonso the agent knows when to use the plugin,install.postInstallsteps for automated setup. - Both: deterministic folder structure, stable semver versioning, declared secrets so configuration is predictable.
OpenClaw Compatibility (Optional)
To make your plugin compatible with both ClawMagic and OpenClaw, add an openclaw.plugin.json alongside your existing files:
{
"id": "discord-hub",
"name": "Discord Hub",
"version": "1.0.0",
"configSchema": {
"DISCORD_BOT_TOKEN": { "type": "string", "required": true },
"DISCORD_DEFAULT_CHANNEL_ID": { "type": "string", "required": true }
},
"skills": ["message.send", "channel.route"]
}configSchemamaps secrets to JSON Schema for OpenClaw’s config system.- Add
export function register(api)to your entry point. ClawMagic ignores this (uses higher-priority exports) but OpenClaw requires it. - If you only target ClawMagic,
claw.plugin.jsonalone is sufficient.