Codex skill for writing, extending, reviewing, linting, and testing Daml templates, contracts, and Daml Script code on Daml/Canton codebases.
This skill is intentionally opinionated. It uses Canton/Daml terminology precisely, treats security as a first-class concern, prefers official Daml design patterns over ad hoc workflow design, and makes linting and tests part of the normal workflow.
The skill is meant for .daml work involving:
- templates, contracts, choices, and
script dotests - stakeholder modeling with
signatory,observer, andcontroller - visibility and privacy behavior
- explicit contract disclosure workflows
- keys and by-key authorization
- interfaces and interface views
- ledger-time logic
- upgrade-sensitive contract changes
The skill pushes the agent toward safe, reviewable Daml code rather than clever shortcuts. In practice it tells the agent to:
- read neighboring Daml modules before changing local style
- distinguish carefully between templates and active contracts
- model consent and obligations explicitly
- treat disclosure and authorization as separate concerns
- use official Daml workflow patterns when they fit the problem
- add or update tests alongside contract changes
- run
damlc linton every changed.damlfile - run package-level build and test checks before finishing
The skill assumes Daml code may control money, rights, or irreversible business actions. It therefore emphasizes:
- proposal and acceptance flows for obligation-bearing agreements
- narrow controllers and explicit re-validation of trust assumptions
- atomic settlement when partial completion would be unsafe
- deliberate observer and choice-observer disclosure
- cautious use of keys
- careful handling of ledger time and upgrade compatibility
This is a contract-authoring skill, not a full Canton operations guide. It does not try to replace participant-node hardening, package vetting, or broader deployment security work.
The skill treats the official Daml pattern catalog as the default starting point for workflow modeling. It explicitly steers the agent toward:
- Propose and Accept
- Multiple Party Agreement
- Authorization
- Delegation
- Locking
- Time Constraints
The goal is to reduce unnecessary custom workflow design when a standard Daml pattern already matches the business problem.
SKILL.md: the agent instructionsagents/openai.yaml: UI metadata for discovery and default promptingreferences/patterns.md: compact code patterns and Daml-specific pitfallsreferences/tooling.md: lint, build, test, and warning-policy guidancereferences/design-patterns.md: official Daml workflow pattern selection and references
This repository content is primarily for coding agents, but it is also written so developers can inspect the skill and understand the standards it is enforcing before they rely on it in a Daml/Canton codebase.