--- name: openclaw-plugin-dev description: OpenClaw plugin development — structure, conventions, hooks, tools, install scripts, and debugging. Use when creating, modifying, or debugging OpenClaw plugins. --- > Reference docs provide the full specification. Workflows guide specific tasks. ## Reference - `{baseDir}/docs/structure.md` — Project layout, directory conventions, file naming - `{baseDir}/docs/entry-point.md` — Plugin entry format, globalThis patterns, lifecycle protection - `{baseDir}/docs/hooks.md` — Hook registration, dedup patterns, available hooks - `{baseDir}/docs/tools.md` — Tool registration interface (inputSchema + execute) - `{baseDir}/docs/state.md` — State management rules (globalThis vs module-level) - `{baseDir}/docs/config.md` — Config schema, install scripts, sensitive fields - `{baseDir}/docs/debugging.md` — Dev loop, log keywords, smoke testing ## Workflows - `{baseDir}/workflows/create-plugin.md` — When creating a new OpenClaw plugin from scratch. - `{baseDir}/workflows/add-hook.md` — When adding a new hook handler to an existing plugin.