Rules for developing vibecosystem TypeScript hooks.
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 Rules
## Hook Types
- **PreToolUse**: Runs before a tool executes (validation, parameter modification)
- **PostToolUse**: Runs after a tool executes (formatting, checking)
- **Stop**: Runs when session ends (final validation)
## File Structure
```
hooks/
src/ # TypeScript source files
shared/ # Shared utilities
dist/ # Compiled .mjs files (esbuild output)
package.json
tsconfig.json
```
## Hook Output Format
```typescript
interface HookResult {
result: string; // shown in terminal
systemMessage?: string; // injected into AI context
permissionDecision?: "allow" | "deny";
reason?: string; // if denied
}
```
## Rules
- Always handle errors with try/catch
- Return valid JSON to stdout
- Read input from stdin (JSON)
- Use `systemMessage` for AI context injection, not `message`
- Keep hooks fast (< 500ms)
- Build with: `cd hooks && npm run build`
The line at the top of this page pins the label git:20260330.cd5da78, 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.
GET https://markdownregistry.com/api/v1/artifacts/art_3z2mgrcbxmafbel6
GET https://markdownregistry.com/api/v1/resolve?ref=vibeeval/vibecosystem/.cursor/rules/hook-development.mdc
GET https://markdownregistry.com/api/v1/blob/6a514aac660fddbc69e087ccdec0096376b6ec3d9e82f8ed252e0262f183d1bf
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.
vibeeval/vibecosystem · skills/achievements/SKILL.md · Steam-style achievement system with XP, levels, streaks, and skill trees. Gamifies the development workflow. 25…
vibeeval/vibecosystem · skills/agent-benchmark/SKILL.md · Framework for measuring and tracking agent response quality over time. Detects regressions before they reach…
anthropics/claude-plugins-official · plugins/plugin-dev/skills/hook-development/SKILL.md · This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate…
nota-america/forgecat-agent-profiles · profiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_plugin-dev/for-forgecat/platforms/codex/.agents/skills/hook-development/SKILL.md · This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate…
nota-america/forgecat-agent-profiles · profiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_plugin-dev/for-codex/.agents/skills/hook-development/SKILL.md · This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate…
nota-america/forgecat-agent-profiles · profiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_plugin-dev/for-cursor/.cursor/skills/hook-development/SKILL.md · This skill should be used when the user asks to "create a hook",
nota-america/forgecat-agent-profiles · profiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_plugin-dev/for-forgecat/platforms/cursor/.cursor/skills/hook-development/SKILL.md · This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate…
nota-america/forgecat-agent-profiles · profiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_plugin-dev/for-forgecat/skills/hook-development/SKILL.md · This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate…
nota-america/forgecat-agent-profiles · profiles/anthropics/claude-plugins-official/anthropics_claude-plugins-official_plugin-dev/for-claude/.claude/skills/hook-development/SKILL.md · This skill should be used when the user asks to "create a hook",
kanevry/session-orchestrator · skills/hook-development/SKILL.md · Use when creating, modifying, or debugging Claude Code hooks — PreToolUse, PostToolUse, Stop, SubagentStop…