[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BN7088FRBCGKEYWV22S219":3,"skill-same:01M7BN7088FRBCGKEYWV22S219":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7BN7088FRBCGKEYWV22S219","signed-audit-trails-recipe",null,"Step-by-step cookbook for setting up cryptographically signed audit trails on Claude Code tool calls. Use when explaining, evaluating, or demonstrating the pattern before committing to the protect-mcp runtime hooks. Covers Cedar policy, Ed25519 receipts, offline verification, tamper detection, CI\u002FCD integration, and SLSA composition.","YYC-Cube\u002FYYC3-Knowledge-Base","YYC-Cube","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235006543?v=4","01M79J2PH4SWD2X0825X6PN748","yyc3","01M79J2PHVK3F6ZBYT8K2SCZCW",1,"MIT","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Agent-智能体\u002FYYC3-Agent-智能体-agents\u002Fplugins\u002Fsigned-audit-trails\u002Fskills\u002Fsigned-audit-trails-recipe\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: signed-audit-trails-recipe\ndescription: Step-by-step cookbook for setting up cryptographically signed audit trails on Claude Code tool calls. Use when explaining, evaluating, or demonstrating the pattern before committing to the protect-mcp runtime hooks. Covers Cedar policy, Ed25519 receipts, offline verification, tamper detection, CI\u002FCD integration, and SLSA composition.\n---\n\n# Signed Audit Trails for Claude Code Tool Calls\n\nCookbook-style walkthrough for cryptographically signed receipts on every\nClaude Code tool call. This is the teaching skill. For the runtime\nimplementation, install the [`protect-mcp`](..\u002F..\u002Fprotect-mcp\u002F) plugin.\n\n## What this gives you\n\nEvery tool call (`Bash`, `Edit`, `Write`, `WebFetch`) is:\n\n1. **Evaluated against a Cedar policy** before execution. If the policy denies\n   the call, the tool does not run.\n2. **Signed as an Ed25519 receipt** after execution. Receipts are\n   JCS-canonical, hash-chained, and verifiable offline by anyone with the\n   public key.\n\nAn auditor, regulator, or counterparty can verify the full chain later with a\nsingle CLI command (`npx @veritasacta\u002Fverify receipts\u002F*.json`). No network\ncall, no vendor lookup, no trust in the operator.\n\n## When to use the pattern\n\n- **Regulated environments** (finance, healthcare, critical infrastructure)\n  where you need tamper-evident evidence of agent behavior\n- **CI\u002FCD pipelines** where you want to prove that a policy gate held for\n  every automated build step\n- **Multi-party collaboration** where a counterparty wants to verify your\n  agent's behavior without trusting your operator\n- **Compliance contexts** (EU AI Act Article 12, SLSA provenance for\n  agent-built software) where standard logging is not sufficient\n\n## Step 1: Install the hook configuration\n\nCreate `.claude\u002Fsettings.json` in your project root:\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \".*\",\n        \"hook\": {\n          \"type\": \"command\",\n          \"command\": \"npx protect-mcp@latest evaluate --policy .\u002Fprotect.cedar --tool \\\"$TOOL_NAME\\\" --input \\\"$TOOL_INPUT\\\" --fail-on-missing-policy false\"\n        }\n      }\n    ],\n    \"PostToolUse\": [\n      {\n        \"matcher\": \".*\",\n        \"hook\": {\n          \"type\": \"command\",\n          \"command\": \"npx protect-mcp@latest sign --tool \\\"$TOOL_NAME\\\" --input \\\"$TOOL_INPUT\\\" --output \\\"$TOOL_OUTPUT\\\" --receipts .\u002Freceipts\u002F --key .\u002Fprotect-mcp.key\"\n        }\n      }\n    ]\n  }\n}\n```\n\nThe first run of `protect-mcp sign` generates `.\u002Fprotect-mcp.key` (Ed25519\nprivate key) if one does not exist. Commit the **public** key fingerprint\n(visible in any receipt's `public_key` field); do not commit the private\nkey.\n\nAdd the private key and receipt directory to `.gitignore`:\n\n```bash\necho \".\u002Fprotect-mcp.key\" >> .gitignore\necho \".\u002Freceipts\u002F\" >> .gitignore\n```\n\n## Step 2: Write a Cedar policy\n\nCreate `.\u002Fprotect.cedar`:\n\n```cedar\n\u002F\u002F Allow all read-oriented tools by default.\npermit (\n    principal,\n    action in [Action::\"Read\", Action::\"Glob\", Action::\"Grep\", Action::\"WebSearch\"],\n    resource\n);\n\n\u002F\u002F Allow Bash commands from a safe list only.\npermit (\n    principal,\n    action == Action::\"Bash\",\n    resource\n) when {\n    context.command_pattern in [\n        \"git\", \"npm\", \"pnpm\", \"yarn\", \"ls\", \"cat\", \"pwd\",\n        \"echo\", \"test\", \"node\", \"python\", \"make\"\n    ]\n};\n\n\u002F\u002F Explicit deny on destructive commands. Cedar deny is authoritative.\nforbid (\n    principal,\n    action == Action::\"Bash\",\n    resource\n) when {\n    context.command_pattern in [\"rm -rf\", \"dd\", \"mkfs\", \"shred\"]\n};\n\n\u002F\u002F Restrict writes to the project directory.\npermit (\n    principal,\n    action in [Action::\"Write\", Action::\"Edit\"],\n    resource\n) when {\n    context.path_starts_with == \".\u002F\"\n};\n```\n\nFour rules:\n\n- Read-oriented tools always allowed\n- `Bash` allowed for safe command patterns (`git`, `npm`, etc.)\n- `Bash rm -rf` and similar destructive commands explicitly denied\n- Writes allowed only within the project (`.\u002F` prefix)\n\nCedar `forbid` rules take precedence over `permit` rules, so destructive\ncommands cannot be bypassed by a later permissive rule.\n\n## Step 3: Use Claude Code normally\n\nStart Claude Code. Every tool call goes through both hooks:\n\n```\nYou: Please read the README and summarize it.\n\nClaude: I will read README.md.\n  [PreToolUse: Read .\u002FREADME.md -> allow]\n  [Tool: Read executes]\n  [PostToolUse: receipt rcpt-a8f3c9d2 signed to .\u002Freceipts\u002F]\n\n... summary of README ...\n```\n\nA session of 20 tool calls produces 20 receipts, each hash-chained to its\npredecessor.\n\n## Step 4: Inspect a receipt\n\n```bash\ncat .\u002Freceipts\u002F$(ls -t .\u002Freceipts\u002F | head -1)\n```\n\n```json\n{\n  \"receipt_id\": \"rcpt-a8f3c9d2\",\n  \"receipt_version\": \"1.0\",\n  \"issuer_id\": \"claude-code-protect-mcp\",\n  \"event_time\": \"2026-04-17T12:34:56.123Z\",\n  \"tool_name\": \"Read\",\n  \"input_hash\": \"sha256:a3f8c9d2e1b7465f...\",\n  \"decision\": \"allow\",\n  \"policy_id\": \"protect.cedar\",\n  \"policy_digest\": \"sha256:b7e2f4a6c8d0e1f3...\",\n  \"parent_receipt_id\": \"rcpt-3d1ab7c2\",\n  \"public_key\": \"4437ca56815c0516...\",\n  \"signature\": \"4cde814b7889e987...\"\n}\n```\n\nEvery field except `signature` and `public_key` is covered by the Ed25519\nsignature. Modifying any field after signing invalidates the signature.\n\n## Step 5: Verify the receipt chain\n\n```bash\nnpx @veritasacta\u002Fverify .\u002Freceipts\u002F*.json\n```\n\nExit codes:\n\n| Code | Meaning |\n|------|---------|\n| `0`  | All receipts verified; chain intact |\n| `1`  | A receipt failed signature verification (tampered, or wrong key) |\n| `2`  | A receipt was malformed |\n\n## Step 6: Demonstrate tamper detection\n\nModify any receipt's `decision` field from `allow` to `deny`:\n\n```bash\npython3 -c \"\nimport json, os\npath = '.\u002Freceipts\u002F' + sorted(os.listdir('.\u002Freceipts'))[-1]\nr = json.loads(open(path).read())\nr['decision'] = 'deny'\nopen(path, 'w').write(json.dumps(r))\n\"\n\nnpx @veritasacta\u002Fverify .\u002Freceipts\u002F*.json\n```\n\nThe verifier exits with code `1` and reports which receipt failed. The\nEd25519 signature no longer matches the JCS-canonical bytes of the\ntampered payload.\n\nRestore the field and verification passes again.\n\n## How the cryptography works\n\nThree invariants make receipts verifiable offline across any conformant\nimplementation:\n\n1. **JCS canonicalization (RFC 8785)** before signing. Keys sorted,\n   whitespace minimized, strings NFC-normalized. Two independent\n   implementations produce byte-identical signing payloads for the same\n   receipt content.\n2. **Ed25519 signatures (RFC 8032)** over the canonical bytes.\n   Deterministic, fixed-size, no nonce dependency.\n3. **Hash chain linkage.** Each receipt's `parent_receipt_hash` is the\n   SHA-256 of the predecessor's canonical form. Insertions, deletions, and\n   reorderings break later receipts.\n\nFor the formal wire format see\n[draft-farley-acta-signed-receipts](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fdraft-farley-acta-signed-receipts\u002F).\n\n## Cross-implementation interop\n\nThe receipt format has four independent implementations today:\n\n| Implementation | Language | Use case |\n|----------------|----------|----------|\n| [protect-mcp](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fprotect-mcp) | TypeScript | Claude Code, Cursor, MCP hosts |\n| [protect-mcp-adk](https:\u002F\u002Fpypi.org\u002Fproject\u002Fprotect-mcp-adk\u002F) | Python | Google Agent Development Kit |\n| [sb-runtime](https:\u002F\u002Fgithub.com\u002FScopeBlind\u002Fsb-runtime) | Rust | OS-level sandbox (Landlock + seccomp) |\n| APS governance hook | Python | CrewAI, LangChain |\n\nA receipt produced by any of them verifies against\n[`@veritasacta\u002Fverify`](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@veritasacta\u002Fverify).\nThe auditor does not need to trust the operator's tooling choice: the format\nis the contract.\n\n## CI\u002FCD integration\n\nGate merges on receipt chain verification so no build lands with a broken\nevidence chain:\n\n```yaml\n# .github\u002Fworkflows\u002Fverify-receipts.yml\nname: Verify Decision Receipts\non: [push, pull_request]\n\njobs:\n  verify:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n        with: { node-version: '20' }\n      - name: Run governed agent\n        run: python scripts\u002Frun_agent.py > receipts.jsonl\n      - name: Verify receipt chain\n        run: npx @veritasacta\u002Fverify receipts.jsonl\n```\n\nArchive the receipts as an artifact so the chain survives beyond the job run:\n\n```yaml\n      - name: Upload receipts\n        if: always()\n        uses: actions\u002Fupload-artifact@v4\n        with:\n          name: decision-receipts\n          path: receipts\u002F\n```\n\n## Composition with SLSA provenance for agent-built software\n\nWhen Claude Code builds and releases software (running `npm install`,\n`npm build`, `npm publish` as tool calls), the receipt chain is the\nper-step build log. SLSA Provenance v1 has an extension point for this: the\n`byproducts` field can reference the receipt chain alongside the build\nattestation.\n\nThe [agent-commit build type](https:\u002F\u002Frefs.arewm.com\u002Fagent-commit\u002Fv0.2)\ndocuments the pattern using the ResourceDescriptor shape:\n\n```json\n{\n  \"name\": \"decision-receipts\",\n  \"digest\": { \"sha256\": \"...\" },\n  \"uri\": \"oci:\u002F\u002Fregistry\u002Forg\u002Fbuild-xyz\u002Freceipts:sha256-...\",\n  \"annotations\": {\n    \"predicateType\": \"https:\u002F\u002Fveritasacta.com\u002Fattestation\u002Fdecision-receipt\u002Fv0.1\",\n    \"signerRole\": \"supervisor-hook\"\n  }\n}\n```\n\nThe SLSA provenance is signed by the builder identity; the receipt\nattestation is signed by the supervisor-hook identity. Two trust domains,\ncross-referenced at the byproduct layer. See\n[slsa-framework\u002Fslsa#1594](https:\u002F\u002Fgithub.com\u002Fslsa-framework\u002Fslsa\u002Fissues\u002F1594)\nfor the composition discussion.\n\n## Common pitfalls\n\n**Private key in version control.** The generated `.\u002Fprotect-mcp.key` must\nnot be committed. The examples above add it to `.gitignore`. If a key is\naccidentally committed, rotate immediately (delete the key file and let the\nhook regenerate on next run).\n\n**Hook command quoting.** The hooks receive `$TOOL_NAME` and `$TOOL_INPUT`\nas environment variables. Keep the quoting `\"$TOOL_INPUT\"` so inputs with\nspaces or special characters pass through intact.\n\n**Receipts directory in CI.** If Claude Code runs in CI, upload receipts as\nan artifact at the end of the job or the chain is lost at job end.\n\n**Policy is missing.** The example `PreToolUse` hook uses\n`--fail-on-missing-policy false` so an absent `.\u002Fprotect.cedar` does not\nbreak Claude Code out of the box. Remove this flag in production so a\nmissing policy is treated as a hard failure.\n\n## Related in this marketplace\n\n- [`protect-mcp`](..\u002F..\u002Fprotect-mcp\u002F) — the runtime hook implementation\n  (use this plugin in production)\n- [`review-agent-governance`](..\u002F..\u002Freview-agent-governance\u002F) — require\n  human approval before review-surface actions; composes with protect-mcp\n\n## References\n\n- [`draft-farley-acta-signed-receipts`](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fdraft-farley-acta-signed-receipts\u002F) — IETF draft, receipt wire format\n- [RFC 8032](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc8032) — Ed25519\n- [RFC 8785](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc8785) — JCS\n- [Cedar policy language](https:\u002F\u002Fdocs.cedarpolicy.com\u002F)\n- [protect-mcp on npm](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fprotect-mcp)\n- [@veritasacta\u002Fverify on npm](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@veritasacta\u002Fverify)\n- [in-toto\u002Fattestation#549](https:\u002F\u002Fgithub.com\u002Fin-toto\u002Fattestation\u002Fpull\u002F549) — Decision Receipt predicate proposal\n- [agent-commit build type](https:\u002F\u002Frefs.arewm.com\u002Fagent-commit\u002Fv0.2) — SLSA provenance for agent-produced commits\n- [Microsoft Agent Governance Toolkit](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-governance-toolkit) (`examples\u002Fprotect-mcp-governed\u002F`)\n- [AWS Cedar for Agents](https:\u002F\u002Fgithub.com\u002Fcedar-policy\u002Fcedar-for-agents)\n","# Signed Audit Trails for Claude Code Tool Calls\n\nCookbook-style walkthrough for cryptographically signed receipts on every\nClaude Code tool call. This is the teaching skill. For the runtime\nimplementation, install the [`protect-mcp`](..\u002F..\u002Fprotect-mcp\u002F) plugin.\n\n## What this gives you\n\nEvery tool call (`Bash`, `Edit`, `Write`, `WebFetch`) is:\n\n1. **Evaluated against a Cedar policy** before execution. If the policy denies\n   the call, the tool does not run.\n2. **Signed as an Ed25519 receipt** after execution. Receipts are\n   JCS-canonical, hash-chained, and verifiable offline by anyone with the\n   public key.\n\nAn auditor, regulator, or counterparty can verify the full chain later with a\nsingle CLI command (`npx @veritasacta\u002Fverify receipts\u002F*.json`). No network\ncall, no vendor lookup, no trust in the operator.\n\n## When to use the pattern\n\n- **Regulated environments** (finance, healthcare, critical infrastructure)\n  where you need tamper-evident evidence of agent behavior\n- **CI\u002FCD pipelines** where you want to prove that a policy gate held for\n  every automated build step\n- **Multi-party collaboration** where a counterparty wants to verify your\n  agent's behavior without trusting your operator\n- **Compliance contexts** (EU AI Act Article 12, SLSA provenance for\n  agent-built software) where standard logging is not sufficient\n\n## Step 1: Install the hook configuration\n\nCreate `.claude\u002Fsettings.json` in your project root:\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \".*\",\n        \"hook\": {\n          \"type\": \"command\",\n          \"command\": \"npx protect-mcp@latest evaluate --policy .\u002Fprotect.cedar --tool \\\"$TOOL_NAME\\\" --input \\\"$TOOL_INPUT\\\" --fail-on-missing-policy false\"\n        }\n      }\n    ],\n    \"PostToolUse\": [\n      {\n        \"matcher\": \".*\",\n        \"hook\": {\n          \"type\": \"command\",\n          \"command\": \"npx protect-mcp@latest sign --tool \\\"$TOOL_NAME\\\" --input \\\"$TOOL_INPUT\\\" --output \\\"$TOOL_OUTPUT\\\" --receipts .\u002Freceipts\u002F --key .\u002Fprotect-mcp.key\"\n        }\n      }\n    ]\n  }\n}\n```\n\nThe first run of `protect-mcp sign` generates `.\u002Fprotect-mcp.key` (Ed25519\nprivate key) if one does not exist. Commit the **public** key fingerprint\n(visible in any receipt's `public_key` field); do not commit the private\nkey.\n\nAdd the private key and receipt directory to `.gitignore`:\n\n```bash\necho \".\u002Fprotect-mcp.key\" >> .gitignore\necho \".\u002Freceipts\u002F\" >> .gitignore\n```\n\n## Step 2: Write a Cedar policy\n\nCreate `.\u002Fprotect.cedar`:\n\n```cedar\n\u002F\u002F Allow all read-oriented tools by default.\npermit (\n    principal,\n    action in [Action::\"Read\", Action::\"Glob\", Action::\"Grep\", Action::\"WebSearch\"],\n    resource\n);\n\n\u002F\u002F Allow Bash commands from a safe list only.\npermit (\n    principal,\n    action == Action::\"Bash\",\n    resource\n) when {\n    context.command_pattern in [\n        \"git\", \"npm\", \"pnpm\", \"yarn\", \"ls\", \"cat\", \"pwd\",\n        \"echo\", \"test\", \"node\", \"python\", \"make\"\n    ]\n};\n\n\u002F\u002F Explicit deny on destructive commands. Cedar deny is authoritative.\nforbid (\n    principal,\n    action == Action::\"Bash\",\n    resource\n) when {\n    context.command_pattern in [\"rm -rf\", \"dd\", \"mkfs\", \"shred\"]\n};\n\n\u002F\u002F Restrict writes to the project directory.\npermit (\n    principal,\n    action in [Action::\"Write\", Action::\"Edit\"],\n    resource\n) when {\n    context.path_starts_with == \".\u002F\"\n};\n```\n\nFour rules:\n\n- Read-oriented tools always allowed\n- `Bash` allowed for safe command patterns (`git`, `npm`, etc.)\n- `Bash rm -rf` and similar destructive commands explicitly denied\n- Writes allowed only within the project (`.\u002F` prefix)\n\nCedar `forbid` rules take precedence over `permit` rules, so destructive\ncommands cannot be bypassed by a later permissive rule.\n\n## Step 3: Use Claude Code normally\n\nStart Claude Code. Every tool call goes through both hooks:\n\n```\nYou: Please read the README and summarize it.\n\nClaude: I will read README.md.\n  [PreToolUse: Read .\u002FREADME.md -> allow]\n  [Tool: Read executes]\n  [PostToolUse: receipt rcpt-a8f3c9d2 signed to .\u002Freceipts\u002F]\n\n... summary of README ...\n```\n\nA session of 20 tool calls produces 20 receipts, each hash-chained to its\npredecessor.\n\n## Step 4: Inspect a receipt\n\n```bash\ncat .\u002Freceipts\u002F$(ls -t .\u002Freceipts\u002F | head -1)\n```\n\n```json\n{\n  \"receipt_id\": \"rcpt-a8f3c9d2\",\n  \"receipt_version\": \"1.0\",\n  \"issuer_id\": \"claude-code-protect-mcp\",\n  \"event_time\": \"2026-04-17T12:34:56.123Z\",\n  \"tool_name\": \"Read\",\n  \"input_hash\": \"sha256:a3f8c9d2e1b7465f...\",\n  \"decision\": \"allow\",\n  \"policy_id\": \"protect.cedar\",\n  \"policy_digest\": \"sha256:b7e2f4a6c8d0e1f3...\",\n  \"parent_receipt_id\": \"rcpt-3d1ab7c2\",\n  \"public_key\": \"4437ca56815c0516...\",\n  \"signature\": \"4cde814b7889e987...\"\n}\n```\n\nEvery field except `signature` and `public_key` is covered by the Ed25519\nsignature. Modifying any field after signing invalidates the signature.\n\n## Step 5: Verify the receipt chain\n\n```bash\nnpx @veritasacta\u002Fverify .\u002Freceipts\u002F*.json\n```\n\nExit codes:\n\n| Code | Meaning |\n|------|---------|\n| `0`  | All receipts verified; chain intact |\n| `1`  | A receipt failed signature verification (tampered, or wrong key) |\n| `2`  | A receipt was malformed |\n\n## Step 6: Demonstrate tamper detection\n\nModify any receipt's `decision` field from `allow` to `deny`:\n\n```bash\npython3 -c \"\nimport json, os\npath = '.\u002Freceipts\u002F' + sorted(os.listdir('.\u002Freceipts'))[-1]\nr = json.loads(open(path).read())\nr['decision'] = 'deny'\nopen(path, 'w').write(json.dumps(r))\n\"\n\nnpx @veritasacta\u002Fverify .\u002Freceipts\u002F*.json\n```\n\nThe verifier exits with code `1` and reports which receipt failed. The\nEd25519 signature no longer matches the JCS-canonical bytes of the\ntampered payload.\n\nRestore the field and verification passes again.\n\n## How the cryptography works\n\nThree invariants make receipts verifiable offline across any conformant\nimplementation:\n\n1. **JCS canonicalization (RFC 8785)** before signing. Keys sorted,\n   whitespace minimized, strings NFC-normalized. Two independent\n   implementations produce byte-identical signing payloads for the same\n   receipt content.\n2. **Ed25519 signatures (RFC 8032)** over the canonical bytes.\n   Deterministic, fixed-size, no nonce dependency.\n3. **Hash chain linkage.** Each receipt's `parent_receipt_hash` is the\n   SHA-256 of the predecessor's canonical form. Insertions, deletions, and\n   reorderings break later receipts.\n\nFor the formal wire format see\n[draft-farley-acta-signed-receipts](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fdraft-farley-acta-signed-receipts\u002F).\n\n## Cross-implementation interop\n\nThe receipt format has four independent implementations today:\n\n| Implementation | Language | Use case |\n|----------------|----------|----------|\n| [protect-mcp](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fprotect-mcp) | TypeScript | Claude Code, Cursor, MCP hosts |\n| [protect-mcp-adk](https:\u002F\u002Fpypi.org\u002Fproject\u002Fprotect-mcp-adk\u002F) | Python | Google Agent Development Kit |\n| [sb-runtime](https:\u002F\u002Fgithub.com\u002FScopeBlind\u002Fsb-runtime) | Rust | OS-level sandbox (Landlock + seccomp) |\n| APS governance hook | Python | CrewAI, LangChain |\n\nA receipt produced by any of them verifies against\n[`@veritasacta\u002Fverify`](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@veritasacta\u002Fverify).\nThe auditor does not need to trust the operator's tooling choice: the format\nis the contract.\n\n## CI\u002FCD integration\n\nGate merges on receipt chain verification so no build lands with a broken\nevidence chain:\n\n```yaml\n# .github\u002Fworkflows\u002Fverify-receipts.yml\nname: Verify Decision Receipts\non: [push, pull_request]\n\njobs:\n  verify:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n        with: { node-version: '20' }\n      - name: Run governed agent\n        run: python scripts\u002Frun_agent.py > receipts.jsonl\n      - name: Verify receipt chain\n        run: npx @veritasacta\u002Fverify receipts.jsonl\n```\n\nArchive the receipts as an artifact so the chain survives beyond the job run:\n\n```yaml\n      - name: Upload receipts\n        if: always()\n        uses: actions\u002Fupload-artifact@v4\n        with:\n          name: decision-receipts\n          path: receipts\u002F\n```\n\n## Composition with SLSA provenance for agent-built software\n\nWhen Claude Code builds and releases software (running `npm install`,\n`npm build`, `npm publish` as tool calls), the receipt chain is the\nper-step build log. SLSA Provenance v1 has an extension point for this: the\n`byproducts` field can reference the receipt chain alongside the build\nattestation.\n\nThe [agent-commit build type](https:\u002F\u002Frefs.arewm.com\u002Fagent-commit\u002Fv0.2)\ndocuments the pattern using the ResourceDescriptor shape:\n\n```json\n{\n  \"name\": \"decision-receipts\",\n  \"digest\": { \"sha256\": \"...\" },\n  \"uri\": \"oci:\u002F\u002Fregistry\u002Forg\u002Fbuild-xyz\u002Freceipts:sha256-...\",\n  \"annotations\": {\n    \"predicateType\": \"https:\u002F\u002Fveritasacta.com\u002Fattestation\u002Fdecision-receipt\u002Fv0.1\",\n    \"signerRole\": \"supervisor-hook\"\n  }\n}\n```\n\nThe SLSA provenance is signed by the builder identity; the receipt\nattestation is signed by the supervisor-hook identity. Two trust domains,\ncross-referenced at the byproduct layer. See\n[slsa-framework\u002Fslsa#1594](https:\u002F\u002Fgithub.com\u002Fslsa-framework\u002Fslsa\u002Fissues\u002F1594)\nfor the composition discussion.\n\n## Common pitfalls\n\n**Private key in version control.** The generated `.\u002Fprotect-mcp.key` must\nnot be committed. The examples above add it to `.gitignore`. If a key is\naccidentally committed, rotate immediately (delete the key file and let the\nhook regenerate on next run).\n\n**Hook command quoting.** The hooks receive `$TOOL_NAME` and `$TOOL_INPUT`\nas environment variables. Keep the quoting `\"$TOOL_INPUT\"` so inputs with\nspaces or special characters pass through intact.\n\n**Receipts directory in CI.** If Claude Code runs in CI, upload receipts as\nan artifact at the end of the job or the chain is lost at job end.\n\n**Policy is missing.** The example `PreToolUse` hook uses\n`--fail-on-missing-policy false` so an absent `.\u002Fprotect.cedar` does not\nbreak Claude Code out of the box. Remove this flag in production so a\nmissing policy is treated as a hard failure.\n\n## Related in this marketplace\n\n- [`protect-mcp`](..\u002F..\u002Fprotect-mcp\u002F) — the runtime hook implementation\n  (use this plugin in production)\n- [`review-agent-governance`](..\u002F..\u002Freview-agent-governance\u002F) — require\n  human approval before review-surface actions; composes with protect-mcp\n\n## References\n\n- [`draft-farley-acta-signed-receipts`](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fdraft-farley-acta-signed-receipts\u002F) — IETF draft, receipt wire format\n- [RFC 8032](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc8032) — Ed25519\n- [RFC 8785](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc8785) — JCS\n- [Cedar policy language](https:\u002F\u002Fdocs.cedarpolicy.com\u002F)\n- [protect-mcp on npm](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fprotect-mcp)\n- [@veritasacta\u002Fverify on npm](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@veritasacta\u002Fverify)\n- [in-toto\u002Fattestation#549](https:\u002F\u002Fgithub.com\u002Fin-toto\u002Fattestation\u002Fpull\u002F549) — Decision Receipt predicate proposal\n- [agent-commit build type](https:\u002F\u002Frefs.arewm.com\u002Fagent-commit\u002Fv0.2) — SLSA provenance for agent-produced commits\n- [Microsoft Agent Governance Toolkit](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-governance-toolkit) (`examples\u002Fprotect-mcp-governed\u002F`)\n- [AWS Cedar for Agents](https:\u002F\u002Fgithub.com\u002Fcedar-policy\u002Fcedar-for-agents)\n",{"name":5,"description":7},"main","87afe6ce96220accf50a345dea46784c8c9f210e","YYC3-Agent-智能体\u002FYYC3-Agent-智能体-agents\u002Fplugins\u002Fsigned-audit-trails\u002Fskills\u002Fsigned-audit-trails-recipe",0,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base","https:\u002F\u002Fkb.yyc3.top\u002F","https:\u002F\u002Fgithub.com\u002FYYC-Cube","万象归元于云枢 | 深栈智启新纪元","2026-11-10 10:37:32",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill signed-audit-trails-recipe",{"tool":39,"command":40},"bunx","bunx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill signed-audit-trails-recipe",{"tool":42,"command":43},"pnpm","pnpm dlx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill signed-audit-trails-recipe","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Agent-智能体\u002FYYC3-Agent-智能体-agents\u002Fplugins\u002Fsigned-audit-trails\u002Fskills\u002Fsigned-audit-trails-recipe\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7CTDWHERCXPQCP0K03A86AS","vercel-sandbox","Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"microVM Chrome\", \"agent-browser in sandbox\", \"browser automation on Vercel\", or any task requiring Chrome in a Vercel Sandbox.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fvercel-sandbox\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7CTD8D2BNJY54S65M47HEJA","slack","Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include \"check my Slack\", \"what channels have unreads\", \"send a message to\", \"search Slack for\", \"extract from Slack\", \"find who said\", or any task requiring programmatic Slack interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fslack\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7CTCSSB8ZP3Q58C3YZDZK1W","electron","Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include \"automate Slack app\", \"control VS Code\", \"interact with Discord app\", \"test this Electron app\", \"connect to desktop app\", or any task requiring automation of a native Electron application.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Felectron\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7CTCBJY76688V4DCZGWFHGQ","dogfood","Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to \"dogfood\", \"QA\", \"exploratory test\", \"find issues\", \"bug hunt\", \"test this app\u002Fsite\u002Fplatform\", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fdogfood\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7CTC4H0FFGVEAQR9PA4GA1A","agent-browser","Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to \"open a website\", \"fill out a form\", \"click a button\", \"take a screenshot\", \"scrape data from a page\", \"test this web app\", \"login to a site\", \"automate browser actions\", or any task requiring programmatic web interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fagent-browser\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7CTBKVFYBG78FDSABSDJTTQ","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn\u002Fui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for \"shadcn init\", \"create an app with --preset\", \"switch to --preset\", and for building a design system or applying a DESIGN.md or brand spec to shadcn\u002Fui.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-UI-界面组件\u002FYYC3-UI-界面组件-ui\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[]]