К основному содержанию
скилл Claude Code

agent-decision-receipts — скилл для Claude Code: суть и установка

Создаёт квитанции с Ed25519 и постквантовой подписью на важные действия агента вроде деплоя или переводов. Позволяет подтвердить решение оффлайн по одному сертификату.

Установить в Claude Code · Через маркетплейс плагинов Все способы и платформы ↓
/plugin marketplace add alirezarezvani/claude-skills
/plugin install ra-qm-skills@claude-code-skills
Открыть на GitHub

Что делает agent-decision-receipts

Обычные логи легко подделать задним числом. Скилл решает эту проблему: он формирует манифест действия с параметрами agent_id, operation, target и policy, после чего подписывает его прямо в момент выполнения. Проверка проходит автономно. Ни база данных, ни обращение к серверу выпуска для этого не нужны.

Криптографическую работу выполняет библиотека openagentontology. При установке пакета openagentontology[pq] к стандартной Ed25519 добавляются алгоритмы ML-DSA-65 и SLH-DSA. Сам скилл даёт три шага: проверить необходимость квитанции, собрать манифест через скрипт scripts/build_action_manifest.py и верифицировать результат.

Ставить скилл имеет смысл, если агент выполняет необратимые операции или проект подпадает под требования Article 12 в EU AI Act. Для простых скриптов чтения данных он избыточен.

Какие задачи решает

  • Зафиксировать деплой, удаление данных или денежную транзакцию агента
  • Подтвердить соблюдение требований Article 12 регламента EU AI Act
  • Проверить подлинность операции агента оффлайн без обращения к серверу
  • Защитить историю решений агента от правок задним числом

Примеры запросов агенту

  • Собери манифест для операции deploy на target prod/api и выпусти квитанцию
  • Проверь подписи в receipt.json и убедись, что хеш валиден
  • Определи, нужна ли квитанция для операции удаления базы данных

Как установить agent-decision-receipts

1Через маркетплейс плагинов

/plugin marketplace add alirezarezvani/claude-skills
/plugin install ra-qm-skills@claude-code-skills

Команда ставит плагин ra-qm-skills целиком, со всеми его скиллами

2Через Skills CLI (Vercel)

npx skills add alirezarezvani/claude-skills --skill agent-decision-receipts -a claude-code

3Вручную: положить файлы

~/.claude/skills/agent-decision-receipts/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/agent-decision-receipts/

Из того же набора349

Весь набор →
engineering-skills Alireza Rezvani Каталог инженерных скиллов для Claude Code: помогает выбрать роль под задачу и загрузить только нужный SKILL.md. Подходит для архитектуры, тестов, DevOps и работы с данными. Claude Code 2 387установок finance-skills Alireza Rezvani Маршрутизирует финансовые запросы между тремя скиллами бандла: financial-analyst, saas-metrics-coach и month-end-close. Claude Code 2 312установок marketing-skills Alireza Rezvani Каталог и роутер для маркетинговых скиллов в Claude Code. Помогает выбрать нужный скилл для SEO, контента, CRO, каналов и других задач. Claude Code 2 264установок business-growth-skills Alireza Rezvani Маршрутизирует запросы по продажам и клиентскому сервису между четырьмя специализированными скиллами плагина в Claude Code. Claude Code 2 189установок engineering-advanced-skills Alireza Rezvani Индекс из 37 инженерных скиллов для архитектуры, автоматизации, надёжности и платформенных задач. Пригодится, когда проекту нужны отдельные рабочие сценарии. Claude Code 2 019установок product-skills Alireza Rezvani Оркестратор продуктовой работы для Claude Code. Маршрутизирует задачи между 16 направлениями и проверяет дерево возможностей скриптами. Claude Code 1 994установок pm-skills Alireza Rezvani Оркестрирует проектную работу через 8 PM-скиллов: Jira, Confluence, спринты, отчёты и коммуникации. Подходит для маршрутизации запросов и контроля delivery-цикла. Claude Code 1 975установок senior-backend Alireza Rezvani Скилл помогает проектировать архитектуру бэкенда, настраивать REST API и оптимизировать базы данных. Пригодится при создании роутов, ревью кода и нагрузочном тестировании. Claude Code 1 674установок

Похожие

application-integration-troubleshooting официальный google Диагностирует сбои, зависания и тихие ошибки в Google Cloud Application Integration и Integration Connectors. Нужен, когда HTTP 200 не означает выполненную работу. Claude Code Gemini CLI CX Codex 16установок signing-entitlements официальный OpenAI Диагностирует ошибки подписи кода, бандлов, песочницы и Gatekeeper в macOS. Пригодится, когда готовое приложение не запускается или отклоняется системой. CX Codex GP ChatGPT 60установок packaging-notarization официальный OpenAI Скилл помогает проверить архив macOS-приложения, подпись и готовность к нотариальному заверению. Пригодится перед распространением приложения или при разборе сбоев, возникающих только после сборки. CX Codex GP ChatGPT 56установок supabase-postgres-best-practices официальный supabase Скилл содержит правила оптимизации Postgres от команды Supabase. Помогает писать SQL-запросы, проектировать схемы и настраивать RLS. CX Codex GP ChatGPT 40установок security-scan официальный OpenAI Проводит однопроходный аудит безопасности репозитория или заданной области кода. Пригодится для общей проверки без анализа diff. CX Codex GP ChatGPT 39установок stripe-best-practices официальный Stripe Рекомендации по интеграции Stripe для Codex: выбор API, настройка подписок, налогов и безопасность ключей. CX Codex GP ChatGPT 36установок git-guardrails-claude-code Matt Pocock Скилл ставит хук Claude Code, который останавливает опасные Git-команды до их запуска. Нужен, если агент не должен делать push или удалять изменения. Claude Code 499 069установок ponytail-review DietrichGebert Скилл проверяет изменения глубже обычного diff: читает связанный код, ищет ошибки, риски, проблемы нагрузки и недостающие тесты. Пригодится для ревью PR и коммитов. Claude Code CX Codex Cursor +1 56 300установок

Вопросы о agent-decision-receipts

Как установить agent-decision-receipts в Claude Code?

Выполните команду /plugin marketplace add alirezarezvani/claude-skills или добавьте скилл через npx skills add alirezarezvani/claude-skills --skill agent-decision-receipts -a claude-code. Для генерации подписей также потребуется выполнить pip install "openagentontology[pq]".

Чем квитанция отличается от обычной записи в логах?

Логи описывают произошедшее постфактум и могут быть отредактированы без следа. Квитанция подписывается криптографически в момент действия, поэтому любое изменение параметров манифеста нарушает хеш и делает проверку невалидной.

Какие зависимости нужны для работы скилла?

Скрипт сборки манифеста использует только стандартную библиотеку Python. Для шагов выпуска и проверки квитанции оператор отдельно устанавливает пакет openagentontology.

Исходный текст

SKILL.md · MIT
---
name: "agent-decision-receipts"
description: "Mint a tamper-evident, post-quantum-signed receipt for a consequential agent action (deploy, delete, pay, grant-access, model decision) so it can be verified later from the certificate alone. Use when an autonomous agent takes a side-effecting action that may need to be proven later, or when satisfying EU AI Act Article 12 record-keeping. Three decisions: whether an action needs a receipt, minting it, verifying it. Signing is delegated to the open-source OpenAgentOntology package. Not after-the-fact log analysis; not a hosted notary; not a legal opinion."
---

# Agent Decision Receipts

## Overview

A log says an action happened. A **receipt is tamper-evident**: it records who, what, and under which policy, and it is signed, so any later edit breaks the signature. This skill mints one for a consequential agent action and verifies it later from the certificate alone: no database, no network, no trusting the issuer.

The crypto is not in this skill. It is the open-source **OpenAgentOntology** receipt primitive (Apache-2.0), which signs every receipt with Ed25519 **and** the post-quantum legs ML-DSA-65 (FIPS 204) + SLH-DSA (FIPS 205) when the post-quantum backend is installed. This skill is the decision layer: when to mint, what to put in, how to verify. One install, no per-skill crypto.

**Three decisions, nothing else:**

1. **Does this action need a receipt?** — side-effecting + consequential + later-provable = yes.
2. **Mint the receipt** — build the action manifest, sign it with the OAO primitive.
3. **Verify it** — recompute the hash, check each signature leg, from the cert alone.

This skill is **NOT log analysis.** Logs describe what happened and can be silently edited. A receipt is minted before/at execution and breaks if edited. Use logs for debugging; use receipts for evidence.

This skill is **NOT a hosted notary.** It mints a LOCAL, self-signed receipt anyone can verify offline. Cross-organization verification (one org proving to another) is a separate hosted service, out of scope here.

This skill is **NOT a legal opinion.** It produces evidence shaped to support FRE 902(13)/(14)-style certification and EU AI Act Article 12 record-keeping. Whether a given receipt is admitted is a question for counsel.

## Quick Start

```bash
# Install the open-source receipt primitive (Apache-2.0). Add [pq] for the post-quantum legs.
pip install "openagentontology[pq]"

# 1. Build + validate an action manifest (stdlib only, no crypto, no network)
python scripts/build_action_manifest.py --agent my-deploy-agent --operation deploy \
    --target prod/api --policy "EU AI Act Art 12" --out action.json

# 2. Mint the receipt over it (Ed25519 + post-quantum legs)
python -c "import json,openagentontology.receipt as r; \
  print(json.dumps(r.mint_receipt(json.load(open('action.json')), decision='ACTION_GOVERNED')))" > receipt.json

# 3. Verify from the cert alone (no DB, no network)
python -c "import json,openagentontology.receipt as r; \
  print(r.verify_receipt(json.load(open('receipt.json'))))"
# -> {'ok': True, 'sig_ok': True, ... 'reason': 'verified from the cert alone via: ed25519, ml_dsa, slh_dsa'}
```

> **Dependency note.** This skill delegates the signing to `openagentontology` (Apache-2.0, opt-in `pip install`). The script shipped here is stdlib-only and adds no repo dependency; the package is installed by the operator (BYO-library pattern). If it is not installed, the build step still works — only minting/verifying require it.

## Core Workflow

The three decisions below are the skill: decide whether to receipt, mint, then verify.

## Decision 1: Does this action need a receipt?

Mint a receipt when the action is **all three** of:

| Test | Mint if... |
|------|-----------|
| Side-effecting | it writes, sends, deploys, deletes, pays, grants access, or changes external state |
| Consequential | a wrong call costs money, breaks compliance, or harms a person |
| Later-provable | someone (auditor, insurer, regulator, court, counterparty) may ask "what did the agent do and why?" |

Read-only, reversible, trivial actions do **not** need a receipt. Receipt everything and the signal drowns; receipt nothing and the one call that mattered cannot be proven.

High-signal triggers (mint by default): `deploy`, `delete`, `pay`/`wire`/`refund`, `grant_access`, `export`/`egress`, `approve`/`deny` a claim, any model decision that affects a person under a high-risk AI system.

## Decision 2: Mint the receipt

The action manifest is any ASCII-safe dict describing what the agent did. Four keys are **required** — `build_action_manifest.py` rejects the manifest (exit 2) if any is missing. Two more are added automatically:

| Key | Required? | What it carries |
|-----|-----------|-----------------|
| `agent_id` | **required** | the acting agent |
| `operation` | **required** | the verb (deploy / delete / pay / decide / ...) |
| `target` | **required** | what it acted on |
| `policy` | **required** | the rule that governs it (e.g. "EU AI Act Art 12", "internal change-control") |
| `inputs_hash` | auto-added | a hash of `--inputs`, so the full payload need not be stored in the clear (defaults to the hash of empty when `--inputs` is omitted) |
| `decision_label` | auto-added | the receipt decision label (defaults to `ACTION_GOVERNED`) |

`mint_receipt(manifest, decision=...)` hashes the full manifest into the receipt evidence, signs the canonical body, and returns a receipt that carries: `evidence_hash`, `signature_b64` (Ed25519), and — when `[pq]` is installed — `ml_dsa_signature_b64` + `slh_dsa_signature_b64`. Each leg signs the same bytes; any one verifying proves authenticity.

> See [references/receipt-fields.md](references/receipt-fields.md) for the full receipt schema and the post-quantum rationale.

## Decision 3: Verify it

`verify_receipt(receipt)` recomputes `sha256(canonical(evidence))`, compares it to `evidence_hash`, then checks every signature leg it has a backend for. It returns `{ok, hash_ok, sig_ok, legs, reason}`. A single edited byte anywhere in the action breaks `hash_ok`; a forged signature breaks the leg. Verification needs only the receipt — no call back to the issuer.

This is the property that makes it evidence: a reviewer who distrusts the issuer can still confirm the receipt is intact and authentic, entirely offline.

## Anti-Patterns

- **Receipt the log, not the decision.** Minting a receipt over a log line written after the fact proves nothing. Mint at the point of action, over the action.
- **Storing the signing key next to the receipts.** If the key is compromised, signatures mean nothing. Treat the key like any signing secret; never commit it.
- **Ed25519-only when the post-quantum legs are available.** A receipt is long-lived evidence. Sign it once with the post-quantum legs (ML-DSA-65 + SLH-DSA) so it stays verifiable if a future quantum computer could break Ed25519. Install `[pq]`.
- **Putting raw secrets or PII in the manifest.** The manifest is hashed into evidence and is recoverable from the receipt. Carry hashes (`inputs_hash`), not the cleartext.
- **Calling it "admissible."** It is evidence shaped to *support* FRE 902(13)/(14)-style certification. Admissibility is a court's decision, not the tool's claim.
- **Faking a signature when crypto is missing.** The primitive emits an explicit `unsigned` flag instead. Never present an unsigned receipt as signed.

## Cross-References

- `ra-qm-team/skills/eu-ai-act-specialist/` — decide the AI system's risk tier and Article 12 obligations; this skill mints the per-action record those obligations require.
- `ra-qm-team/skills/iso42001-specialist/` — the AI management-system controls; receipts are the per-decision evidence those controls call for.
- OpenAgentOntology (Apache-2.0): the open receipt primitive this skill drives — `pip install "openagentontology[pq]"`.

© Alireza Rezvani · MIT · alirezarezvani/claude-skills

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой