openclaw - 💡(How to fix) Fix Feature Request: skill:install Hook for Pre-Install Security Vetting [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

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…
GitHub stats
openclaw/openclaw#61557Fetched 2026-04-08 02:57:21
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

Error Message

  • Warn: Add warning message to messages[] to alert user

Fix Action

Fix / Workaround

Workaround (Current)

Code Example

{
  type: "skill",
  action: "install:before",
  skillName: string,       // e.g., "ontology"
  skillPath: string,       // local path or registry slug
  installMethod: string,   // "clawhub" | "npm" | "manual"
  sessionKey: string,
  timestamp: Date,
  messages: string[],     // push warning/block message here
}
RAW_BUFFERClick to expand / collapse

Problem

Currently, OpenClaw does not support a Hook event that fires before a Skill is installed. The Hook system provides events like command:new, session:*, agent:*, message:*, and before_tool_call (plugin), but there is no way to intercept and vet a Skill before it gets installed.

Use Case

Users want to automatically run security scans (skill-vetter) before any Skill is installed, to prevent malicious or poorly-written Skills from executing dangerous commands like rm -rf /, dd, fork bombs, curl|sh, etc.

Proposed Solution

Add a new Hook event: skill:install:before that fires when:

  1. A skill installation is requested via ClawHub (clawhub install)
  2. A skill is installed via npm (npm i -g <skill>)
  3. Any programmatic skill installation

The Hook should receive:

{
  type: "skill",
  action: "install:before",
  skillName: string,       // e.g., "ontology"
  skillPath: string,       // local path or registry slug
  installMethod: string,   // "clawhub" | "npm" | "manual"
  sessionKey: string,
  timestamp: Date,
  messages: string[],     // push warning/block message here
}

The Hook can:

  • Block: Set block: true to prevent installation
  • Warn: Add warning message to messages[] to alert user
  • Mutate: Modify skillPath to point to a local copy for vetting first

Workaround (Current)

Currently using a message:received hook to detect install commands and manually invoke skill-vetter, but this cannot actually block the installation - only warns after the fact.

References

  • OpenClaw Hooks documentation: docs/automation/hooks.md
  • Existing skill-vetter implementation: ~/.openclaw/skills/skill-vetter
  • Related: Claude Code's PreToolUse Hook pattern

Feature Req: skill:install Hook (priority: high for enterprise/team deployments)

extent analysis

TL;DR

Implement a new Hook event skill:install:before to intercept and vet Skills before installation, allowing for blocking, warning, or mutating the installation process.

Guidance

  • Review the proposed solution for the skill:install:before Hook event to understand its functionality and potential implementation.
  • Investigate the current workaround using the message:received hook and its limitations in blocking installations.
  • Examine the OpenClaw Hooks documentation and existing skill-vetter implementation to determine the best approach for integrating the new Hook event.
  • Consider the requirements for the Hook event, including the data it should receive and the actions it should be able to perform (block, warn, mutate).

Example

// Example Hook event handler for skill:install:before
const handleSkillInstallBefore = (event) => {
  if (event.skillName === 'malicious-skill') {
    event.block = true; // Block the installation
    event.messages.push('Warning: Skill installation blocked due to security concerns.');
  }
};

Notes

The implementation of the skill:install:before Hook event will require careful consideration of security and performance implications. Additionally, the event handler should be designed to handle various installation methods (ClawHub, npm, manual) and provide informative warning messages.

Recommendation

Apply the proposed solution by implementing the skill:install:before Hook event, as it provides a more robust and secure way to vet Skills before installation, addressing the high-priority feature request for enterprise and team deployments.

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 Feature Request: skill:install Hook for Pre-Install Security Vetting [1 participants]