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 skills add ccashwell/evm-cortex --skill access-control-patternsgit clone --depth 1 https://github.com/ccashwell/evm-cortexWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/ccashwell/evm-cortex/access-control-patterns)<a href="https://agentmods.dev/skills/ccashwell/evm-cortex/access-control-patterns"><img src="https://agentmods.dev/badge/skills/ccashwell/evm-cortex/access-control-patterns/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/ccashwell/evm-cortex/access-control-patterns"><img src="https://agentmods.dev/badge/skills/ccashwell/evm-cortex/access-control-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What 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.1 | $0.00054 | $0.01639 |
| Opus 5.5 | $0.00022 | $0.00656 |
| Sonnet 5.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 3mo 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.
- 3mo 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 (131 stars, last pushed 1mo ago), licensed MIT. It adds 54 tokens to every session and 1,639 once invoked, about $0.0002 per session on Opus 5.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.
access-control-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| access-control-patternsccashwell/evm-cortex | Skill | 131 | 1mo ago | MIT | A | 54 | Claude Code, Codex |
| signature-replayPurpleAILAB/Decepticon | Skill | 6.9k | 12d ago | Apache-2.0 | A | 31 | Claude Code, Codex |
| official-sui-skillsMystenLabs/sui | Skill | 7.8k | today | Apache-2.0 | A | 116 | Claude Code, Codex |
| bridgealsk1992/CloddsBot | Skill | 3.1k | 18d ago | MIT | A | 13 | Claude Code, Codex |
| onchainkitalsk1992/CloddsBot | Skill | 3.1k | 18d ago | MIT | A | 24 | Claude Code, Codex |
| marginfialsk1992/CloddsBot | Skill | 3.1k | 18d ago | MIT | A | 11 | Claude Code, Codex |
| devtools-event-clientTanStack/devtools | Skill | 519 | yesterday | MIT | A | 79 | Claude Code, Codex |