rc-hookify

Solid

Authors a new RC Claude Code hook from a plain-language description — emits a fail-open shell script in the house style under hooks/scripts/, wires it into hooks/hooks.json, documents it, and verifies it. Use when the user wants a deterministic guardrail, formatter, observer, or session warm-start turned into a hook. Do not use for application code, one-off shell scripts that aren't hooks, or editing existing guard logic unrelated to hooks.

AI & Automation 19 stars 1 forks Updated 2 weeks ago MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
43
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Hookify Turn "I want the agent to always/never do X" into a RC hook. A rule that must hold *every time* belongs in a hook, not in prose (CLAUDE.md). This skill writes one in the repo's house style — never blocks the session on its own errors, guards by pattern, and is registered + documented. It writes only under `hooks/`; it never touches application source. Read `hooks/scripts/_lib.sh` and one existing hook (`hooks/scripts/observe.sh` for an observer, `hooks/scripts/git-guard.sh` for a blocker) before writing — mirror them exactly. ## Step 1 — pick the event First confirm the rule truly must hold *every time* — if it's advisory (nice-to-have, not every-time), it belongs in `CLAUDE.md` or a skill, not a hook; say so instead of writing one. Match the intent to an event; the full I/O contract is in `references/hook-events.md` (read it — stdout reaches the model only on some events, and only `PreToolUse` can block). | Intent | Event | Matcher | |---|---|---| | Block/warn before a tool runs | `PreToolUse` | tool name (`Bash`, `Edit\|Write\|MultiEdit`, `Task`) | | Format/observe/nudge after a tool ran | `PostToolUse` | tool name | | Warm-start context / surface state at session start | `SessionStart` | omit (all sources) | | Persist state before compaction / at end | `PreCompact` / `SessionEnd` | omit — side-effect only, model never sees stdout | | Notify on stop / permission prompt | `Stop` / `Notification` | omit | ## Step 2 — write the script (house style) `hooks/scr...

Details

Author
rodolfochicone
Repository
rodolfochicone/rc-project
Created
1 months ago
Last Updated
2 weeks ago
Language
JavaScript
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category