What problem does it solve?
This skill helps developers create and extend TS/JS native hooks by reusing the existing TsHookSchema, execTsHook executor, and hook dispatch integration, enabling consistent behavior across new hook types and easier debugging of path resolution.
Core Features & Use Cases
- Reuse the TsHookSchema to define new hook types with a discriminated union, ensuring strong type safety.
- Reuse the in-process TS hook executor (execTsHook) with the same 10-step pattern and lazy dispatch loading to minimize overhead.
- Extend the hook dispatch flow by adding new branches, inject timing data into attachments, and keep UI display text in sync with new hook types.
- Debug and validate path resolution, security checks, and timeout handling when integrating new TS hooks, reducing integration risk.
Quick Start
Create a new TS hook module that exports a default async function and register it in settings.json under PreToolUse.