Hook Development SKILL.md skillA

Hook Development from tzachbon/smart-ralph is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add tzachbon/smart-ralph/Hook Development@v0.1.0

Pins v0.1.0 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
tzachbon/smart-ralph
Path
.agents/skills/Hook Development/SKILL.md
Versions recorded
1
Latest version
v0.1.0, committed Jan 22, 2026
Size
16,246 bytes
Repository stars
567
License
MIT

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…

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# Hook Development for Claude Code Plugins

## Overview

Hooks are event-driven automation scripts that execute in response to Claude Code events. Use hooks to validate operations, enforce policies, add context, and integrate external tools into workflows.

**Key capabilities:**
- Validate tool calls before execution (PreToolUse)
- React to tool results (PostToolUse)
- Enforce completion standards (Stop, SubagentStop)
- Load project context (SessionStart)
- Automate workflows across the development lifecycle

## Hook Types

### Prompt-Based Hooks (Recommended)

Use LLM-driven decision making for context-aware validation:

```json
{
  "type": "prompt",
  "prompt": "Evaluate if this tool use is appropriate: $TOOL_INPUT",
  "timeout": 30
}
```

**Supported events:** Stop, SubagentStop, UserPromptSubmit, PreToolUse

**Benefits:**
- Context-aware decisions based on natural language reasoning
- Flexible evaluation logic without bash scripting
- Better edge case handling
- Easier to maintain and extend

### Command Hooks

Execute bash commands for deterministic checks:

```json
{
  "type": "command",
  "command": "bash ${CLAUDE_PLUGIN_ROOT}/scripts/validate.sh",
  "timeout": 60
}
```
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add tzachbon/smart-ralph/Hook Development@sha256:d14528f389cae485

The line at the top of this page pins the label v0.1.0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_lfod3afdf3bkknhc.svg)](https://markdownregistry.com/a/art_lfod3afdf3bkknhc)

4 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 1 version of this file, committed on Jan 22, 2026.

versioncommittedcommitsizeaudit
v0.1.0 latest2026-01-22 6225fd4 16,246 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (16246 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

tzachbon/smart-ralph · 567 stars · license MIT · pushed 2026-10-28 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_lfod3afdf3bkknhc
GET https://markdownregistry.com/api/v1/resolve?ref=tzachbon/smart-ralph/Hook Development
GET https://markdownregistry.com/api/v1/blob/d14528f389cae485ac50583a22be326485c83fc9c8ef7ce700213e1583cf8fbe

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from tzachbon/smart-ralph

Command Development SKILL.md skill
tzachbon/smart-ralph · .agents/skills/Command Development/SKILL.md · This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command"…
v0.2.0 · audit A · 567 stars
MCP Integration SKILL.md skill
tzachbon/smart-ralph · .agents/skills/MCP Integration/SKILL.md · This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use…
v0.1.0 · audit A · 567 stars
Plugin Settings SKILL.md skill
tzachbon/smart-ralph · .agents/skills/Plugin Settings/SKILL.md · This skill should be used when the user asks about "plugin settings", "store plugin configuration", "user-configurable…
v0.1.0 · audit A · 567 stars
Plugin Structure SKILL.md skill
tzachbon/smart-ralph · .agents/skills/Plugin Structure/SKILL.md · This skill should be used when the user asks to "create a plugin", "scaffold a plugin", "understand plugin structure"…
v0.1.0 · audit A · 567 stars
Skill Development SKILL.md skill
tzachbon/smart-ralph · .agents/skills/Skill Development/SKILL.md · This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill"…
v0.1.0 · audit A · 567 stars
AGENTS.md AGENTS.md file
tzachbon/smart-ralph · AGENTS.md
git:20260306.3eda728 · audit B · 567 stars
CLAUDE.md CLAUDE.md file
tzachbon/smart-ralph · CLAUDE.md
git:20260303.2b6de9b · audit A · 567 stars
communication-style SKILL.md skill
tzachbon/smart-ralph · plugins/ralph-speckit/skills/communication-style/SKILL.md · Output rules for all agents - concise, scannable, actionable. Based on Matt Pocock's planning principles.
v0.1.0 · audit A · 567 stars
delegation-principle SKILL.md skill
tzachbon/smart-ralph · plugins/ralph-speckit/skills/delegation-principle/SKILL.md · Core principle that the main agent is a coordinator, not an implementer. All work must be delegated to subagents.
v0.1.0 · audit A · 567 stars
smart-ralph SKILL.md skill
tzachbon/smart-ralph · plugins/ralph-speckit/skills/smart-ralph/SKILL.md · Core Smart Ralph skill defining common arguments, execution modes, and shared behaviors across all Ralph plugins.
v0.1.0 · audit A · 567 stars
speckit-workflow SKILL.md skill
tzachbon/smart-ralph · plugins/ralph-speckit/skills/speckit-workflow/SKILL.md · Comprehensive understanding of the spec-kit methodology. Constitution-driven feature development with specify, plan…
v0.1.0 · audit A · 567 stars
AGENTS.md@plugins/ralph-specum-codex/assets/bootstrap AGENTS.md file
tzachbon/smart-ralph · plugins/ralph-specum-codex/assets/bootstrap/AGENTS.md
git:20260828.4890dd3 · audit A · 567 stars

Every file in tzachbon/smart-ralph

Browse by kind, by grade A, or by owner.