Host-side AffixIO attestation for privileged tool calls (PreToolUse / PermissionRequest)
Use case
Claude Code already has strong permission rules and hooks (PreToolUse, PermissionRequest, matchers for Bash / Write / MCP tools). Separately, some teams want a host-side signed proof that a specific privileged tool action was attested or approved before execution.
AffixIO proves a host-side ACTION completed (signed yes/no). PII stays on the host. Not person/age/KYC. This does not replace Claude Code permissions, sandbox, or managed settings. It sits beside them as an attestation / approval hook before the tool runs.
npm i affixio
# optional local MCP (stdio)
npm i @affixio/mcp@0.1.0
Proposal
Document (or accept a tiny community example under examples/hooks/) a pattern where AffixIO gates privileged tool calls:
- Claude intends Bash, file write, network, or an MCP tool call.
- A
PreToolUse(and/orPermissionRequest) hook runs on the host. - AffixIO attests that action (signed yes/no) before the tool proceeds.
- On deny / no attestation, return
permissionDecision: "deny"(or exit 2) so the call is blocked. - Keep existing Claude Code allow/ask/deny and sandbox rules unchanged.
Natural matchers already exist for this: Bash, Write|Edit, WebFetch|WebSearch, mcp__.*, plus PermissionRequest for interactive approval paths. The repo already ships examples/hooks/bash_command_validator_example.py as the shape we would follow.
Not asking for a full Claude Code plugin wrap or marketplace listing in this issue. Issue-first. Happy to PR a minimal AffixIO PreToolUse example into examples/hooks/ if maintainers want that shelf used for third-party patterns.
Additional information
- https://www.affix-io.com/
- https://hub.affix-io.com/onboarding/
- Hooks docs: https://code.claude.com/docs/en/hooks
Happy to align with whatever docs/examples shape you prefer.