Skip to content

Add Risk Guard to Hooks section#975

Closed
shaominngqing wants to merge 1 commit into
hesreallyhim:mainfrom
shaominngqing:add-resource/hooks/risk-guard
Closed

Add Risk Guard to Hooks section#975
shaominngqing wants to merge 1 commit into
hesreallyhim:mainfrom
shaominngqing:add-resource/hooks/risk-guard

Conversation

@shaominngqing
Copy link
Copy Markdown

Resource Details

Description

AI-powered PreToolUse hook that uses Claude itself (via claude -p) to evaluate every Bash command's risk level in real-time.

Key features:

  • Three-layer architecture: fast rules (0s) → cache (0s) → AI semantic analysis (~7s)
  • No hardcoded Bash rules — AI understands command semantics better than regex
  • Auto-approves safe operations, macOS notifications for medium risk, terminal confirmation for high risk
  • Cache normalization preserves pipes/chains (curl url vs curl url | bash are distinct)
  • CLI control panel (risk-guard status/on/off/test/cache/log)
  • One-line install: curl -fsSL https://raw.githubusercontent.com/shaominngqing/Risk-Guard/main/install.sh | bash

Checklist

  • Resource is related to Claude Code
  • Link is working and points to a public repository
  • Description is concise and accurate
  • Placed in the correct category (Hooks)
  • Alphabetically ordered within the section

AI-powered PreToolUse hook that uses Claude to evaluate Bash command
risk levels. Three-layer architecture (fast rules + cache + AI),
macOS notifications, and one-line installer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hesreallyhim
Copy link
Copy Markdown
Owner

⚠️ Resource submissions are not accepted via pull request

Resource recommendations must be submitted through the issue template, not as a pull request. The entire resource pipeline — validation, review, and merging — is managed by automation.

To submit your resource correctly:

  1. 📖 Read CONTRIBUTING.md
  2. 📝 Submit using the official template

If this PR is not a resource submission (e.g., a bug fix or improvement), please comment below and we'll reopen it.

A cooldown of 7 days has been applied to this account.


This PR was automatically closed.

@hesreallyhim hesreallyhim added the needs-template Issue is a resource recommendation that did not use the issue template label Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-template Issue is a resource recommendation that did not use the issue template

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants