create-hook — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited create-hook (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Create a hook: a script Claude Code runs on a lifecycle event (before a tool, after a prompt, on stop, and so on). Make it do one deterministic thing, fail safe, and ship with documentation a user can paste into settings.json. Then regenerate the derived files and validate.
Source layout is hooks/<category>/<name>/HOOK.md plus the script. Hooks are folder-layout: the whole folder installs to .claude/hooks/<name>/, so the script and any helpers ride along. The category is the folder; registry.json and the README catalog are generated by pnpm gen. Never hand-edit generated files.
Hooks differ from skills, agents, and commands in one critical way: they are configuration, not a loadable file. The shadcn installer copies the script and HOOK.md but cannot edit a user's settings.json. So HOOK.md must document the exact settings block to add, and the hook is inert until the user adds it.
0 so it can never interrupt or break a tool call or session. Exit 2 only when blocking is the intended behavior for that event.settings.json block, the event, the matcher, and the command line. Without it the hook does nothing after install.pnpm gen.PreToolUse matched to Bash). Event list, matcher support, and the input/exit-code contract: reference/events.md.0), or veto an action (exit 2 on the right event)?From the repo root:
pnpm new --type hook --category <category> --name <name> --description "<what it does>"Current hook category: observability. Reuse it or add a new folder if justified. The scaffolder creates the folder and a HOOK.md stub and regenerates the registry; you then add the script.
Add the script alongside HOOK.md (for example <name>.mjs or <name>.sh). Contract, in brief (full detail in reference/events.md):
hook_event_name, tool_name, tool_input, cwd, and event-specific fields).UserPromptSubmit / SessionStart stdout is injected as context.0 and print a JSON object to stdout (continue, decision, hookSpecificOutput, systemMessage).HOOK.md is the manifest and the documentation. Cover:
name + description (the description is the catalog/registry text).HOOK.md).settings.json block to paste, calling out that the installer cannot do this step. Use ${CLAUDE_PROJECT_DIR} in the command path. See the existing tool-call-logger hook for the established shape.pnpm gen
pnpm validateFix the source files if validation complains; never patch generated output.
0).HOOK.md documents the exact settings.json block, event, and matcher.pnpm validate passes and the README catalog shows the new row.Report the hook's path, category, the event it targets, and the validation result. Leave committing to the user.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.