ts-native-hook-reuse

Community

Reuse TS native hooks with robust execution.

Authorliuyu520
Version1.0.0
Installs0

System Documentation

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.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: ts-native-hook-reuse
Download link: https://github.com/liuyu520/cc_source/archive/main.zip#ts-native-hook-reuse

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.