Developer Integrations
Claude Code integration
AvailableDocumentation version 1.0 · Applies to TrustFabric · Updated 2026-10-30
A PreToolUse hook script asks the gateway before each tool call. Enforcement level: voluntary.
Claude Code runs a PreToolUse hook before each tool call. TrustFabric's hook script sends the proposed tool call to the authorization gateway and blocks the call unless the answer is ALLOW.
Because the hook is configured on the developer's machine and could be disabled, TrustFabric records Claude Code agents at the voluntary enforcement level. For enforced mediation, use the Claude Agent SDK integration in a runner you control, or a CI gate.
Claude Code itself, and the model subscription it uses, are not included with TrustFabric.
Hook configuration
Field names in this sample are illustrative and may change between API versions.
{
"hooks": {
"PreToolUse": [
{
"matcher": "*",
"hooks": [
{ "type": "command", "command": "python3 integrations/trustfabric/claude_code_hook.py" }
]
}
]
}
}