Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/ccashwell/evm-cortex/access-control-patternsnpx skills add ccashwell/evm-cortex --skill access-control-patternsgit clone --depth 1 https://github.com/ccashwell/evm-cortexWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00054 | $0.01639 |
| Opus 5 | $0.00027 | $0.00820 |
| Sonnet 5 | $0.00011 | $0.00328 |
| Haiku 4.5 | $0.00005 | $0.00164 |
Grade A, and why
access-control-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 240 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Access Control Patterns
Ownable2Step (Preferred over Ownable)
Two-step ownership transfer prevents accidental transfer to a wrong address.
import {Ownable2Step, Ownable} from "@openzeppelin/contracts/access/Ownable2Step.sol";
contract Treasury is Ownable2Step {
constructor(address initialOwner) Ownable(initialOwner) {}
function withdrawFunds(address to, uint256 amount) external onlyOwner {
if (to == address(0)) revert ZeroAddress();
(bool success,) = to.call{value: amount}("");
if (!success) revert TransferFailed();
}
}
// Transfer flow:
// 1. Current owner calls transferOwnership(newOwner)
// 2. newOwner calls acceptOwnership()
// 3. Ownership transferred only after step 2
Role-Based Access Control
For protocols needing multiple permission levels.
import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
contract Protocol is AccessControl {
bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE");
bytes32 public constant GUARDIAN_ROLE = keccak256("GUARDIAN_ROLE");
bytes32 public constant TREASURY_ROLE = keccak256("TREASURY_ROLE");
constructor(address admin) {
_grantRole(DEFAULT_ADMIN_ROLE, admin);
}
function updateParameters(uint256 newFee) external onlyRole(OPERATOR_ROLE) {
// routine parameter updates
}
function emergencyPause() external onlyRole(GUARDIAN_ROLE) {
_pause();
}
function withdrawFees(address to) external onlyRole(TREASURY_ROLE) {
// treasury management
}
}
Role Hierarchy Template
DEFAULT_ADMIN_ROLE (multisig/timelock)
├── OPERATOR_ROLE (parameter updates, routine operations)
├── GUARDIAN_ROLE (emergency pause, circuit breakers)
├── TREASURY_ROLE (fee collection, fund management)
├── UPGRADER_ROLE (proxy upgrades — timelock only)
└── MINTER_ROLE (token minting — restricted)
Custom Role Admin
constructor(address admin) {
_grantRole(DEFAULT_ADMIN_ROLE, admin);
// OPERATOR_ROLE is managed by DEFAULT_ADMIN_ROLE (default)
// GUARDIAN can manage itself (guardians can add/remove other guardians)
_setRoleAdmin(GUARDIAN_ROLE, GUARDIAN_ROLE);
// MINTER is managed by OPERATOR (operators control minters)
_setRoleAdmin(MINTER_ROLE, OPERATOR_ROLE);
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 240 lines · 54 tokens per session scan A 3c4d56872195
access-control-patterns is a skill published in the GitHub repository ccashwell/evm-cortex (127 stars, last pushed 23d ago), licensed MIT. It adds 54 tokens to every session and 1,639 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
analyzing-ethereum-smart-contract-vulnerabilities
Perform static and symbolic analysis of Solidity smart contracts using Slither and Mythril to detect reentrancy, integer overflow, access control, and other vulnerability classes before deployment to Ethereum mainnet.
ansem-crypto
Use when evaluating crypto narratives, attention rotation, memecoin cycles, Solana-style ecosystem momentum, social distribution, and reflexive retail flows in an Ansem-style crypto market framework.
copy-trading-solana
Copy trade Solana wallets - mirror trades automatically.
[REPLACE: SKILL_NAME]
Price and volume tracker for [REPLACE: TOKENSYMBOL] with anomaly alerts above [REPLACE: ALERTTHRESHOLDPCT]% movement.
kraken-order-types
Complete reference for all spot and futures order types and modifiers.
crypto-market-rank
Crypto market rankings and leaderboards. Query trending tokens, top searched tokens, Binance Alpha tokens, tokenized stocks, social hype sentiment ranks, smart money inflow token rankings, top meme token rankings from Pulse launchpad, and top trader PnL leaderboards. Use this skill when users ask about token rankings…