Agent skill

Governance Patterns

by ccashwell in ccashwell/evm-cortex

A skill your agent uses when implementing onchain governance, DAO voting systems, or timelock-controlled execution.

MITAuto-check passed

Install Governance Patterns

skills CLI
$ npx skills add ccashwell/evm-cortex --skill governance-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ccashwell/evm-cortex governance-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/governance-patterns .claude/skills/governance-patterns && rm -rf skills-src

Use ~/.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/

Facts

Skill name
governance-patterns
GitHub stars
131
Token cost
~1.7k tokens
SKILL.md length
125 words
Files
1
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when implementing onchain governance, DAO voting systems, or timelock-controlled execution.

  • Implementing onchain governance
  • SKILL.md covers Governor Lifecycle, OpenZeppelin Governor Setup, TimelockController Deployment and Proposal Creation and Execution, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • DAO voting systems

What it does

Governance Patterns is an agent skill from ccashwell/evm-cortex. Use when implementing onchain governance, DAO voting systems, or timelock-controlled execution. Covers OpenZeppelin Governor, TimelockController, voting strategies, quorum calculations, and proposal lifecycle.

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 works with OpenZeppelin. The repository describes itself as: Ethereum protocol engineering squad for AI coding assistants. The licence is MIT.

When your agent uses it

  • Implementing onchain governance
  • DAO voting systems
  • Timelock-controlled execution

Example prompts

  • “/governance-patterns”

What it can do on your machine

Read from SKILL.md and the folder at commit f8f3301. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    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.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Governance Patterns loads about 1.7k tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 125 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from ccashwell/evm-cortex at commit f8f3301, republished under its MIT licence (© ccashwell). 125 words, ~1,687 tokens.

Download SKILL.mdSave it as .claude/skills/governance-patterns/SKILL.md (or your agent's skills folder).
name
governance-patterns
description
Use when implementing onchain governance, DAO voting systems, or timelock-controlled execution. Covers OpenZeppelin Governor, TimelockController, voting strategies, quorum calculations, and proposal lifecycle.

Onchain Governance Patterns

Governor Lifecycle

propose() -> Active (voting) -> Succeeded -> queue() -> Queued (timelock) -> execute()
                              -> Defeated (quorum not met or majority against)
         -> Canceled (by proposer before execution)

OpenZeppelin Governor Setup

solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";
import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";
import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";
import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";
import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";
import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";
import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";
import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";

contract MyGovernor is
    Governor,
    GovernorSettings,
    GovernorCountingSimple,
    GovernorVotes,
    GovernorVotesQuorumFraction,
    GovernorTimelockControl
{
    constructor(
        IVotes _token,
        TimelockController _timelock
    )
        Governor("MyGovernor")
        GovernorSettings(
            7200,    // votingDelay: 1 day in blocks (12s blocks)
            50400,   // votingPeriod: 1 week in blocks
            100e18   // proposalThreshold: 100 tokens to propose
        )
        GovernorVotes(_token)
        GovernorVotesQuorumFraction(4) // 4% quorum
        GovernorTimelockControl(_timelock)
    {}

    // Required overrides for Solidity
    function votingDelay() public view override(Governor, GovernorSettings)
        returns (uint256) { return super.votingDelay(); }

    function votingPeriod() public view override(Governor, GovernorSettings)
        returns (uint256) { return super.votingPeriod(); }

    function quorum(uint256 blockNumber) public view override(Governor, GovernorVotesQuorumFraction)
        returns (uint256) { return super.quorum(blockNumber); }

    function state(uint256 proposalId) public view override(Governor, GovernorTimelockControl)
        returns (ProposalState) { return super.state(proposalId); }

    function proposalThreshold() public view override(Governor, GovernorSettings)
        returns (uint256) { return super.proposalThreshold(); }

    function proposalNeedsQueuing(uint256 proposalId)
        public view override(Governor, GovernorTimelockControl) returns (bool)
    { return super.proposalNeedsQueuing(proposalId); }

    function _queueOperations(uint256 id, address[] memory t, uint256[] memory v,
        bytes[] memory c, bytes32 h) internal override(Governor, GovernorTimelockControl)
        returns (uint48) { return super._queueOperations(id, t, v, c, h); }

    function _executeOperations(uint256 id, address[] memory t, uint256[] memory v,
        bytes[] memory c, bytes32 h) internal override(Governor, GovernorTimelockControl)
    { super._executeOperations(id, t, v, c, h); }

    function _cancel(address[] memory t, uint256[] memory v, bytes[] memory c, bytes32 h)
        internal override(Governor, GovernorTimelockControl) returns (uint256)
    { return super._cancel(t, v, c, h); }

    function _executor() internal view override(Governor, GovernorTimelockControl)
        returns (address) { return super._executor(); }
}

TimelockController Deployment

solidity
uint256 minDelay = 2 days;
address[] memory proposers = new address[](1);
address[] memory executors = new address[](1);

proposers[0] = address(0); // will be set to governor
executors[0] = address(0); // anyone can execute after delay

TimelockController timelock = new TimelockController(
    minDelay, proposers, executors, msg.sender
);

MyGovernor governor = new MyGovernor(token, timelock);

// Grant governor proposer and canceller roles
timelock.grantRole(timelock.PROPOSER_ROLE(), address(governor));
timelock.grantRole(timelock.CANCELLER_ROLE(), address(governor));

// Revoke deployer's admin role
timelock.revokeRole(timelock.DEFAULT_ADMIN_ROLE(), msg.sender);

Proposal Creation and Execution

solidity
// Create proposal
address[] memory targets = new address[](1);
uint256[] memory values = new uint256[](1);
bytes[] memory calldatas = new bytes[](1);

targets[0] = address(treasury);
values[0] = 0;
calldatas[0] = abi.encodeCall(Treasury.transfer, (recipient, amount));

uint256 proposalId = governor.propose(targets, values, calldatas, "Fund development team");

// Vote (after votingDelay)
governor.castVote(proposalId, 1); // 0=Against, 1=For, 2=Abstain

// Queue (after votingPeriod, if succeeded)
governor.queue(targets, values, calldatas, keccak256("Fund development team"));

// Execute (after timelock delay)
governor.execute(targets, values, calldatas, keccak256("Fund development team"));

Governance Token with Votes

solidity
import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";
import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";

contract GovToken is ERC20, ERC20Permit, ERC20Votes {
    constructor() ERC20("GovToken", "GOV") ERC20Permit("GovToken") {}

    // Users must delegate to activate voting power (even self-delegate)
    // token.delegate(msg.sender) to self-delegate
}

Parameter Guidelines

ParameterConservativeModerateAggressive
Voting Delay2 days1 day1 block
Voting Period2 weeks1 week3 days
Proposal Threshold1% supply0.1% supply0
Quorum10% supply4% supply2% supply
Timelock Delay7 days2 days1 day

Checklist

  • Token holders must delegate (self-delegate) to activate voting power
  • Timelock admin role revoked from deployer after setup
  • Governor has PROPOSER and CANCELLER roles on timelock
  • Quorum fraction is appropriate for expected participation
  • Voting delay gives time for delegation before voting starts
  • Proposal description is hashed consistently for queue/execute
  • Test full lifecycle: propose -> vote -> queue -> execute
  • Consider emergency mechanisms (guardian multisig as canceller)

© ccashwell, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/governance-patterns of ccashwell/evm-cortex.

Open the folder on GitHubat commit f8f3301

Compare with similar skills

Governance 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.

Governance Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Governance Patterns this skillccashwell/evm-cortex131—~1.7kAutomated safety check: PassMIT
Stellar iOS Mac SDKSoneso/stellar-ios-mac-sdk132—~4.3kAutomated safety check: PassApache-2.0
Wiremock TestOpenZeppelin/openzeppelin-relayer153—~1.6kAutomated safety check: NotesAGPL-3.0
Stark Update Phase1Scaffold-Stark/scaffold-stark-2109—~3.2kAutomated safety check: PassNone
Setup Verdaccio EnvNomicFoundation/edr109—~1.6kAutomated safety check: WarnCustom licence
Report Generatoralt-research2/SolidityGuard104—~1kAutomated safety check: PassCustom licence

Similar skills

  • Stellar iOS Mac SDK

    Soneso/stellar-ios-mac-sdk

    Guides Stellar blockchain development in Swift using stellar-ios-mac-sdk.

    132 GitHub stars~4.3k tokensUpdated today
    Backend & APIsAuto-check passed
  • Wiremock Test

    OpenZeppelin/openzeppelin-relayer

    Manage WireMock proxy for RPC testing. An agent skill from OpenZeppelin/openzeppelin-relayer.

    153 GitHub stars~1.6k tokensUpdated today
    Backend & APIsAuto-check: notes
  • Stark Update Phase1

    Scaffold-Stark/scaffold-stark-2

    Phase 1 — check and update dependencies for scaffold-stark-2 itself (Starknet toolchain, Cairo/OpenZeppelin, starknet.js, Next.js frontend, security advisories).

    109 GitHub stars~3.2k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Setup Verdaccio Env

    NomicFoundation/edr

    Set up a local Verdaccio environment to test EDR + Hardhat 3 + a third-party repo (e.g.

    109 GitHub stars~1.6k tokensUpdated today
    Auto-check: warnings
  • Report Generator

    alt-research2/SolidityGuard

    Generates professional security audit reports from findings.

    104 GitHub stars~1k tokensUpdated 3 mo ago
    SecurityAuto-check passed
  • Erc20 Patterns

    ccashwell/evm-cortex

    A skill your agent uses when implementing, extending, or integrating ERC-20 tokens.

    131 GitHub stars~1.5k tokensUpdated 7 days ago
    Auto-check passed

More from ccashwell/evm-cortex

All 89 skills in this repo
  • Xray Pre Audit

    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.

    131 GitHub stars~25k tokensUpdated 7 days ago
    Auto-check passed
  • Aave Integration

    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.

    131 GitHub stars~1.3k tokensUpdated 7 days ago
    Auto-check passed
  • Access Control Patterns

    ccashwell/evm-cortex

    Access control design patterns for Solidity protocols. An agent skill from ccashwell/evm-cortex.

    131 GitHub stars~1.8k tokensUpdated 7 days ago
    Auto-check passed
  • Anvil Patterns

    ccashwell/evm-cortex

    A skill your agent uses when running a local Ethereum node with Anvil.

    131 GitHub stars~1.3k tokensUpdated 7 days ago
    Auto-check passed
  • Audit Breadth Scan

    ccashwell/evm-cortex

    A skill your agent uses when performing systematic breadth-first review of all contracts during a security audit.

    131 GitHub stars~1.4k tokensUpdated 7 days ago
    Auto-check passed
  • Audit Depth Analysis

    ccashwell/evm-cortex

    A skill your agent uses when performing deep analysis of specific findings or high-risk areas during a security audit.

    131 GitHub stars~1.6k tokensUpdated 7 days ago
    Auto-check passed

Works with

Questions about Governance Patterns

What does Governance Patterns do?

A skill your agent uses when implementing onchain governance, DAO voting systems, or timelock-controlled execution. Governance Patterns is an agent skill from ccashwell/evm-cortex. Use when implementing onchain governance, DAO voting systems, or timelock-controlled execution.

When should I use Governance Patterns?

Governance Patterns fits situations like: implementing onchain governance; DAO voting systems; timelock-controlled execution.

How do I install Governance Patterns in Claude Code?

Run `npx skills add ccashwell/evm-cortex --skill governance-patterns -a claude-code`. Or copy the skill folder (skills/governance-patterns in ccashwell/evm-cortex) into .claude/skills/governance-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Governance Patterns in Codex?

Run `npx skills add ccashwell/evm-cortex --skill governance-patterns -a codex`. Or copy the skill folder (skills/governance-patterns in ccashwell/evm-cortex) into .agents/skills/governance-patterns in your project. Codex loads it when a task matches its description.

Can I use Governance Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ccashwell/evm-cortex --skill governance-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/governance-patterns, .gemini/skills/governance-patterns, .github/skills/governance-patterns and .opencode/skills/governance-patterns in your project.

What does Governance Patterns need to run?

SKILL.md names no scripts, command-line tools or credentials: Governance Patterns is instructions for the agent only.

Does Governance Patterns access the network?

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.

Is Governance Patterns safe to install?

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.

What licence does Governance Patterns use?

Governance Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Governance Patterns use?

About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Governance Patterns?

Skills that share tags, products or a category with Governance Patterns: Stellar iOS Mac SDK (Soneso/stellar-ios-mac-sdk, 132 stars), Wiremock Test (OpenZeppelin/openzeppelin-relayer, 153 stars), Stark Update Phase1 (Scaffold-Stark/scaffold-stark-2, 109 stars) and Setup Verdaccio Env (NomicFoundation/edr, 109 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Governance Patterns?

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.