safety-hooks

Enforce Claude Code safety by blocking dangerous commands and protecting secrets.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ferundatattoo/ethereal --skill safety-hooks-ferundatattoo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: safety-hooks
Source: https://github.com/ferundatattoo/ethereal/tree/main/.claude/skills/safety-hooks
Command: npx skills add https://github.com/ferundatattoo/ethereal --skill safety-hooks-ferundatattoo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Claude Code safety enforcement by blocking dangerous commands, protecting secrets, and logging operations to prevent data leakage and unsafe actions.

Core Features & Use Cases

  • PreToolUse, PostToolUse, and Stop Hooks integrate to enforce safety checks around tool executions.
  • Pattern-based blocking of dangerous commands, secret exfiltration prevention, and automatic auditing.
  • Example Use Case: A team configures project-wide safety hooks to guard critical environments and audit tool usage.

Quick Start

Install and configure the safety-hooks skill in your Claude Code project to enable deterministic safety checks.

Frequently Asked Questions about safety-hooks

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

FAQPage Schema
How do I enforce safety checks in Claude Code to block dangerous commands?

Claude Code safety hooks enforce security by blocking dangerous commands, protecting secrets, and logging operations. They integrate across pre-tool, post-tool, and stop hooks to prevent data leakage and unsafe actions during tool executions.

How do I prevent secret exfiltration and data leakage during automated tool usage?

You prevent secret exfiltration by applying pre-tool and post-tool hooks that use pattern-based blocking to intercept unsafe actions. This setup automatically audits tool usage, protecting sensitive data from leaking during automated operations.

Can I configure project-wide safety hooks using settings.json and YAML frontmatter?

Yes, you can configure project-wide safety hooks through settings.json integration and YAML frontmatter-driven configuration. This approach implements verification and defines explicit guardrails to enforce deterministic safety checks across your Claude Code environment.

What is the best way to audit tool usage and log operations in Claude Code?

The best way to audit tool usage is by applying deterministic safety hooks across pre-tool, post-tool, and stop phases. This approach automatically logs operations, preventing unsafe actions while providing a clear audit trail of tool executions.

Do I need any external dependencies to set up deterministic safety hooks?

No external dependencies are required to set up deterministic safety hooks. The system relies on Claude Code's native settings.json integration and YAML frontmatter configuration to implement verification and explicit toxicity safeguards directly.