跳转到主要内容
此内容尚未提供您的语言版本,正在以英文显示。

Hooks Safety

插件 已验证 活跃

Essential safety hooks to prevent destructive operations in Claude Code. From cc-safe-setup (655+ hooks).

目的

To protect users and their projects from accidental or malicious destructive operations by implementing preventative safety checks within Claude Code.

功能

  • Blocks credential hunting and exfiltration
  • Prevents dangerous `rm` commands on critical paths
  • Guards against dangerous `--force` flags in Git, npm, and Docker
  • Warns about writing large files to prevent repo bloat
  • Blocks writes to system directories

使用场景

  • Use when operating in sensitive codebases or environments where accidental data loss is a concern.
  • Use to enhance security posture by preventing common, dangerous command-line operations.
  • Use to safeguard against prompt injection attempts that aim to exfiltrate credentials.
  • Use when working in a team environment to enforce safer development practices.

非目标

  • Providing a comprehensive security suite for development environments.
  • Replacing user awareness and responsibility for command execution.
  • Performing automated cleanup of safe directories beyond specific `rm` patterns.

实践

  • Security hardening
  • Pre-execution validation
  • Defensive programming

先决条件

  • Bash shell
  • jq installed
  • Claude Code environment

安装

/plugin install hooks-safety@davepoon-buildwithclaude

质量评分

已验证
99 /100
1 day ago 分析

信任信号

最近提交6 days ago
星标2.9k
许可证MIT
状态
查看源代码