http hook

Claude Code (Project)

Add a single JSON hook to your project’s .claude/settings.json. Governance applies to every tool call in that project.

需要 API 密钥

您需要 Neptrix API 密钥才能完成此设置。 免费注册获取密钥。

安装

  1. 1Copy the configuration below
  2. 2Create or open .claude/settings.json in your project root
  3. 3Paste the configuration and replace YOUR_API_KEY with your key
  4. 4Restart Claude Code — every tool call in this project now goes through Neptrix
将此配置添加到.claude/settings.json
.claude/settings.json
1{
2 "hooks": {
3 "PreToolUse": [
4 {
5 "matcher": ".*",
6 "hooks": [
7 {
8 "type": "http",
9 "url": "https://qpthort-backend-production.up.railway.app/hooks/claude-code/pre-tool-use?api_key=YOUR_API_KEY",
10 "timeout": 5000
11 }
12 ]
13 }
14 ]
15 }
16}

将 YOUR_API_KEY 替换为您的 API 密钥。 注册获取密钥。

工作原理

1

智能体提议操作

在每次工具调用之前,您的智能体将提议的操作发送给 Neptrix 进行评估。

2

Neptrix 进行评估

宪法治理规则评估操作。决策被记录到您的审计追踪中。

3

返回决策

ALLOW、BLOCK、ESCALATE 或 MODIFY。智能体自动发现——无需注册。

准备好治理您的智能体了吗?

创建免费账户,生成 API 密钥,不到 5 分钟即可运行治理。

免费开始使用