Files
ClawSkills/development/docs/structure.md
zhi 238574ffd2 feat: add development and hf-hangman-lab skills
development: absorbed openclaw-plugin-dev as a workflow, with
reference docs for plugin structure, hooks, tools, state, config.

hf-hangman-lab: hf-wakeup workflow — full agent wakeup lifecycle:
set busy → check due slots → select & defer → identify task →
plan work → create work channel → execute. All branches end with
status reset to idle.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 13:31:27 +00:00

1.2 KiB

Plugin Project Structure

proj-root/
  plugin/                    # Installable plugin (copied to ~/.openclaw/plugins/<id>/)
    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