Claude Code hook

Ccgate

LLM-powered PermissionRequest hook for coding agents (e.g. Claude Code)

88 stars 10 forksHooks Source

Install

Install
go install github.com/tak848/ccgate@latest

Found in the project README. Check it for setup steps after installing.

From source
git clone https://github.com/tak848/ccgate.git

From the README

ccgate

A PermissionRequest hook for AI coding tools. It delegates each tool-execution permission decision to an LLM (Claude Haiku) using rules written in a jsonnet configuration file.

ccgate ships with built-in default rules, so it works out of the box without any configuration.

Supported targets:

- Claude Code
- OpenAI Codex CLI
- Devin CLI

日本語ドキュメント

Install

mise (recommended)

Requires mise 2026.4.20 or later.

To try ccgate without installing it globally (similar to npx / uvx):

aqua

Via the aqua standard registry (requires registry v4.498.0 or later). In an aqua-managed project (run aqua init first if you don't have an aqua.yaml yet):

For a global aqua config, follow aqua's own tutorial.

go install

GitHub Releases

Download a binary from Releases and place it on your PATH.

Homebrew

Quick start — Claude Code

1. Register as a Claude Code hook

~/.claude/settings.json:

"command": "ccgate" (no subcommand) is the canonical Claude Code hook invocation; ccgate claude is the explicit form.

If ccgate is not on your PATH (e.g. when relying on mise exec instead of a global install), set the hook command to the equivalent invocation, or use an absolute path to the binary.

2. API key

ccgate calls Anthropic's Claude Haiku by default. Export CCGATE_ANTHROPIC_API_KEY (or ANTHROPIC_API_KEY as fallback). For OpenAI / Gemini and the resolution order, see docs/providers.md#api-keys.

Switching providers has a copy-pasteable block for OpenAI with gpt-6-luna.

That's it — ccgate is now running with its embedded defaults. To customize what is allowed or denied, see docs/rule-tuning.md; for background on how rules work, see Concepts.

Quick start — Codex CLI

Codex hooks require [features] hooks = true in ~/.codex/config.toml. See docs/codex-cli.md for details.

1.…
Read the full README on GitHub

How hooks work

  • Hooks are shell commands Claude Code runs at fixed points: before or after a tool call, when you submit a prompt, when Claude stops, on notifications and at session start.
  • They are set in the hooks section of ~/.claude/settings.json (or .claude/settings.json for a project), or come bundled in a plugin.
  • A hook can block a tool call, add context, or run a formatter or test. Read the scripts before you install them: they run on your machine with your permissions.
Claude Code docs

Details

Repository
tak848/ccgate
Type
Hooks
Language
Go
License
MIT
Last updated
3 November 2026

FAQ

What is Ccgate?

LLM-powered PermissionRequest hook for coding agents (e.g. Claude Code) It is a hook for Claude Code, from tak848/ccgate on GitHub.

How do I install Ccgate?

Run go install github.com/tak848/ccgate@latest, then follow the setup in the README.

Is Ccgate popular?

tak848/ccgate has 88 GitHub stars and 10 forks. It was last updated on 3 November 2026.

More hooks

Browse the most popular Claude Code mods, all hooks, or the skills and MCP server directories.