# Plugin Project Structure ``` proj-root/ plugin/ # Installable plugin (copied to ~/.openclaw/plugins//) index.ts # Entry: export default { id, name, register } openclaw.plugin.json # Config schema declaration package.json # name, version, type: module hooks/ # Hook handlers (one file per hook) tools/ # Tool registrations core/ # Pure business logic (no plugin-sdk imports) web/ # HTTP routes (optional) services/ # Sidecar processes (optional, installed alongside plugin) skills/ # OpenClaw skills provided by this plugin (optional) routers/ # Drop-in modules (plugin-specific, e.g., PrismFacet routers) scripts/ install.mjs # --install / --uninstall / --update docs/ # Documentation ``` ## Conventions - File names: kebab-case (`before-model-resolve.ts`) - Export names: camelCase (`registerBeforeModelResolve`) - `plugin/core/` must not import from `openclaw/plugin-sdk` — keeps logic unit-testable - Hook registration logic goes in `plugin/hooks/`, not in `index.ts`