Foundry Deploy Fixtures
aviggiano/security
Create or refactor Foundry deployment fixtures for Solidity tests.
Constructor and initializer patterns for deploying Solidity contracts.
$ npx skills add ccashwell/evm-cortex --skill constructor-patterns -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ccashwell/evm-cortex constructor-patterns --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/ccashwell/evm-cortex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/constructor-patterns .claude/skills/constructor-patterns && 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 "constructor-patterns" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/constructor-patterns into .claude/skills/constructor-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "constructor-patterns", 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/ccashwell/evm-cortex/tree/main/skills/constructor-patternsType 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 ccashwell/evm-cortex --skill constructor-patterns -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ccashwell/evm-cortex constructor-patterns --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/constructor-patterns .agents/skills/constructor-patterns && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "constructor-patterns" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/constructor-patterns into .agents/skills/constructor-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "constructor-patterns", 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 ccashwell/evm-cortex --skill constructor-patterns -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ccashwell/evm-cortex constructor-patterns --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/constructor-patterns .cursor/skills/constructor-patterns && 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 "constructor-patterns" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/constructor-patterns into .cursor/skills/constructor-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "constructor-patterns", 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/ccashwell/evm-cortex.git --path skills/constructor-patterns--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 ccashwell/evm-cortex --skill constructor-patterns -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ccashwell/evm-cortex constructor-patterns --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/constructor-patterns .gemini/skills/constructor-patterns && 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 "constructor-patterns" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/constructor-patterns into .gemini/skills/constructor-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "constructor-patterns", 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 ccashwell/evm-cortex constructor-patternsInstalls 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 ccashwell/evm-cortex --skill constructor-patterns -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/constructor-patterns .github/skills/constructor-patterns && 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 "constructor-patterns" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/constructor-patterns into .github/skills/constructor-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "constructor-patterns", 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 ccashwell/evm-cortex --skill constructor-patterns -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ccashwell/evm-cortex constructor-patterns --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/constructor-patterns .opencode/skills/constructor-patterns && 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 "constructor-patterns" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/constructor-patterns into .opencode/skills/constructor-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "constructor-patterns", 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.
constructor-patternsConstructor and initializer patterns for deploying Solidity contracts.
function Object() { [native code] } Patterns is an agent skill from ccashwell/evm-cortex. Constructor and initializer patterns for deploying Solidity contracts. Use when designing deployment flows, upgradeable proxies, factory patterns, or CREATE2 deployments. Covers constructor validation, initializer safety, and factory patterns.
Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Backend & APIs, covering Deployment and Smart contracts. It works with Solidity. The repository describes itself as: Ethereum protocol engineering squad for AI coding assistants. The licence is MIT.
Read from SKILL.md and the folder at commit f8f3301. 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 solidity).
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.
function Object() { [native code] } Patterns loads about 1.7k tokens when it runs. Until then it costs about 66 tokens; SKILL.md has 212 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 ccashwell/evm-cortex at commit f8f3301, republished under its MIT licence (© ccashwell). 212 words, ~1,730 tokens.
.claude/skills/constructor-patterns/SKILL.md (or your agent's skills folder).Constructors run once at deployment. Validate all parameters and set immutables.
contract Vault {
error ZeroAddress();
error InvalidFee(uint256 fee);
address public immutable TOKEN;
address public immutable ORACLE;
uint256 public immutable FEE_BPS;
uint256 public immutable DEPLOYMENT_BLOCK;
constructor(address token, address oracle, uint256 feeBps) {
if (token == address(0)) revert ZeroAddress();
if (oracle == address(0)) revert ZeroAddress();
if (feeBps > 10_000) revert InvalidFee(feeBps);
TOKEN = token;
ORACLE = oracle;
FEE_BPS = feeBps;
DEPLOYMENT_BLOCK = block.number;
}
}Proxies never call the implementation's constructor. Use initializer from OpenZeppelin.
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol";
contract VaultV1 is Initializable, OwnableUpgradeable, PausableUpgradeable {
uint256 public depositCap;
address public feeRecipient;
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
_disableInitializers();
}
function initialize(
address admin,
address _feeRecipient,
uint256 _depositCap
) external initializer {
if (admin == address(0)) revert ZeroAddress();
if (_feeRecipient == address(0)) revert ZeroAddress();
__Ownable_init(admin);
__Pausable_init();
feeRecipient = _feeRecipient;
depositCap = _depositCap;
}
}Without _disableInitializers(), an attacker can call initialize() on the implementation contract directly and potentially selfdestruct it (pre-Dencun) or manipulate its state.
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
_disableInitializers();
}When adding new state in V2, use reinitializer(2) instead of initializer.
contract VaultV2 is VaultV1 {
uint256 public withdrawalDelay;
function initializeV2(uint256 _withdrawalDelay) external reinitializer(2) {
withdrawalDelay = _withdrawalDelay;
}
}Immutables can coexist with initializers. They're set in the implementation's constructor.
contract VaultImplementation is Initializable, OwnableUpgradeable {
address public immutable WETH;
address public immutable FACTORY;
/// @custom:oz-upgrades-unsafe-allow constructor
constructor(address weth, address factory) {
if (weth == address(0)) revert ZeroAddress();
if (factory == address(0)) revert ZeroAddress();
WETH = weth;
FACTORY = factory;
_disableInitializers();
}
function initialize(address admin) external initializer {
__Ownable_init(admin);
}
}Cheapest deployment for contracts with identical logic but different state.
import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol";
contract VaultFactory {
using Clones for address;
address public immutable IMPLEMENTATION;
event VaultCreated(address indexed vault, address indexed admin);
constructor(address implementation) {
IMPLEMENTATION = implementation;
}
function createVault(address admin, bytes32 salt) external returns (address vault) {
vault = IMPLEMENTATION.cloneDeterministic(salt);
IVault(vault).initialize(admin);
emit VaultCreated(vault, admin);
}
function predictVaultAddress(bytes32 salt) external view returns (address) {
return IMPLEMENTATION.predictDeterministicAddress(salt);
}
}Deterministic addresses — compute the address before deployment.
contract Create2Factory {
event Deployed(address indexed addr, bytes32 indexed salt);
function deploy(bytes memory bytecode, bytes32 salt) external returns (address addr) {
assembly {
addr := create2(0, add(bytecode, 0x20), mload(bytecode), salt)
if iszero(addr) { revert(0, 0) }
}
emit Deployed(addr, salt);
}
function computeAddress(bytes memory bytecode, bytes32 salt) external view returns (address) {
return address(uint160(uint256(keccak256(abi.encodePacked(
bytes1(0xff),
address(this),
salt,
keccak256(bytecode)
)))));
}
}function deployWithArgs(bytes32 salt, address token, uint256 fee)
external
returns (address vault)
{
bytes memory bytecode = abi.encodePacked(
type(Vault).creationCode,
abi.encode(token, fee)
);
assembly {
vault := create2(0, add(bytecode, 0x20), mload(bytecode), salt)
if iszero(vault) { revert(0, 0) }
}
}Is the contract upgradeable?
├── No → Use constructor + immutables
└── Yes → Use initializer + _disableInitializers()
│
Are there deploy-time constants (WETH, factory)?
├── Yes → Set as immutables in constructor
└── No → Everything in initializer_disableInitializers() — allows initialization of implementationinitializer handles thisreinitializer(n) for V2+ upgrades — reusing initializer fails silently_disableInitializers() in constructorinitializer modifier on initialize()reinitializer(n) for upgrade initializationaddress(0)© ccashwell, 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 skills/constructor-patterns of ccashwell/evm-cortex.
Open the folder on GitHubat commit f8f3301
function Object() { [native code] } Patterns 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 |
|---|---|---|---|---|---|---|
| function Object() { [native code] } Patterns this skillccashwell/evm-cortex | 131 | — | ~1.7k | Automated safety check: Pass | MIT | |
| Foundry Deploy Fixturesaviggiano/security | 144 | — | ~634 | Automated safety check: Pass | MIT | |
| New Configlidofinance/diffyscan | 142 | — | ~1k | Automated safety check: Pass | MIT | |
| Validate Configlidofinance/diffyscan | 142 | — | ~1.1k | Automated safety check: Pass | MIT | |
| Foundry Differential Testsaviggiano/security | 144 | — | ~613 | Automated safety check: Pass | MIT | |
| Add Explorerlidofinance/diffyscan | 142 | — | ~1k | Automated safety check: Pass | MIT |
aviggiano/security
Create or refactor Foundry deployment fixtures for Solidity tests.
lidofinance/diffyscan
Creates or extends a Diffyscan verification config for a deployed contract or deployment.
lidofinance/diffyscan
Reviews an existing Diffyscan YAML or JSON config for load errors, runtime prerequisites, pinned sources, address mappings and broad exceptions.
aviggiano/security
Create Foundry differential tests comparing production Solidity contracts against an independent reference model.
lidofinance/diffyscan
Adds or repairs Diffyscan explorer API routing and response adapters for a new host, chain or payload format.
PayRam/payram-mcp
Installs and runs the PayRam crypto payment gateway from the command line for agents, CI pipelines and serverless setups, with no web dashboard.
ccashwell/evm-cortex
A skill your agent uses when preparing for a security audit, performing reconnaissance on a new codebase, or creating a protocol overview.
ccashwell/evm-cortex
A skill your agent uses when integrating with Aave V3 for lending, borrowing, flash loans, or building on top of Aave markets.
ccashwell/evm-cortex
Access control design patterns for Solidity protocols. An agent skill from ccashwell/evm-cortex.
ccashwell/evm-cortex
A skill your agent uses when running a local Ethereum node with Anvil.
ccashwell/evm-cortex
A skill your agent uses when performing systematic breadth-first review of all contracts during a security audit.
ccashwell/evm-cortex
A skill your agent uses when performing deep analysis of specific findings or high-risk areas during a security audit.
Works with
Categories
Constructor and initializer patterns for deploying Solidity contracts. function Object() { [native code] } Patterns is an agent skill from ccashwell/evm-cortex. Constructor and initializer patterns for deploying Solidity contracts.
function Object() { [native code] } Patterns fits situations like: designing deployment flows; upgradeable proxies; factory patterns; CREATE2 deployments.
Run `npx skills add ccashwell/evm-cortex --skill constructor-patterns -a claude-code`. Or copy the skill folder (skills/constructor-patterns in ccashwell/evm-cortex) into .claude/skills/constructor-patterns in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ccashwell/evm-cortex --skill constructor-patterns -a codex`. Or copy the skill folder (skills/constructor-patterns in ccashwell/evm-cortex) into .agents/skills/constructor-patterns 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 ccashwell/evm-cortex --skill constructor-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/constructor-patterns, .gemini/skills/constructor-patterns, .github/skills/constructor-patterns and .opencode/skills/constructor-patterns in your project.
SKILL.md names no scripts, command-line tools or credentials: function Object() { [native code] } Patterns 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.
function Object() { [native code] } Patterns 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.7k tokens (SKILL.md is roughly 6.9k 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 function Object() { [native code] } Patterns: Foundry Deploy Fixtures (aviggiano/security, 144 stars), New Config (lidofinance/diffyscan, 142 stars), Validate Config (lidofinance/diffyscan, 142 stars) and Foundry Differential Tests (aviggiano/security, 144 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ccashwell (a GitHub user) maintains it in ccashwell/evm-cortex, which has 131 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on September 30, 2026.
Source: ccashwell/evm-cortex on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.