Golang Patterns
affaan-m/ECC
Go-specific design patterns and best practices including functional options, small interfaces, dependency injection, concurrency patterns, error handling, and package organization.
Trigger Pattern Always required for DAML audits - Inject Into Breadth agents, depth-edge-case
$ npx skills add PlamenTSV/plamen --skill ensure-invariants -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install PlamenTSV/plamen ensure-invariants --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/ensure-invariants .claude/skills/ensure-invariants && 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 "ensure-invariants" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/daml/ensure-invariants into .claude/skills/ensure-invariants/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ensure-invariants", 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/ensure-invariantsType 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 ensure-invariants -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install PlamenTSV/plamen ensure-invariants --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/ensure-invariants .agents/skills/ensure-invariants && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "ensure-invariants" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/daml/ensure-invariants into .agents/skills/ensure-invariants/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ensure-invariants", 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 ensure-invariants -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install PlamenTSV/plamen ensure-invariants --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/ensure-invariants .cursor/skills/ensure-invariants && 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 "ensure-invariants" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/daml/ensure-invariants into .cursor/skills/ensure-invariants/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ensure-invariants", 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/ensure-invariants--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 ensure-invariants -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install PlamenTSV/plamen ensure-invariants --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/ensure-invariants .gemini/skills/ensure-invariants && 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 "ensure-invariants" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/daml/ensure-invariants into .gemini/skills/ensure-invariants/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ensure-invariants", 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 ensure-invariantsInstalls 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 ensure-invariants -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/ensure-invariants .github/skills/ensure-invariants && 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 "ensure-invariants" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/daml/ensure-invariants into .github/skills/ensure-invariants/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ensure-invariants", 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 ensure-invariants -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 ensure-invariants --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/ensure-invariants .opencode/skills/ensure-invariants && 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 "ensure-invariants" agent skill from https://github.com/PlamenTSV/plamen/tree/main/agents/skills/daml/ensure-invariants into .opencode/skills/ensure-invariants/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ensure-invariants", 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.
ensure-invariantsTrigger Pattern Always required for DAML audits - Inject Into Breadth agents, depth-edge-case
Ensure Invariants is an agent skill from PlamenTSV/plamen. Trigger Pattern Always required for DAML audits - Inject Into Breadth agents, 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.
Ensure Invariants loads about 1.5k tokens when it runs. Until then it costs about 28 tokens; SKILL.md has 573 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). 573 words, ~1,515 tokens.
.claude/skills/ensure-invariants/SKILL.md (or your agent's skills folder).Trigger Pattern: Always required for DAML audits Inject Into: Breadth agents, depth-edge-case Finding prefix:
[DML-EI-N]Rules referenced: R10, R12, R14
A template's ensure clause is its creation precondition: a create whose ensure is False throws PreconditionFailed and the contract never exists. A missing or weak ensure lets an invalid contract enter the ACS (negative amount, empty party list, inconsistent fields), and every downstream choice then trusts the broken invariant. Separately, DAML Int/Decimal arithmetic THROWS on overflow rather than wrapping — so an arithmetic boundary is a liveness/brick bug (the choice aborts and becomes un-exercisable), not a silent-wrap value bug. The PoC for this class is a set of boundary-value Script () functions (min / 1 / negative / max / empty-list), Aptos-style.
For every template, record its ensure and the invariants it should enforce:
| Template | ensure Expr | Invariants It Should Enforce | Gap? |
|---|---|---|---|
{T} | amount > 0.0 && obs /= [] / NONE | amount positive, parties non-empty, fields consistent | [DML-EI-N] if invariant unguarded |
Critical patterns to flag:
ensure at all on a template carrying an amount/balance/cap → a negative or zero amount contract is creatable ([ELEVATE:ENSURE_GAP]).ensure that guards some fields but not the security-critical one (e.g., checks amount > 0 but not amount <= cap, or not maintainer non-empty).this.amount > 0) that the ensure does not actually establish.DAML note: ensure runs on create only. A choice that recreates a successor re-runs the successor's ensure; if the successor template has a weaker ensure, the invariant degrades across the lifecycle.
For each ensure-guarded and arithmetic-bearing field, substitute boundary values and trace the outcome:
| Template/Choice | Field/Expr | Value Substituted | Outcome | Finding? |
|---|---|---|---|---|
{T / T.C} | amount / a + b | 0 / 1 / -1 / maxInt / [] | created-invalid / abort / wrong-branch | [DML-EI-N] if invalid creatable or reachable abort |
Substitute and trace:
amount = 0 and amount = -1: does the contract create? Does a split produce zero-value children?a + b where both near maxInt/Decimal max: does the choice ABORT (ArithmeticError)? A reachable abort on a user path is a liveness brick ([ELEVATE:ENSURE_GAP] / boundary).[]) where a non-empty list is assumed (signatories, observers, maintainers): does ensure/the choice handle it, or does a later head/index abort?When several choices create instances of the same template, verify they all establish the same invariant.
| Template | Created By (choices) | All Paths Satisfy Same Invariant? | Weakest Path | Finding? |
|---|---|---|---|---|
{T} | {choice list} | YES/NO | {choice} | [DML-EI-N] if one path creates weaker state |
Check for:
A deadline is only enforced if a choice actually compares it against getTime.
| Template.Choice | Deadline Field | Compared Against getTime? | Comparison Relation | Enforced? |
|---|---|---|---|---|
{T.C} | {deadline} | YES/NO | < / <= / > | [DML-EI-N] if deadline never enforced |
Check for ([ELEVATE:DEADLINE_UNENFORCED]):
deadline/maturity/expiry field stored but never read in any choice's guard → the time gate is decorative.getTime (ledger time) — the caller chooses "now".>= vs >) letting an action happen exactly at/after expiry when it should not.**ID**: [DML-EI-N]
**Severity**: [High if invalid state corrupts value/cap, Medium if liveness brick or unenforced deadline; Int/Decimal overflow is a LIVENESS finding, NOT auto-downgraded as silent-wrap]
**Step Execution**: ✓1,2,3,4 | ✗(reasons) | ?(uncertain)
**Rules Applied**: [R10:✓/✗, R12:✓/✗, R14:✓/✗]
**Location**: {Module}.daml:LineN (template X)
**Title**: Missing/weak ensure / unenforced deadline on {Template} allows {invalid contract / reachable abort}
**Description**: [The missing precondition or unenforced gate, the boundary value that breaks it, and the downstream choice that trusts the broken invariant]
**Impact**: [Invalid contract enters ACS / arithmetic abort bricks a user path / deadline bypass / cap unenforced]
**PoC steer**: boundary-value Scripts — `boundaryMin/boundaryNeg/boundaryMax : Script ()` calling a shared helper; assert create-invalid SUCCEEDS (ensure gap) or the choice aborts (ArithmeticError, liveness) or the past-deadline action SUCCEEDS (unenforced).| Section | Required | Completed? | Notes |
|---|---|---|---|
| 1. Ensure-Clause Inventory | YES | ✓/✗/? | Every template's ensure vs its invariants |
| 2. Boundary Substitution | YES | ✓/✗/? | 0 / 1 / -1 / max / empty-list per field |
| 3. Cross-Create Consistency | IF template created by 2+ choices | ✓/✗(N/A)/? | All creation paths same invariant |
| 4. Deadline / Temporal-Gate Enforcement | IF deadline/expiry field present | ✓/✗(N/A)/? | Compared against getTime, correct relation |
© 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/ensure-invariants of PlamenTSV/plamen.
Open the folder on GitHubat commit 795962b
Ensure Invariants 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 |
|---|---|---|---|---|---|---|
| Ensure Invariants this skillPlamenTSV/plamen | 303 | — | ~1.5k | Automated safety check: Pass | MIT | |
| Golang Patternsaffaan-m/ECC | 276k | — | ~1.1k | Automated safety check: Pass | MIT | |
| React Audit Grep Patternsgithub/awesome-copilot | 40k | 1 repos | ~461 | Automated safety check: Pass | MIT | |
| Dotnet Patternsaffaan-m/ECC | 277k | 1 repos | ~2.3k | Automated safety check: Pass | MIT | |
| Fastapi Patternsaffaan-m/ECC | 276k | — | ~2.3k | Automated safety check: Pass | MIT | |
| Kotlin Exposed Patternsaffaan-m/ECC | 277k | 4 repos | ~5.5k | Automated safety check: Pass | MIT |
affaan-m/ECC
Go-specific design patterns and best practices including functional options, small interfaces, dependency injection, concurrency patterns, error handling, 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.
affaan-m/ECC
JetBrains Exposed ORM patterns including DSL queries, DAO pattern, transactions, HikariCP connection pooling, Flyway migrations, and repository pattern.
affaan-m/ECC
Python-specific design patterns and best practices including protocols, dataclasses, context managers, decorators, async/await, type hints, and package organization.
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-edge-case. Ensure Invariants is an agent skill from PlamenTSV/plamen.
Ensure Invariants fits situations like: pattern Always required for DAML audits - Inject Into Breadth agents; depth-edge-case.
Run `npx skills add PlamenTSV/plamen --skill ensure-invariants -a claude-code`. Or copy the skill folder (agents/skills/daml/ensure-invariants in PlamenTSV/plamen) into .claude/skills/ensure-invariants in your project. Claude Code loads it when a task matches its description.
Run `npx skills add PlamenTSV/plamen --skill ensure-invariants -a codex`. Or copy the skill folder (agents/skills/daml/ensure-invariants in PlamenTSV/plamen) into .agents/skills/ensure-invariants 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 ensure-invariants -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ensure-invariants, .gemini/skills/ensure-invariants, .github/skills/ensure-invariants and .opencode/skills/ensure-invariants in your project.
SKILL.md names no scripts, command-line tools or credentials: Ensure Invariants 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.
Ensure Invariants 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 Ensure Invariants: Golang Patterns (affaan-m/ECC, 276k stars), React Audit Grep Patterns (github/awesome-copilot, 40k stars), Dotnet Patterns (affaan-m/ECC, 277k stars) and Fastapi Patterns (affaan-m/ECC, 276k 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.