Audit Exception Safety
ben-manes/caffeine
Audit exception safety and failure atomicity across all throw sites
Trigger Pattern Always required for DAML audits - Inject Into Breadth agents, depth-external, depth-edge-case
$ npx skills add PlamenTSV/plamen --skill cid-capability-safety -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install PlamenTSV/plamen cid-capability-safety --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/skills/daml/cid-capability-safety .claude/skills/cid-capability-safety && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "cid-capability-safety" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/daml/cid-capability-safety into .claude/skills/cid-capability-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cid-capability-safety", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/PlamenTSV/plamen/tree/main/agents/skills/daml/cid-capability-safetyType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add PlamenTSV/plamen --skill cid-capability-safety -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install PlamenTSV/plamen cid-capability-safety --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .agents/skills && cp -r skills-src/agents/skills/daml/cid-capability-safety .agents/skills/cid-capability-safety && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "cid-capability-safety" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/daml/cid-capability-safety into .agents/skills/cid-capability-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cid-capability-safety", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PlamenTSV/plamen --skill cid-capability-safety -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install PlamenTSV/plamen cid-capability-safety --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/agents/skills/daml/cid-capability-safety .cursor/skills/cid-capability-safety && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "cid-capability-safety" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/daml/cid-capability-safety into .cursor/skills/cid-capability-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cid-capability-safety", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/PlamenTSV/plamen.git --path agents/skills/daml/cid-capability-safety--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add PlamenTSV/plamen --skill cid-capability-safety -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install PlamenTSV/plamen cid-capability-safety --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/agents/skills/daml/cid-capability-safety .gemini/skills/cid-capability-safety && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "cid-capability-safety" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/daml/cid-capability-safety into .gemini/skills/cid-capability-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cid-capability-safety", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install PlamenTSV/plamen cid-capability-safetyInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add PlamenTSV/plamen --skill cid-capability-safety -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .github/skills && cp -r skills-src/agents/skills/daml/cid-capability-safety .github/skills/cid-capability-safety && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "cid-capability-safety" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/daml/cid-capability-safety into .github/skills/cid-capability-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cid-capability-safety", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PlamenTSV/plamen --skill cid-capability-safety -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install PlamenTSV/plamen cid-capability-safety --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PlamenTSV/plamen.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/agents/skills/daml/cid-capability-safety .opencode/skills/cid-capability-safety && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "cid-capability-safety" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/daml/cid-capability-safety into .opencode/skills/cid-capability-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cid-capability-safety", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
cid-capability-safetyTrigger Pattern Always required for DAML audits - Inject Into Breadth agents, depth-external, depth-edge-case
Cid Capability Safety is an agent skill from PlamenTSV/plamen. Trigger Pattern Always required for DAML audits - Inject Into Breadth agents, depth-external, depth-edge-case
Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
The repository describes itself as: Autonomous Web3 security audit agent for Claude Code. The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 795962b. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Cid Capability Safety loads about 1.5k tokens when it runs. Until then it costs about 33 tokens; SKILL.md has 606 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from PlamenTSV/plamen at commit 795962b, republished under its MIT licence (© PlamenTSV). 606 words, ~1,529 tokens.
.claude/skills/cid-capability-safety/SKILL.md (or your agent's skills folder).Trigger Pattern: Always required for DAML audits Inject Into: Breadth agents, depth-external, depth-edge-case Finding prefix:
[DML-CC-N]Rules referenced: R4, R8, R12
A ContractId t is a DAML-distinctive capability: holding one lets a party fetch/exercise the referenced contract. When a choice accepts a ContractId as an argument, that CID is attacker-chosen unless the body re-binds it to the operation. The four high-yield bug shapes: (1) caller-supplied CID not bound to the operation (caller passes a lookalike), (2) a config/whitelist CID that is missing → the choice fails open, (3) a hardcoded/stale config CID that has been archived → the choice bricks, (4) wrong-CID / type confusion via unchecked fromInterfaceContractId coercion.
For every choice that takes a ContractId argument, determine whether the body binds it to the operation:
| Template.Choice | CID Arg | Fetched/Exercised? | Bound To Operation? | Binding Check | Finding? |
|---|---|---|---|---|---|
{T.C} | cid : ContractId T2 | YES/NO | YES/NO | assertMsg ... (fetched.owner == this.owner) / NONE | [DML-CC-N] if unbound |
Critical patterns to flag:
fetch cid and then acts on the fetched contract's fields without asserting the fetched contract relates to this (e.g., same owner, same asset, expected template) — caller passes any CID they can see ([ELEVATE:CID_BINDING]).DAML note: fetch cid succeeds for ANY contract the exercising party is a stakeholder of (or that is divulged). There is no implicit "this is the right contract" guarantee — the body MUST assert the relationship.
A choice that looks up a config or whitelist contract by CID and proceeds when it is absent fails open.
| Template.Choice | Config/Whitelist CID Source | Absent-Handling | Fail-Open? | Finding? |
|---|---|---|---|---|
{T.C} | arg / template field / key | proceeds / errors / default-permit | YES/NO | [DML-CC-N] if fail-open |
Attack: A choice intended to enforce a whitelist fetches a Whitelist contract and checks membership, but if the whitelist CID is not provided (or lookupByKey returns None), the code path skips the check and permits the action ([ELEVATE:FAIL_OPEN]). Verify the absent/None case DENIES, not permits.
A CID stored in a template field (or hardcoded) that points to a contract which can be archived creates a brick.
| Template.Field | Holds A CID? | Referenced Contract Archivable? | Update Path For The CID? | Brick Risk? |
|---|---|---|---|---|
{T.f} | YES/NO | YES/NO | YES/NO | [DML-CC-N] if no update path |
Attack: A long-lived contract stores a ContractId Config field. The referenced Config is archived/superseded; every choice that fetches the stale CID now gets CONTRACT_NOT_FOUND and bricks, with no choice to update the field ([ELEVATE:CID_BRICK]). Verify either the referenced contract is non-archivable or there is an authorized update choice.
fromInterfaceContractId and coerceContractId reinterpret a CID as a different template/interface without runtime proof.
| Site | Coercion | Source CID Verified As Target Type? | fetch-after-coerce Guard? | Finding? |
|---|---|---|---|---|
{choice:line} | fromInterfaceContractId @T cid | YES/NO | YES/NO | [DML-CC-N] if unverified |
Attack: A choice coerces an interface CID to a concrete template via fromInterfaceContractId @T and immediately acts, but the underlying contract is a different template implementing the same interface. The subsequent fetch may succeed against an unintended template, or the choice trusts fields that mean something different. Verify a fetch after coercion (which fails for the wrong template) OR an explicit type/field assertion guards the coercion.
**ID**: [DML-CC-N]
**Severity**: [Critical if value moved on forged CID, High if fail-open/brick, Medium if type-confusion needs setup]
**Step Execution**: ✓1,2,3,4 | ✗(reasons) | ?(uncertain)
**Rules Applied**: [R4:✓/✗, R8:✓/✗, R12:✓/✗]
**Location**: {Module}.daml:LineN (template X, choice Y)
**Title**: Caller-supplied ContractId unbound / fail-open config CID in {Choice} allows {forged-target / bypass / brick}
**Description**: [The CID argument or config CID, the missing binding/absent-handling, and the contract the attacker substitutes]
**Impact**: [Action against attacker-chosen contract / whitelist bypass / permanent brick / type-confused field read]
**PoC steer**: pass a lookalike CID the attacker created and assert harm; or archive the config contract and assert the brick (CONTRACT_NOT_FOUND); or omit the whitelist CID and assert the gated action still succeeds.| Section | Required | Completed? | Notes |
|---|---|---|---|
| 1. Caller-Supplied CID Inventory | YES | ✓/✗/? | Every choice taking a ContractId arg |
| 2. Config / Whitelist CID Fail-Open | IF config/whitelist CID lookups present | ✓/✗(N/A)/? | Verify absent → deny |
| 3. Hardcoded / Stale Config CID Brick | IF a template field holds a CID | ✓/✗(N/A)/? | Verify update path exists |
| 4. Wrong-CID / Type Confusion | IF fromInterfaceContractId/coerceContractId used | ✓/✗(N/A)/? | Verify coercion is guarded |
© PlamenTSV, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in agents/skills/daml/cid-capability-safety of PlamenTSV/plamen.
Open the folder on GitHubat commit 795962b
Cid Capability Safety next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Cid Capability Safety this skillPlamenTSV/plamen | 303 | — | ~1.5k | Automated safety check: Pass | MIT | |
| Audit Exception Safetyben-manes/caffeine | 18k | — | ~633 | Automated safety check: Pass | Apache-2.0 | |
| Golang Patternsaffaan-m/ECC | 276k | — | ~1.1k | Automated safety check: Pass | MIT | |
| Python Patternsaffaan-m/ECC | 276k | — | ~2.3k | Automated safety check: Pass | MIT | |
| React Audit Grep Patternsgithub/awesome-copilot | 40k | 1 repos | ~461 | Automated safety check: Pass | MIT | |
| Dotnet Patternsaffaan-m/ECC | 276k | 1 repos | ~2.3k | Automated safety check: Pass | MIT |
ben-manes/caffeine
Audit exception safety and failure atomicity across all throw sites
affaan-m/ECC
Go-specific design patterns and best practices including functional options, small interfaces, dependency injection, concurrency patterns, error handling, and package organization.
affaan-m/ECC
Python-specific design patterns and best practices including protocols, dataclasses, context managers, decorators, async/await, type hints, and package organization.
github/awesome-copilot
Provides the complete, verified grep scan command library for auditing React codebases before a React 18.3.1 or React 19 upgrade.
affaan-m/ECC
Idiomatic C and .NET patterns, conventions, dependency injection, async/await, and best practices for building robust, maintainable .NET applications.
affaan-m/ECC
FastAPI patterns for async APIs, dependency injection, Pydantic request and response models, OpenAPI docs, tests, security, and production readiness.
PlamenTSV/plamen
Prepare Solidity projects for a security audit — test coverage, test quality, NatSpec docs, code hygiene, dependency health, best-practice enforcement, deployment readiness, and project…
PlamenTSV/plamen
Trigger Pattern Always (used by all verifier agents) - Inject Into security-verifier agents (Phase 5)
PlamenTSV/plamen
Trigger Pattern Always (Aptos Move) - foundational security check - Inject Into Breadth agents, depth agents
PlamenTSV/plamen
Trigger Pattern Always (Sui Move) -- foundational security check - Inject Into Breadth agents, depth agents
PlamenTSV/plamen
Trigger Pattern ACCOUNTCLOSING flag detected (close/CloseAccount usage) - Inject Into Breadth agents, depth agents
PlamenTSV/plamen
Trigger Pattern Always required for Solana audits - Inject Into Breadth agents, depth agents
Trigger Pattern Always required for DAML audits - Inject Into Breadth agents, depth-external, depth-edge-case. Cid Capability Safety is an agent skill from PlamenTSV/plamen.
Cid Capability Safety fits situations like: pattern Always required for DAML audits - Inject Into Breadth agents; depth-edge-case.
Run `npx skills add PlamenTSV/plamen --skill cid-capability-safety -a claude-code`. Or copy the skill folder (agents/skills/daml/cid-capability-safety in PlamenTSV/plamen) into .claude/skills/cid-capability-safety in your project. Claude Code loads it when a task matches its description.
Run `npx skills add PlamenTSV/plamen --skill cid-capability-safety -a codex`. Or copy the skill folder (agents/skills/daml/cid-capability-safety in PlamenTSV/plamen) into .agents/skills/cid-capability-safety in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PlamenTSV/plamen --skill cid-capability-safety -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cid-capability-safety, .gemini/skills/cid-capability-safety, .github/skills/cid-capability-safety and .opencode/skills/cid-capability-safety in your project.
SKILL.md names no scripts, command-line tools or credentials: Cid Capability Safety is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Cid Capability Safety is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Cid Capability Safety: Audit Exception Safety (ben-manes/caffeine, 18k stars), Golang Patterns (affaan-m/ECC, 276k stars), Python Patterns (affaan-m/ECC, 276k stars) and React Audit Grep Patterns (github/awesome-copilot, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
PlamenTSV (a GitHub user) maintains it in PlamenTSV/plamen, which has 303 GitHub stars. The repository holds 87 skills in this directory. The repository was last updated on September 26, 2026.
Source: PlamenTSV/plamen on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.