contract-key-safety

contract-key-safety is a skill for Claude Code, Codex from PlamenTSV/plamen. It costs 35 tokens per session (1,559 once invoked), scanned A, original, MIT.

A security review guide for DAML contract keys, which identify contract instances and specify who maintains them.

In plain words
What is it for?
Use it to inventory keyed templates, check that maintainers are signatories, and inspect code that creates state after a failed key lookup.
Why use it?
It helps catch duplicate-state bugs caused by treating an unseen contract as nonexistent, as well as cases where maintainers lack the required authority.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to inventory keyed templates, check that maintainers are signatories, and inspect code that creates state after a failed key lookup.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/plamentsv/plamen/contract-key-safety
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PlamenTSV/plamen --skill contract-key-safety
Clone the repo
git clone --depth 1 https://github.com/PlamenTSV/plamen

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for contract-key-safety

README.md
[![agentmods](https://agentmods.dev/badge/skills/plamentsv/plamen/contract-key-safety/github.svg)](https://agentmods.dev/skills/plamentsv/plamen/contract-key-safety)
Your own site
<a href="https://agentmods.dev/skills/plamentsv/plamen/contract-key-safety"><img src="https://agentmods.dev/badge/skills/plamentsv/plamen/contract-key-safety/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for contract-key-safety

Your own site · 80×15
<a href="https://agentmods.dev/skills/plamentsv/plamen/contract-key-safety"><img src="https://agentmods.dev/badge/skills/plamentsv/plamen/contract-key-safety.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,559 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.01559
Opus 5 $0.00017 $0.00779
Sonnet 5 $0.00007 $0.00312
Haiku 4.5 $0.00003 $0.00156

Measured 9d ago against content hash a0d73771d819, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

contract-key-safety scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/skills/daml/contract-key-safety/SKILL.md · 91 lines

How it starts

The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CONTRACT_KEY_SAFETY Skill (DAML)

Trigger Pattern: Always required for DAML audits — self-skip if no template defines a key Inject Into: Breadth agents, depth-state-trace Finding prefix: [DML-CK-N] Rules referenced: R8, R12

A DAML contract key is a uniqueness handle plus a maintainer set. The single most dangerous DAML key bug is the lookupByKey false-None: a None result means "no contract with this key is visible to the reading parties" — NOT "no such contract exists". A choice that treats None as "absent" and creates fresh state can mint duplicates. Additionally, maintainer parties MUST be signatories of the keyed contract; a maintainer/signatory gap breaks key authority. If no template in scope defines a key, this skill self-skips (every section ✗(N/A — no keyed templates)).

1. Key + Maintainer Inventory

For every template that defines a key:

Template Key Type/Expr Maintainer Expr Maintainers ⊆ Signatories? Key Globally Unique? Finding?
{T} key (owner, id) : (Party, Text) maintainer key._1 YES/NO YES/NO [DML-CK-N] if maintainer not signatory

Critical patterns to flag:

  • A maintainer party that is NOT in the template's signatory set — DAML requires maintainers be signatories; if the code attempts otherwise it will not compile, but a refactor that drops a signatory while keeping the maintainer is a latent break. Verify the binding holds.
  • A key whose maintainer set is a single party where the keyed value represents joint state (one party can unilaterally re-key).

DAML note: A negative lookupByKey (the None branch) requires the maintainers' authority to assert non-existence. If the reading party is not a maintainer, they cannot get an authoritative None.

2. lookupByKey False-None Audit

For every lookupByKey/visibleByKey call, determine what the None branch does and whether None is correctly interpreted:

Read the full file on GitHub · 91 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 91 lines · 35 tokens per session scan A a0d73771d819

Subscribe to this mod's changes

contract-key-safety is a skill published in the GitHub repository PlamenTSV/plamen (294 stars, last pushed yesterday), licensed MIT. It adds 35 tokens to every session and 1,559 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

prowler-compliance

Creates, syncs, audits and manages Prowler compliance frameworks end-to-end. Covers the two supported JSON schemas (universal multi-provider and legacy per-provider), the SDK model tree (legacy attribute classes, universal ComplianceFramework, ConfigRequirements guardrails), output formatters (legacy per-framework +…

prowler-cloud/prowler · 227 tokens

jsonapi

Strict JSON:API v1.1 specification compliance. Trigger: When creating or modifying API endpoints, reviewing API responses, or validating JSON:API compliance.

prowler-cloud/prowler · 34 tokens

prowler-compliance-review

Reviews Pull Requests that add or modify compliance frameworks. Trigger: When reviewing PRs with compliance framework changes, CIS/NIST/PCI-DSS additions, or compliance JSON files.

prowler-cloud/prowler · 41 tokens

prowler-readme-table

Updates the "Prowler at a Glance" table in README.md with accurate provider statistics. Trigger: When updating README.md provider stats, checks count, services count, compliance frameworks, or categories.

prowler-cloud/prowler · 47 tokens

tax-lawyer-au-crypto

Australian crypto tax treatment per ATO guidance QC 53725. Crypto assets are CGT assets under ITAA 1997 s 108-5. Each disposal triggers CGT event A1. Covers personal-use exception, trading stock test, and the 50% CGT discount.

elasticdotventures/_b00t_ · 67 tokens

law-18-07-auditor

A strict legal auditor for the Algerian Law 18-07 & Law 25-11 amendments on personal data protection, image publication rules (ANPDP Délibération 04/2026), and data sovereignty.

karim-embarek/antigravity-operator · 54 tokens