openclaw - 💡(How to fix) Fix feat(clawhub): auto-install skill hooks during clawhub install

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

Background

Skills can ship hooks (e.g., self-improving-agent ships hooks/openclaw/ with a handler.js), but clawhub install currently only extracts files to ~/clawd/skills/<name>/. Users must manually copy hooks to ~/.openclaw/hooks/ and run openclaw hooks enable. This is:

  • Easy to miss — users often don't realize a skill ships hooks
  • Fragile — hooks may go out of sync on clawhub update
  • Poor UX — requires knowing internal paths and CLI subcommands

Proposed Behavior

When clawhub install <skill> (or clawhub update) encounters a skill archive with a hooks/ directory at root, it should:

Auto-install

  1. Detect hooks/ subdirectories in the extracted skill root
  2. Install each hook directory to ~/.openclaw/hooks/<hook-name>/
  3. Run openclaw hooks enable <hook-name> automatically
  4. Report which hooks were installed (visible in CLI output)

On update

  • Overwrite existing hook files
  • Re-enable if the hook was already enabled (or leave enabled)

On uninstall (future)

  • clawhub uninstall should optionally remove associated hooks
  • Prompt user before removal, since hooks may be shared by multiple skills

Open Questions / Design Decisions

  1. Hook naming convention — if a skill ships hooks/openclaw/, should the hook name be openclaw (directory name) or <skill-slug>-openclaw (namespaced)?
  2. Conflict resolution — what if the target hook name already exists (installed by another skill or manually)?
  3. Security prompt — should installing hooks prompt for confirmation, given hooks have filesystem access?
  4. Rollback — does uninstalling a skill auto-remove its hooks, or leave them with a warning?

Implementation Hints

  • The hook install logic could reuse existing installPackageDir infrastructure
  • Hook detection could be integrated into installExtractedSkillRoot in skills-archive-install.ts
  • openclaw hooks enable is a CLI operation — may need to call it via child process or extract the underlying logic as an API

See Also

  • Related: hooks/openclaw/ convention in skills like self-improving-agent
  • Current source: src/agents/skills-archive-install.ts (no hook handling)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix feat(clawhub): auto-install skill hooks during clawhub install