Generate hook-based plugin extension system with event emitter patterns.
Generates extensible plugin architectures using event-driven hook systems for modular application development.
npx claudepluginhub a5c-ai/babysitterThis skill is limited to using the following tools:
README.mdGenerate hook-based plugin extension system.
type HookCallback = (...args: any[]) => Promise<any> | any;
export class HookSystem {
private hooks = new Map<string, HookCallback[]>();
register(hookName: string, callback: HookCallback): void {
const callbacks = this.hooks.get(hookName) || [];
callbacks.push(callback);
this.hooks.set(hookName, callbacks);
}
async trigger(hookName: string, ...args: any[]): Promise<any[]> {
const callbacks = this.hooks.get(hookName) || [];
const results = [];
for (const cb of callbacks) {
results.push(await cb(...args));
}
return results;
}
async waterfall<T>(hookName: string, initial: T): Promise<T> {
const callbacks = this.hooks.get(hookName) || [];
let result = initial;
for (const cb of callbacks) {
result = await cb(result);
}
return result;
}
}
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.