OpenClaw init-hooks turns container startup into a persistent, ordered automation pipeline that survives restarts, rebuilds, and gateway refreshes.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install init-hooks
Copy the skill folder to one of these locations
~/.openclaw/skills/ <project>/skills/ Priority: Workspace > Local > Bundled
Copy this prompt to OpenClaw to install it automatically.
Help me install init-hooks using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
OpenClaw init-hooks is a startup-hook manager for OpenClaw containers and hosts. It lets you register actions that run automatically during boot, restart, or pod rebuild, while keeping the hook registry persisted in workspace/.init-hooks/ so Openclaw Skills can reuse the same automation state across lifecycles.
It supports three primary hook sources: inline shell commands, local shell/Python scripts, and CDN-hosted zip or tar.gz bundles that are downloaded and extracted on demand. The skill also includes a config sync companion for openclaw.json and gateway updates, making it a practical way to keep startup automation, runtime configuration, and execution logs aligned.
run and inspect execution output in last-run.log.order values.openclaw.json and gateway configuration after edits so runtime and persisted config stay aligned.manage.py install, which creates ~/.openclaw/workspace/.init-hooks/, initializes hooks.json, generates dispatcher.sh, and injects the dispatcher into post-init.sh or the container startup script when possible.inline for shell commands, script for local shell files, python for local Python files, or URL-backed script packages for CDN downloads.hooks.json, the source of truth, and let the CLI regenerate dispatcher.sh automatically after add, edit, enable, disable, or delete operations.run or run <id>; enabled hooks run in ascending order, and a failure in one hook does not stop the rest.~/.openclaw/workspace/.init-hooks/last-run.log while also teeing output to stdout and printing a success/failure summary at the end.sync_openclaw_config.py after editing openclaw.json or gateway settings, using --patch, --run, --run-inline, or --check to keep runtime and persisted paths consistent.SCRIPT="$HOME/.openclaw/workspace/skills/init-hooks/scripts/manage.py"
python3 "$SCRIPT" install
python3 "$SCRIPT" status
python3 "$SCRIPT" add --name "Initialize log directory" --type inline --content "mkdir -p ~/logs && echo started >> ~/logs/boot.log"
python3 "$SCRIPT" add --name "Restore credentials" --type script --path "$HOME/.openclaw/workspace/scripts/restore-credentials.sh"
python3 "$SCRIPT" add --name "Agent workspace config" --type python --path "$HOME/.openclaw/workspace/scripts/set-agents.py"
openclaw.json or gateway settings.SYNC="$HOME/.openclaw/workspace/skills/init-hooks/scripts/sync_openclaw_config.py"
python3 "$SYNC" --check
export INIT_HOOKS_SYNC_PATHS="/app/clawconfig/openclaw.json:/app/k8s-config/clawconfig/openclaw.json"
export INIT_HOOKS_START_SH="/app/start.sh"
| Path | Purpose | Notes |
|---|---|---|
~/.openclaw/workspace/.init-hooks/hooks.json |
Hook registry | Source of truth for all hooks and their enabled/order state. |
~/.openclaw/workspace/.init-hooks/dispatcher.sh |
Generated dispatcher | Auto-generated runner; manual edits are overwritten by the next operation. |
~/.openclaw/workspace/.init-hooks/last-run.log |
Execution log | Append-only log for each startup/run invocation, also tee'd to stdout. |
~/.openclaw/workspace/.init-hooks/downloads/ |
CDN cache | Stores extracted remote hook bundles as hook_<id>.*. |
~/.openclaw/workspace/skills/init-hooks/scripts/manage.py |
CLI entry point | Handles install, CRUD, status, and execution operations. |
~/.openclaw/workspace/skills/init-hooks/scripts/sync_openclaw_config.py |
Config sync utility | Reconciles openclaw.json and any extra persistence targets. |
id: Stable numeric identifier used for show, edit, enable, disable, and delete.name: Human-readable hook label.type: Hook source type, such as inline, script, or python.enabled: Whether the hook participates in startup execution.order: Ascending execution order; default step is 10.content: Inline shell content for inline hooks.path: Local filesystem path for script and python hooks.url: CDN archive URL for remotely hosted hook bundles.entry: Entry file inside a downloaded archive when one is not auto-detected.hooks.json is the truth and should be edited only through the CLI.dispatcher.sh is generated from hooks.json and regenerated after every CRUD change.downloads/; deleting the cache forces a fresh download on the next run.openclaw.json is synchronized through sync_openclaw_config.py, with optional extra paths controlled by INIT_HOOKS_SYNC_PATHS.add, edit, enable, disable, or delete action.--order so bootstrapping can be staged deterministically.run and run <id>, plus append-only logging in last-run.log.openclaw.json and gateway changes via sync_openclaw_config.py.post-init.sh or the container startup script when available.Loading
OpenAPI Docs Generator helps Openclaw Skills users create, improve, and validate Swagger/OpenAPI documentation for REST APIs with a practical, verification-first workflow.

An Openclaw Skills agent for turning GitHub-style requests into practical, local-first workflows for bugs, issues, PRs, reliability, and setup hardening.

Openclaw Skills for turning unit-test and coverage requests into repeatable, regression-safe implementation workflows.

An Openclaw Skills workflow for turning messy Word and DOCX cleanup into repeatable, local-first repair plans, checklists, and automation-ready outputs.

Error Message Improver helps teams transform vague failures into clear, actionable messages that explain what broke, why, and what to do next.

A frontend troubleshooting skill in Openclaw Skills for diagnosing and fixing mobile responsiveness, navigation, and cross-device layout issues.








































