authoring-tool-hook

Design Claude Code hooks for runtime policy enforcement and event logging.

2|Updated May 23, 2026
One-click install
npx skills add https://github.com/rocklambros/rcs --skill authoring-tool-hook
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: authoring-tool-hook
Source: https://github.com/rocklambros/rcs/tree/main/skills/claude-code-meta/authoring-tool-hook
Command: npx skills add https://github.com/rocklambros/rcs --skill authoring-tool-hook

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you author Claude Code hooks that control runtime behavior, audit events, and enforce security policy without confusing hooks with ordinary configuration.

Core Features & Use Cases

  • Choose the right hook event for the job, including PreToolUse, PostToolUse, SessionStart, SessionEnd, UserPromptSubmit, Stop, SubagentStop, and Notification.
  • Write scripts that read JSON from stdin, return allow or block decisions on stdout, and register them in settings.json or a plugin manifest.
  • Use it when blocking dangerous Bash commands, logging tool activity, injecting session context, or handling external policy checks with explicit timeout, cache, and failure-mode rules.

Quick Start

Ask Claude to draft a PreToolUse hook that blocks risky Bash commands, then have it explain the JSON payload, the decision response, the registration path, and the security review steps.

Frequently Asked Questions about authoring-tool-hook

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build Claude Code hooks to block dangerous Bash commands?

Claude Code hooks for blocking dangerous Bash commands require a PreToolUse script that parses stdin JSON, returns a block decision on stdout, and registers in settings.json or a plugin manifest with explicit fail-closed behavior.

What is the difference between fail-open and fail-closed behavior in runtime policy enforcement hooks?

Fail-open and fail-closed behavior in runtime policy enforcement hooks dictates whether tool execution proceeds or aborts when the hook encounters an error or timeout, requiring explicit configuration during hook design.

Which Claude Code hook events should I use for session auditing and context injection?

For session auditing and context injection, use SessionStart, SessionEnd, and UserPromptSubmit hook events to log session activity and inject contextual data into the Claude Code runtime environment.

How do I register Claude Code hooks in a plugin manifest or settings.json?

Registering Claude Code hooks in settings.json or a plugin manifest involves defining the hook script path, specifying the target event like PreToolUse or PostToolUse, and configuring execution rules for stdin JSON parsing and stdout decisions.

Can Claude Code hooks call external policy services with timeout and cache handling?

Yes, Claude Code hooks can call external policy services by configuring explicit HTTP timeout limits, implementing cache handling, and defining strict failure-mode rules to maintain runtime policy enforcement integrity.

What are the limitations of using PostToolUse hooks for audit logging?

PostToolUse hooks for audit logging cannot block tool execution retroactively and are limited to capturing event data after completion, requiring careful JSON payload parsing and stdout contract adherence.