signed-audit-trails-recipe

Configures Cedar policy gates and Ed25519-signed receipts for Claude Code tool calls.

Updated Apr 23, 2026
One-click install
npx skills add https://github.com/SanketAdlak/PDMProjectDesign --skill signed-audit-trails-recipe-sanketadlak
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: signed-audit-trails-recipe
Source: https://github.com/SanketAdlak/PDMProjectDesign/tree/main/.agents/skills/signed-audit-trails-recipe
Command: npx skills add https://github.com/SanketAdlak/PDMProjectDesign --skill signed-audit-trails-recipe-sanketadlak

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires protect-mcp, @veritasacta/verify.

What problem does it solve? Standard logging cannot prove what an AI agent actually did, leaving regulated teams without tamper-evident evidence of agent behavior. This cookbook walks through setting up cryptographically signed, hash-chained audit receipts on every Claude Code tool call so auditors can verify the full chain offline. ## Core Features & Use Cases - Policy-gated tool execution: A Cedar policy evaluated in a PreToolUse hook allows or denies each tool call before it runs, with explicit forbid rules for destructive commands. - Signed Ed25519 receipts: A PostToolUse hook signs JCS-canonical, hash-chained receipts for every tool call, verifiable offline with a single CLI command. - Tamper detection and CI/CD gating: Demonstrates how modifying any receipt field breaks verification, and how to gate merges on receipt chain integrity in GitHub Actions. - Use Case: A fintech team running Claude Code in CI needs to prove to auditors that a policy gate held for every automated build step; this recipe produces a verifiable receipt chain archived as a build artifact and composable with SLSA provenance. ## Quick Start Ask the assistant to walk you through setting up signed audit receipts for Claude Code tool calls using the protect-mcp hooks and a Cedar policy.

Frequently Asked Questions about signed-audit-trails-recipe

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add signed audit receipts to Claude Code tool calls?

Add PreToolUse and PostToolUse hooks in .claude/settings.json that run protect-mcp evaluate and protect-mcp sign. The sign command generates an Ed25519 key on first run and writes hash-chained receipts to a receipts directory.

How do I verify signed agent receipts offline?

Run npx @veritasacta/verify against the receipt files. Exit code 0 means all signatures and the hash chain are intact, 1 means a receipt failed signature verification, and 2 means a receipt was malformed.

What is a Cedar policy for agent tool calls?

A Cedar policy defines permit and forbid rules for tool actions such as Bash, Read, Write, and Edit. Forbid rules take precedence over permits, so destructive commands like rm -rf stay blocked even if a later rule is permissive.

Can receipts from other agent frameworks be verified the same way?

Yes. The receipt format has implementations for Claude Code, Google ADK, a Rust sandbox runtime, and CrewAI/LangChain hooks. Receipts from any of them verify against the same @veritasacta/verify tool.

What happens if someone tampers with a signed receipt?

Changing any signed field, such as flipping decision from allow to deny, invalidates the Ed25519 signature over the JCS-canonical bytes. The verifier exits with code 1 and reports which receipt failed.

When should I use protect-mcp instead of this recipe?

This recipe is the teaching walkthrough for understanding the pattern before committing. For production runtime enforcement, install the protect-mcp plugin directly and remove the fail-on-missing-policy flag so a missing policy is a hard failure.