← Back to Skills Marketplace
hanxiao-bot

OpenClaw Hook Examples

by hanxiao-bot · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
167
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install openclaw-hook-examples
Description
Provides example hooks for OpenClaw to intercept, modify, block tool calls, switch models, log actions, and handle subagent events.
Usage Guidance
This file is a set of examples, not an active plugin: installing it as-is does nothing because there is no install or code to run. If you or a developer copy these examples into a real plugin, be aware: hooks can block or modify tool calls and may log parameters and results — avoid logging or exporting sensitive data, validate and sanitize inputs carefully, and confirm any model/provider strings (e.g., ollama) match your environment and credential posture. Also fix the minor inconsistencies (sync vs async, intended log destination) before using in production. If you plan to run a plugin built from these examples, review where logs go and which sessions are considered "elevated" to prevent accidental exposure or overly broad blocking behavior.
Capability Analysis
Type: OpenClaw Skill Name: openclaw-hook-examples Version: 1.0.0 The bundle contains educational documentation and code examples for OpenClaw hooks in SKILL.md. The examples demonstrate defensive security practices, such as auditing tool usage, blocking dangerous shell commands (e.g., 'rm -rf' and fork bombs), and implementing permission checks for sensitive tools. No malicious logic, data exfiltration, or prompt injection attempts were found.
Capability Assessment
Purpose & Capability
Name/description match the content: the SKILL.md contains example hook handlers for intercepting/modifying/blocking tool calls, switching models, logging, and handling subagent events. It does not request unrelated binaries, env vars, or installs.
Instruction Scope
The instructions stay within the expected runtime hook domain (event, ctx, session, tool, messages). They demonstrate blocking tools, validating exec commands, model switching, and logging. Minor inconsistencies: the doc headline says "Record all tool calls to a file" but the example uses console.log; it also says "Hooks are synchronous" while examples use async handlers. Also note: the examples log tool params and subagent results — if copied verbatim into a real plugin this could expose sensitive inputs/outputs to logs or external sinks.
Install Mechanism
No install spec and no code files — instruction-only skill. Nothing will be downloaded or written to disk by the skill itself.
Credentials
The skill declares no required environment variables, credentials, or config paths. Example code references runtime context only (ctx, event) and a provider string (ollama) but does not require any keys in the skill metadata.
Persistence & Privilege
always is false and the skill is user-invocable only. It does not request permanent presence or modify other skills' configs. The default ability for autonomous invocation is set to false only in metadata? (normal platform default applies) — no extra privileges are requested.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install openclaw-hook-examples
  3. After installation, invoke the skill by name or use /openclaw-hook-examples
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release
Metadata
Slug openclaw-hook-examples
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is OpenClaw Hook Examples?

Provides example hooks for OpenClaw to intercept, modify, block tool calls, switch models, log actions, and handle subagent events. It is an AI Agent Skill for Claude Code / OpenClaw, with 167 downloads so far.

How do I install OpenClaw Hook Examples?

Run "/install openclaw-hook-examples" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is OpenClaw Hook Examples free?

Yes, OpenClaw Hook Examples is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does OpenClaw Hook Examples support?

OpenClaw Hook Examples is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created OpenClaw Hook Examples?

It is built and maintained by hanxiao-bot (@hanxiao-bot); the current version is v1.0.0.

💬 Comments