Developing Smart Contracts
LFDT-Lineth/lineth-monorepo
Solidity smart contract development guidelines for Lineth blockchain.
Cross-chain security patterns for multi-chain Solidity deployments and bridge interactions.
$ npx skills add ccashwell/evm-cortex --skill cross-chain-security -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ccashwell/evm-cortex cross-chain-security --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/cross-chain-security .claude/skills/cross-chain-security && 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 "cross-chain-security" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/cross-chain-security into .claude/skills/cross-chain-security/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cross-chain-security", 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/cross-chain-securityType 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 cross-chain-security -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ccashwell/evm-cortex cross-chain-security --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/cross-chain-security .agents/skills/cross-chain-security && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "cross-chain-security" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/cross-chain-security into .agents/skills/cross-chain-security/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cross-chain-security", 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 cross-chain-security -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ccashwell/evm-cortex cross-chain-security --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/cross-chain-security .cursor/skills/cross-chain-security && 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 "cross-chain-security" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/cross-chain-security into .cursor/skills/cross-chain-security/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cross-chain-security", 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/cross-chain-security--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 cross-chain-security -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ccashwell/evm-cortex cross-chain-security --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/cross-chain-security .gemini/skills/cross-chain-security && 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 "cross-chain-security" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/cross-chain-security into .gemini/skills/cross-chain-security/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cross-chain-security", 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 cross-chain-securityInstalls 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 cross-chain-security -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/cross-chain-security .github/skills/cross-chain-security && 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 "cross-chain-security" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/cross-chain-security into .github/skills/cross-chain-security/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cross-chain-security", 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 cross-chain-security -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 cross-chain-security --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/cross-chain-security .opencode/skills/cross-chain-security && 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 "cross-chain-security" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/cross-chain-security into .opencode/skills/cross-chain-security/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cross-chain-security", 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.
cross-chain-securityCross-chain security patterns for multi-chain Solidity deployments and bridge interactions.
Cross Chain Security is an agent skill from ccashwell/evm-cortex. Cross-chain security patterns for multi-chain Solidity deployments and bridge interactions. Use when deploying contracts across multiple chains, integrating with bridges, or handling chain-specific behavior differences. Covers message replay, finality, and chain-specific gotchas.
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 Smart contracts and Deployment. It works with Solidity and Ethereum. 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.
Cross Chain Security loads about 1.7k tokens when it runs. Until then it costs about 75 tokens; SKILL.md has 240 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). 240 words, ~1,661 tokens.
.claude/skills/cross-chain-security/SKILL.md (or your agent's skills folder).Signatures and messages valid on one chain can be replayed on another if the chain ID isn't included.
// VULNERABLE: no chain ID in domain separator
bytes32 DOMAIN_SEPARATOR = keccak256(abi.encode(
keccak256("EIP712Domain(string name,address verifyingContract)"),
keccak256("MyProtocol"),
address(this)
));
// FIXED: include chain ID
bytes32 DOMAIN_SEPARATOR = keccak256(abi.encode(
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
keccak256("MyProtocol"),
keccak256("1"),
block.chainid,
address(this)
));If a chain forks, block.chainid changes but a cached domain separator doesn't.
uint256 private immutable _CACHED_CHAIN_ID;
bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
constructor() {
_CACHED_CHAIN_ID = block.chainid;
_CACHED_DOMAIN_SEPARATOR = _computeDomainSeparator();
}
function DOMAIN_SEPARATOR() public view returns (bytes32) {
if (block.chainid == _CACHED_CHAIN_ID) {
return _CACHED_DOMAIN_SEPARATOR;
}
return _computeDomainSeparator();
}Never trust bridge messages blindly. Verify the source chain, sender, and message format.
interface ICrossDomainMessenger {
function xDomainMessageSender() external view returns (address);
}
contract L2Vault {
address public immutable L1_BRIDGE;
address public immutable MESSENGER;
error NotFromBridge();
error InvalidL1Sender();
modifier onlyBridge() {
if (msg.sender != MESSENGER) revert NotFromBridge();
if (ICrossDomainMessenger(MESSENGER).xDomainMessageSender() != L1_BRIDGE) {
revert InvalidL1Sender();
}
_;
}
function handleMessage(bytes calldata data) external onlyBridge {
// safe to process — verified from L1_BRIDGE via canonical messenger
}
}Different chains have different finality guarantees.
| Chain | Finality | Notes |
|---|---|---|
| Ethereum L1 | ~13 min (2 epochs) | Reorgs very rare post-merge |
| Optimism | 7-day challenge period | Optimistic rollup — wait for finality |
| Arbitrum | 7-day challenge period | Optimistic rollup |
| zkSync | Minutes (proof time) | ZK rollup — faster finality |
| Polygon PoS | ~2 min | Checkpoints to Ethereum |
| Base | 7-day challenge period | OP Stack |
// Don't act on cross-chain messages until finality is reached
// For optimistic rollups, this means waiting for the challenge period
// For ZK rollups, wait for proof verification on L1Available on Ethereum (Shanghai), not on all L2s or older EVMs.
// Solidity 0.8.20+ uses PUSH0 by default
// If deploying to chains without PUSH0, compile with:
// solc --evm-version paris (pre-Shanghai)
// foundry.toml
// evm_version = "paris"// Ethereum L1: increments every ~12 seconds
// Arbitrum: block.number returns L1 block number (NOT Arbitrum block)
// Use ArbSys.arbBlockNumber() for Arbitrum blocks
// Optimism: block.number returns L2 block number
// zkSync: block.number returns L2 batch number
// VULNERABLE: assuming block.number behavior
uint256 public lastActionBlock = block.number;
// SAFER: use block.timestamp for time-based logic (consistent across chains)
uint256 public lastActionTimestamp = block.timestamp;// block.basefee: may be 0 on some L2s
// block.prevrandao (was block.difficulty): not available or 0 on most L2s
// Never use these for randomness on L2// On Optimism/Base, for L1→L2 messages:
// msg.sender = L2CrossDomainMessenger
// Use xDomainMessageSender() to get the actual L1 sender
// On Arbitrum:
// msg.sender = aliased address for L1→L2 calls
// alias = L1Address + 0x1111000000000000000000000000000000001111Same CREATE2 salt + bytecode = same address on all chains, but only if:
// Risk: deploying "same" contract on two chains at same address
// but with different constructor args → different behavior, same address
// Users might trust the address based on one chain's deployment
// Defense: verify deployments independently per chain// Different token representations across chains:
// - USDC on Ethereum: native Circle deployment
// - USDC on Arbitrum: bridged via Arbitrum bridge (USDC.e) vs native (USDC)
// - USDC on Optimism: bridged via OP bridge vs native
// Always verify the correct token address per chain
// Don't assume same address = same token across chains
mapping(uint256 => address) public chainToUSDC;
constructor() {
chainToUSDC[1] = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; // Ethereum
chainToUSDC[42161] = 0xaf88d065e77c8cC2239327C5EDb3A432268e5831; // Arbitrum native
chainToUSDC[10] = 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85; // Optimism native
}// Governance on L1, execution on L2 requires:
// 1. Proposal passes on L1
// 2. Message sent via canonical bridge
// 3. L2 timelock receives and queues
// 4. Execution after L2 timelock delay
// Total delay = L1 voting + bridge finality + L2 timelock
// For optimistic rollups: voting period + 7 days + L2 delaychainIdblock.chainid changes (fork handling)block.number not relied upon for cross-chain consistencyblock.timestamp used for time-based logic (more portable)© 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/cross-chain-security of ccashwell/evm-cortex.
Open the folder on GitHubat commit f8f3301
Cross Chain Security 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 |
|---|---|---|---|---|---|---|
| Cross Chain Security this skillccashwell/evm-cortex | 131 | — | ~1.7k | Automated safety check: Pass | MIT | |
| Developing Smart ContractsLFDT-Lineth/lineth-monorepo | 126 | — | ~1.4k | Automated safety check: Pass | AGPL-3.0 | |
| 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 | |
| Ethskillsaustintgriffith/ethskills | 294 | — | ~1.4k | Automated safety check: Pass | None |
LFDT-Lineth/lineth-monorepo
Solidity smart contract development guidelines for Lineth blockchain.
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.
austintgriffith/ethskills
Ethereum development knowledge for AI agents — from idea to deployed dApp.
vechain/x-app-template
Solidity smart contract development on VeChainThor — Hardhat setup, ERC-20/721 patterns, upgradeable contracts, gas optimization, testing with Thor Solo, security auditing, and ABI codegen.
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.
Categories
Cross-chain security patterns for multi-chain Solidity deployments and bridge interactions. Cross Chain Security is an agent skill from ccashwell/evm-cortex. Cross-chain security patterns for multi-chain Solidity deployments and bridge interactions.
Cross Chain Security fits situations like: deploying contracts across multiple chains; integrating with bridges; handling chain-specific behavior differences.
Run `npx skills add ccashwell/evm-cortex --skill cross-chain-security -a claude-code`. Or copy the skill folder (skills/cross-chain-security in ccashwell/evm-cortex) into .claude/skills/cross-chain-security in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ccashwell/evm-cortex --skill cross-chain-security -a codex`. Or copy the skill folder (skills/cross-chain-security in ccashwell/evm-cortex) into .agents/skills/cross-chain-security 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 cross-chain-security -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cross-chain-security, .gemini/skills/cross-chain-security, .github/skills/cross-chain-security and .opencode/skills/cross-chain-security in your project.
SKILL.md names no scripts, command-line tools or credentials: Cross Chain Security 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.
Cross Chain Security 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.6k 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 Cross Chain Security: Developing Smart Contracts (LFDT-Lineth/lineth-monorepo, 126 stars), Foundry Deploy Fixtures (aviggiano/security, 144 stars), New Config (lidofinance/diffyscan, 142 stars) and Validate Config (lidofinance/diffyscan, 142 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.