Ethskills
austintgriffith/ethskills
Ethereum development knowledge for AI agents — from idea to deployed dApp.
Solidity templates for DeFi building blocks: staking with reward distribution, an automated market maker, governance tokens and flash loans.
$ npx skills add wshobson/agents --skill defi-protocol-templates -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install wshobson/agents defi-protocol-templates --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/wshobson/agents.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/blockchain-web3/skills/defi-protocol-templates .claude/skills/defi-protocol-templates && 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 "defi-protocol-templates" agent skill from https://github.com/wshobson/agents/tree/main/plugins/blockchain-web3/skills/defi-protocol-templates into .claude/skills/defi-protocol-templates/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "defi-protocol-templates", 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/wshobson/agents/tree/main/plugins/blockchain-web3/skills/defi-protocol-templatesType 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 wshobson/agents --skill defi-protocol-templates -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install wshobson/agents defi-protocol-templates --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/wshobson/agents.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/blockchain-web3/skills/defi-protocol-templates .agents/skills/defi-protocol-templates && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "defi-protocol-templates" agent skill from https://github.com/wshobson/agents/tree/main/plugins/blockchain-web3/skills/defi-protocol-templates into .agents/skills/defi-protocol-templates/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "defi-protocol-templates", 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 wshobson/agents --skill defi-protocol-templates -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install wshobson/agents defi-protocol-templates --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/wshobson/agents.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/blockchain-web3/skills/defi-protocol-templates .cursor/skills/defi-protocol-templates && 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 "defi-protocol-templates" agent skill from https://github.com/wshobson/agents/tree/main/plugins/blockchain-web3/skills/defi-protocol-templates into .cursor/skills/defi-protocol-templates/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "defi-protocol-templates", 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/wshobson/agents.git --path plugins/blockchain-web3/skills/defi-protocol-templates--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 wshobson/agents --skill defi-protocol-templates -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install wshobson/agents defi-protocol-templates --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/wshobson/agents.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/blockchain-web3/skills/defi-protocol-templates .gemini/skills/defi-protocol-templates && 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 "defi-protocol-templates" agent skill from https://github.com/wshobson/agents/tree/main/plugins/blockchain-web3/skills/defi-protocol-templates into .gemini/skills/defi-protocol-templates/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "defi-protocol-templates", 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 wshobson/agents defi-protocol-templatesInstalls 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 wshobson/agents --skill defi-protocol-templates -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/wshobson/agents.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/blockchain-web3/skills/defi-protocol-templates .github/skills/defi-protocol-templates && 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 "defi-protocol-templates" agent skill from https://github.com/wshobson/agents/tree/main/plugins/blockchain-web3/skills/defi-protocol-templates into .github/skills/defi-protocol-templates/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "defi-protocol-templates", 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 wshobson/agents --skill defi-protocol-templates -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install wshobson/agents defi-protocol-templates --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/wshobson/agents.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/blockchain-web3/skills/defi-protocol-templates .opencode/skills/defi-protocol-templates && 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 "defi-protocol-templates" agent skill from https://github.com/wshobson/agents/tree/main/plugins/blockchain-web3/skills/defi-protocol-templates into .opencode/skills/defi-protocol-templates/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "defi-protocol-templates", 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.
defi-protocol-templatesSolidity templates for DeFi building blocks: staking with reward distribution, an automated market maker, governance tokens and flash loans.
The skill supplies Solidity starting points for common decentralized finance protocols. The excerpt includes a full staking contract for reward distribution and an automated market maker contract, and it names governance token systems and flash loan integration as further covered patterns.
It suits teams building staking platforms, AMM protocols, governance token systems or flash loan features. Longer templates and worked examples for the remaining patterns are in `references/details.md`.
Read from SKILL.md and the folder at commit 46891e7. 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.
DeFi Protocol Templates loads about 1.9k tokens when it runs, and up to ~3.3k if it reads all its reference files. Until then it costs about 53 tokens; SKILL.md has 68 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 wshobson/agents at commit 46891e7, republished under its MIT licence (© wshobson). 68 words, ~1,865 tokens.
.claude/skills/defi-protocol-templates/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Production-ready templates for common DeFi protocols including staking, AMMs, governance, and flash loans.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract StakingRewards is ReentrancyGuard, Ownable {
IERC20 public stakingToken;
IERC20 public rewardsToken;
uint256 public rewardRate = 100; // Rewards per second
uint256 public lastUpdateTime;
uint256 public rewardPerTokenStored;
mapping(address => uint256) public userRewardPerTokenPaid;
mapping(address => uint256) public rewards;
mapping(address => uint256) public balances;
uint256 private _totalSupply;
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, uint256 reward);
constructor(address _stakingToken, address _rewardsToken) {
stakingToken = IERC20(_stakingToken);
rewardsToken = IERC20(_rewardsToken);
}
modifier updateReward(address account) {
rewardPerTokenStored = rewardPerToken();
lastUpdateTime = block.timestamp;
if (account != address(0)) {
rewards[account] = earned(account);
userRewardPerTokenPaid[account] = rewardPerTokenStored;
}
_;
}
function rewardPerToken() public view returns (uint256) {
if (_totalSupply == 0) {
return rewardPerTokenStored;
}
return rewardPerTokenStored +
((block.timestamp - lastUpdateTime) * rewardRate * 1e18) / _totalSupply;
}
function earned(address account) public view returns (uint256) {
return (balances[account] *
(rewardPerToken() - userRewardPerTokenPaid[account])) / 1e18 +
rewards[account];
}
function stake(uint256 amount) external nonReentrant updateReward(msg.sender) {
require(amount > 0, "Cannot stake 0");
_totalSupply += amount;
balances[msg.sender] += amount;
stakingToken.transferFrom(msg.sender, address(this), amount);
emit Staked(msg.sender, amount);
}
function withdraw(uint256 amount) public nonReentrant updateReward(msg.sender) {
require(amount > 0, "Cannot withdraw 0");
_totalSupply -= amount;
balances[msg.sender] -= amount;
stakingToken.transfer(msg.sender, amount);
emit Withdrawn(msg.sender, amount);
}
function getReward() public nonReentrant updateReward(msg.sender) {
uint256 reward = rewards[msg.sender];
if (reward > 0) {
rewards[msg.sender] = 0;
rewardsToken.transfer(msg.sender, reward);
emit RewardPaid(msg.sender, reward);
}
}
function exit() external {
withdraw(balances[msg.sender]);
getReward();
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract SimpleAMM {
IERC20 public token0;
IERC20 public token1;
uint256 public reserve0;
uint256 public reserve1;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
event Mint(address indexed to, uint256 amount);
event Burn(address indexed from, uint256 amount);
event Swap(address indexed trader, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out);
constructor(address _token0, address _token1) {
token0 = IERC20(_token0);
token1 = IERC20(_token1);
}
function addLiquidity(uint256 amount0, uint256 amount1) external returns (uint256 shares) {
token0.transferFrom(msg.sender, address(this), amount0);
token1.transferFrom(msg.sender, address(this), amount1);
if (totalSupply == 0) {
shares = sqrt(amount0 * amount1);
} else {
shares = min(
(amount0 * totalSupply) / reserve0,
(amount1 * totalSupply) / reserve1
);
}
require(shares > 0, "Shares = 0");
_mint(msg.sender, shares);
_update(
token0.balanceOf(address(this)),
token1.balanceOf(address(this))
);
emit Mint(msg.sender, shares);
}
function removeLiquidity(uint256 shares) external returns (uint256 amount0, uint256 amount1) {
uint256 bal0 = token0.balanceOf(address(this));
uint256 bal1 = token1.balanceOf(address(this));
amount0 = (shares * bal0) / totalSupply;
amount1 = (shares * bal1) / totalSupply;
require(amount0 > 0 && amount1 > 0, "Amount0 or amount1 = 0");
_burn(msg.sender, shares);
_update(bal0 - amount0, bal1 - amount1);
token0.transfer(msg.sender, amount0);
token1.transfer(msg.sender, amount1);
emit Burn(msg.sender, shares);
}
function swap(address tokenIn, uint256 amountIn) external returns (uint256 amountOut) {
require(tokenIn == address(token0) || tokenIn == address(token1), "Invalid token");
bool isToken0 = tokenIn == address(token0);
(IERC20 tokenIn_, IERC20 tokenOut, uint256 resIn, uint256 resOut) = isToken0
? (token0, token1, reserve0, reserve1)
: (token1, token0, reserve1, reserve0);
tokenIn_.transferFrom(msg.sender, address(this), amountIn);
// 0.3% fee
uint256 amountInWithFee = (amountIn * 997) / 1000;
amountOut = (resOut * amountInWithFee) / (resIn + amountInWithFee);
tokenOut.transfer(msg.sender, amountOut);
_update(
token0.balanceOf(address(this)),
token1.balanceOf(address(this))
);
emit Swap(msg.sender, isToken0 ? amountIn : 0, isToken0 ? 0 : amountIn, isToken0 ? 0 : amountOut, isToken0 ? amountOut : 0);
}
function _mint(address to, uint256 amount) private {
balanceOf[to] += amount;
totalSupply += amount;
}
function _burn(address from, uint256 amount) private {
balanceOf[from] -= amount;
totalSupply -= amount;
}
function _update(uint256 res0, uint256 res1) private {
reserve0 = res0;
reserve1 = res1;
}
function sqrt(uint256 y) private pure returns (uint256 z) {
if (y > 3) {
z = y;
uint256 x = y / 2 + 1;
while (x < z) {
z = x;
x = (y / x + x) / 2;
}
} else if (y != 0) {
z = 1;
}
}
function min(uint256 x, uint256 y) private pure returns (uint256) {
return x <= y ? x : y;
}
}More detailed templates and worked examples live in references/details.md. Read that file for the full pattern library.
© wshobson, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (references) in plugins/blockchain-web3/skills/defi-protocol-templates of wshobson/agents.
Open the folder on GitHubat commit 46891e7
We found 24 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 11 other GitHub owners. This page covers the copy in wshobson/agents, which our catalogue first saw on October 7, 2026.
DeFi Protocol Templates 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 |
|---|---|---|---|---|---|---|
| DeFi Protocol Templates this skillwshobson/agents | 40k | 11 repos | ~1.9k | Automated safety check: Pass | MIT | |
| Ethskillsaustintgriffith/ethskills | 295 | — | ~1.4k | Automated safety check: Pass | None | |
| Chaingptinternet-court/internet-court-skill | 6.5k | 1 repos | ~4k | Automated safety check: Pass | MIT | |
| Ethskillsaustintgriffith/ethskills | 295 | — | ~3k | Automated safety check: Pass | None | |
| Blockchain DeveloperMicrock/ordinary-claude-skills | 404 | 1 repos | ~1.7k | Automated safety check: Pass | Custom licence | |
| Solidity Vulnerability Scanneralt-research2/SolidityGuard | 104 | — | ~1.6k | Automated safety check: Notes | Custom licence |
austintgriffith/ethskills
Ethereum development knowledge for AI agents — from idea to deployed dApp.
internet-court/internet-court-skill
Build with the ChainGPT Web3 AI developer platform. An agent skill from internet-court/internet-court-skill.
austintgriffith/ethskills
A skill your agent uses when a request involves Ethereum, the EVM, or blockchain systems.
Microck/ordinary-claude-skills
Expert blockchain developer specializing in smart contract development, DApp architecture, and DeFi protocols.
alt-research2/SolidityGuard
Comprehensive Solidity contract security scanner detecting 104 vulnerability patterns across reentrancy, access control, arithmetic, DeFi, proxy, and token categories.
ccashwell/evm-cortex
Front-running and MEV protection patterns for Solidity protocols.
wshobson/agents
Cuts cloud spend across AWS, Azure, GCP and OCI with cost tagging, rightsizing, commitment and spot pricing models, and architecture changes.
wshobson/agents
Covers building subscription billing: billing cycles, subscription states, invoice generation, proration, tax handling and dunning for failed payments.
wshobson/agents
Profiles slow Python code with cProfile and memory profilers, then applies targeted fixes for CPU, memory, I/O and query bottlenecks.
wshobson/agents
Writes unit tests for shell scripts with Bats: error-condition tests, fixtures and mocks, cross-shell checks, parallel runs, helper files and CI integration.
wshobson/agents
Implement distributed tracing with Jaeger and Tempo to track requests across microservices and identify performance bottlenecks.
wshobson/agents
Reference for designing and tuning production LLM prompts: few-shot examples, chain-of-thought, structured outputs, templates and system prompts.
Works with
Categories
Solidity templates for DeFi building blocks: staking with reward distribution, an automated market maker, governance tokens and flash loans. The skill supplies Solidity starting points for common decentralized finance protocols. The excerpt includes a full staking contract for reward distribution and an automated market maker contract, and it names governance token systems and flash loan integration as further covered patterns.
DeFi Protocol Templates fits situations like: building a staking platform with reward distribution; implementing an automated market maker protocol; creating a governance token system; integrating flash loan functionality into a protocol.
Run `npx skills add wshobson/agents --skill defi-protocol-templates -a claude-code`. Or copy the skill folder (plugins/blockchain-web3/skills/defi-protocol-templates in wshobson/agents) into .claude/skills/defi-protocol-templates in your project. Claude Code loads it when a task matches its description.
Run `npx skills add wshobson/agents --skill defi-protocol-templates -a codex`. Or copy the skill folder (plugins/blockchain-web3/skills/defi-protocol-templates in wshobson/agents) into .agents/skills/defi-protocol-templates 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 wshobson/agents --skill defi-protocol-templates -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/defi-protocol-templates, .gemini/skills/defi-protocol-templates, .github/skills/defi-protocol-templates and .opencode/skills/defi-protocol-templates in your project.
SKILL.md names no scripts, command-line tools or credentials: DeFi Protocol Templates 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.
DeFi Protocol Templates 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.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.4k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with DeFi Protocol Templates: Ethskills (austintgriffith/ethskills, 295 stars), Chaingpt (internet-court/internet-court-skill, 6.5k stars), Ethskills (austintgriffith/ethskills, 295 stars) and Blockchain Developer (Microck/ordinary-claude-skills, 404 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
wshobson (a GitHub user) maintains it in wshobson/agents, which has 40,305 GitHub stars. The repository holds 142 skills in this directory. The repository was last updated on October 5, 2026.
Source: wshobson/agents on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.