skills/skill-hook/SKILL.md
Create Claude Code hooks with standardized structure. Generates complete hook scaffolds with setup commands, logging, and Claude config integration. Just run `skill-hook` to create a new hook template.
npx skillsauth add hasna/skills skill-hookInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Creates Claude Code hook scaffolds following a standardized pattern. Run skill-hook in any directory to generate a complete hook project.
# Install globally
bun add -g git+ssh://[email protected]/example/skill-hook.git
# Create a hook (interactive)
skill-hook
# Or with a name directly
skill-hook my-hook
Running skill-hook <name> creates:
hook-<name>/
├── src/
│ ├── index.ts # CLI entry point
│ ├── commands/
│ │ ├── run.ts # Main hook logic
│ │ ├── setup.ts # Setup command
│ │ ├── test.ts # Manual testing
│ │ └── config.ts # Configuration management
│ ├── core/
│ │ └── <name>.ts # Hook-specific logic (implement here)
│ └── utils/
│ ├── logger.ts # Configurable logging
│ └── claude.ts # Claude config helpers
├── hook.config.json # Self-describing metadata
├── package.json
├── tsconfig.json
├── bunfig.toml
├── README.md
└── HOOK.md
skill-hook [name] [options]
Options:
--event <event> PreToolUse, PostToolUse, or Stop (default: PreToolUse)
--matcher <match> Tool matcher: Bash, Write, Edit, * (default: *)
--output <dir> Output directory (default: current)
--help Show help
| Event | When | Can Block | |-------|------|-----------| | PreToolUse | Before tool executes | Yes | | PostToolUse | After tool executes | No | | Stop | When agent stops | No |
cd hook-<name>bun installsrc/core/<name>.ts - implement your logicbun run src/index.ts testbun add -g git+ssh://[email protected]/example/hook-<name>.githook-<name> setup{ "decision": "allow" } // Allow operation
{ "decision": "block", "reason": "Why blocked" } // Block (PreToolUse only)
{ "decision": "error", "message": "Error msg" } // Error occurred
testing
Merge a GitHub pull request, merge when green, use a merge queue, or decide whether a pull request is mergeable. Use only for explicit merge intent, not ordinary review.
development
Generate premium performance audit reports for web apps, APIs, or SaaS surfaces with metrics, findings, budgets, remediation plans, and manifest metadata.
data-ai
Generate premium customer feedback reports from reviews, support tickets, surveys, call notes, or raw feedback with clusters, sentiment, root causes, roadmap recommendations, evidence, and manifest metadata.
development
Generate high-quality PDF documents from markdown, HTML, or templates