tonimelisma

Claude Auto Approve — AI skill for Claude Code

AI community

A Claude Code hook that uses an LLM-as-a-judge to automatically classify safety for commands and web sites.

How to install Claude Auto Approve

This entry records only its repository, not the path inside it, so there is no exact command to give. Open tonimelisma/claude-auto-approve and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Claude Auto Approve does

A Claude Code hook that uses an LLM-as-a-judge to automatically classify safety for commands and web sites.

Alternatives in AI

  • TurboLLM — Run any local LLM engine, auto-tuned to your GPU — polished web UI + OpenAI/Anthropic-compatible API 251 ★
  • Ccgate — LLM-powered PermissionRequest hook for coding agents (e.g. Claude Code) 87 ★
  • OpenTor — Tor/Dark Web access skill for AI agents (OpenCode & Claude Code) 85 ★

README

claude-auto-approve

A Claude Code [hook](https://docs.anthropic.com/en/docs/claude-code/hooks) that automatically approves safe Bash commands and WebFetch URLs using a cheap/free LLM API, so you only get permission prompts for potentially dangerous operations.

How it works

When Claude Code wants to run a Bash command or fetch a URL, this hook intercepts the permission request and asks a cheap LLM whether the operation could cause harm. Safe commands like `ls`, `git status`, or `cat` and safe URLs like `https://docs.python.org` are auto-approved. Dangerous commands like `rm -rf` or dangerous URLs like `http://192.168.1.1/admin` trigger the normal permission prompt.

Provider failover

The script tries multiple API providers in order:

  1. OpenCode — Kimi K2.5, free (~1.5s latency)
  2. Moonshot — Kimi K2.5, cheap (~1s latency)

If a provider returns a rate limit error, it enters a 30-minute cooloff period and the next provider is tried.

Fail-safe design

If all providers fail, time out, or return an unrecognizable response, the hook outputs nothing — which tells Claude Code to show the normal permission prompt. You never accidentally approve a dangerous command due to an API error.

Classification prompts

For **Bash commands**, the LLM is asked: "Should a system administrator be warned before running this command?" For **WebFetch URLs**, it checks for SSRF risks (private/internal IPs), data exfiltration patterns, and malicious domains. Both must answer YES or NO.

Requirements

  • curl
  • jq
  • API keys from one or more providers (see below)

Installation

  1. Copy the script to your Claude Code hooks directory:

    mkdir -p ~/.claude/hooks
    cp auto-approve-safe.sh ~/.claude/hooks/
    chmod +x ~/.claude/hooks/auto-approve-safe.sh
  2. Edit the script and replace the placeholder API keys with your own:

    "moonshot|https://api.moonshot.ai/v1/chat/completions|YOUR_MOONSHOT_API_KEY|kimi-k2.5|0.60|3.00"
    "