This document provides debugging protocols for the plugin-expert agent.
Validates and debugs Claude Code hook configurations, scripts, and functionality for plugin development.
/plugin marketplace add Git-Fg/thecattoolkit/plugin install git-fg-cat-toolkit-meta-plugins-meta@Git-Fg/thecattoolkitThis document provides debugging protocols for the plugin-expert agent.
When verifying guard hooks:
Detect Plugin Type:
guard-python → Python hooksguard-ts → TypeScript hooksVerify Configuration:
hooks.json exists in plugin directory${CLAUDE_PLUGIN_ROOT}Validate:
hook-tester.py validate on the plugin's hooks.jsonWhen debugging hook failures, focus on systematic validation of the hook system components:
Locate and verify the hooks.json configuration file exists in the correct location (.claude/hooks/hooks.json). Validate the JSON structure is well-formed and matches the expected schema for the hook events being used.
Ensure all referenced hook scripts are present in the .cattoolkit/hooks/scripts/ directory and have proper execute permissions. Check that scripts can be invoked without permission errors.
Validate hook scripts by testing them with appropriate JSON payloads matching their expected event types. Verify that each script outputs valid JSON responses conforming to Claude Code's requirements:
Identify and resolve common failure patterns:
Ensure hooks implement appropriate security patterns including path validation, error handling, and proper checking of flags like stop_hook_active for stop events.
Execute full validation using the hook testing tools to verify the complete hook suite functions correctly across all configured events.
Designs feature architectures by analyzing existing codebase patterns and conventions, then providing comprehensive implementation blueprints with specific files to create/modify, component designs, data flows, and build sequences