customaize-agent-create-hook

Create TypeScript event handlers for OpenCode plugins.

Updated Mar 10, 2026
One-click install
npx skills add https://github.com/Gamezar/opencode-cek --skill customaize-agent-create-hook
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: customaize-agent-create-hook
Source: https://github.com/Gamezar/opencode-cek/tree/main/plugins/customaize-agent/skills/customaize-agent-create-hook
Command: npx skills add https://github.com/Gamezar/opencode-cek --skill customaize-agent-create-hook

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides users in creating custom event handlers for OpenCode plugins, enabling them to automate responses to various events within the OpenCode environment, such as tool execution, session lifecycle changes, file modifications, and shell command events.

Core Features & Use Cases

  • Event-Driven Automation: Define TypeScript functions that trigger automatically based on specific OpenCode events.
  • Behavior Modification: Intercept and modify tool arguments before execution, or inject environment variables into shell commands.
  • Observation & Logging: React to tool execution results, file edits, or session lifecycle events for monitoring and auditing.
  • Use Case: Automatically format TypeScript files whenever they are edited by the agent, or block dangerous shell commands before they are executed.

Quick Start

Use the customaize-agent-create-hook skill to create a plugin that logs every file edit.

Frequently Asked Questions about customaize-agent-create-hook

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create custom event handlers for OpenCode plugins using TypeScript?

To create custom event handlers for OpenCode plugins, define TypeScript functions that trigger automatically based on specific OpenCode events like tool execution, session lifecycle changes, or file modifications. This enables event-driven automation and behavior modification.

Can I intercept and modify tool arguments before execution in OpenCode?

Yes, you can intercept and modify tool arguments before execution in OpenCode by creating custom event handlers. This allows you to alter the behavior of tools dynamically, such as blocking dangerous shell commands or adjusting file paths before they run.

What OpenCode events can I automate with custom hooks?

You can automate responses to various OpenCode events including tool execution, session lifecycle changes, file modifications, and shell command events. This allows for observation, logging, and modifying agent behavior for enhanced control.

How do I inject environment variables into shell commands in OpenCode?

You can inject environment variables into shell commands by setting up custom event handlers that intercept shell events. This allows you to dynamically modify the execution environment before the shell command runs.

Do I need TypeScript to write OpenCode plugin hooks?

TypeScript is required to create custom event handlers for OpenCode plugins, as the Skill facilitates automation by defining TypeScript functions that respond to tool execution, session lifecycle, file changes, and shell events.

How do I automatically format TypeScript files when edited by an agent?

You can automatically format TypeScript files when edited by an agent by creating a custom event handler that reacts to file modification events. This observes the file change and triggers your formatting logic automatically.