Sub2API Admin
Wei-Shaw/sub2api
Manages a Sub2API deployment from the command line: accounts, redeem and invitation codes, groups, proxies, imports, exports and raw admin API calls.
A skill your agent uses when building tokenized vaults with ERC-4626.
$ npx skills add ccashwell/evm-cortex --skill erc4626-patterns -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ccashwell/evm-cortex erc4626-patterns --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/erc4626-patterns .claude/skills/erc4626-patterns && 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 "erc4626-patterns" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/erc4626-patterns into .claude/skills/erc4626-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "erc4626-patterns", 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/erc4626-patternsType 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 erc4626-patterns -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ccashwell/evm-cortex erc4626-patterns --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/erc4626-patterns .agents/skills/erc4626-patterns && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "erc4626-patterns" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/erc4626-patterns into .agents/skills/erc4626-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "erc4626-patterns", 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 erc4626-patterns -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ccashwell/evm-cortex erc4626-patterns --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/erc4626-patterns .cursor/skills/erc4626-patterns && 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 "erc4626-patterns" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/erc4626-patterns into .cursor/skills/erc4626-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "erc4626-patterns", 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/erc4626-patterns--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 erc4626-patterns -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ccashwell/evm-cortex erc4626-patterns --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/erc4626-patterns .gemini/skills/erc4626-patterns && 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 "erc4626-patterns" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/erc4626-patterns into .gemini/skills/erc4626-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "erc4626-patterns", 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 erc4626-patternsInstalls 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 erc4626-patterns -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/erc4626-patterns .github/skills/erc4626-patterns && 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 "erc4626-patterns" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/erc4626-patterns into .github/skills/erc4626-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "erc4626-patterns", 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 erc4626-patterns -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 erc4626-patterns --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/erc4626-patterns .opencode/skills/erc4626-patterns && 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 "erc4626-patterns" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/erc4626-patterns into .opencode/skills/erc4626-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "erc4626-patterns", 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.
erc4626-patternsA skill your agent uses when building tokenized vaults with ERC-4626.
Erc4626 Patterns is an agent skill from ccashwell/evm-cortex. Use when building tokenized vaults with ERC-4626. Covers deposit/mint/withdraw/redeem, share math, rounding rules, first depositor attack mitigation, yield strategies, and integration patterns.
Its SKILL.md is about 1.9k 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 Third-party API integration. 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.
Erc4626 Patterns loads about 1.9k tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 202 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). 202 words, ~1,903 tokens.
.claude/skills/erc4626-patterns/SKILL.md (or your agent's skills folder).ERC-4626 standardizes yield-bearing vaults. Users deposit assets and receive shares:
interface IERC4626 is IERC20 {
function asset() external view returns (address);
function totalAssets() external view returns (uint256);
// Deposit flow: user specifies assets
function deposit(uint256 assets, address receiver) external returns (uint256 shares);
function mint(uint256 shares, address receiver) external returns (uint256 assets);
// Withdraw flow: user specifies assets or shares
function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares);
function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);
// Preview functions (simulate without executing)
function previewDeposit(uint256 assets) external view returns (uint256 shares);
function previewMint(uint256 shares) external view returns (uint256 assets);
function previewWithdraw(uint256 assets) external view returns (uint256 shares);
function previewRedeem(uint256 shares) external view returns (uint256 assets);
// Limits
function maxDeposit(address receiver) external view returns (uint256);
function maxMint(address receiver) external view returns (uint256);
function maxWithdraw(address owner) external view returns (uint256);
function maxRedeem(address owner) external view returns (uint256);
function convertToShares(uint256 assets) external view returns (uint256);
function convertToAssets(uint256 shares) external view returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {ERC4626} from "@openzeppelin/contracts/token/ERC20/extensions/ERC4626.sol";
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {Math} from "@openzeppelin/contracts/utils/Math.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
contract SecureVault is ERC4626 {
using SafeERC20 for IERC20;
constructor(IERC20 asset_)
ERC4626(asset_)
ERC20("Vault Shares", "vASSET")
{}
/// @dev OpenZeppelin ERC4626 already uses virtual shares/assets
/// (decimalsOffset = 0 by default, but _decimalsOffset() can be overridden).
/// Override to add +3 offset for first-depositor attack mitigation:
function _decimalsOffset() internal pure override returns (uint8) {
return 3;
}
}The fundamental equation: shares * totalAssets == assets * totalSupply
shares = assets * totalSupply / totalAssets (deposit, round DOWN → favor vault)
assets = shares * totalAssets / totalSupply (redeem, round DOWN → favor vault)Rounding convention (always favor the vault to prevent rounding exploits):
| Operation | User sends | User receives | Round |
|---|---|---|---|
| deposit | assets | shares | DOWN (fewer shares) |
| mint | assets | shares | UP (more assets) |
| withdraw | shares | assets | UP (more shares burned) |
| redeem | shares | assets | DOWN (fewer assets) |
// OpenZeppelin handles rounding internally:
function _convertToShares(uint256 assets, Math.Rounding rounding)
internal view virtual returns (uint256)
{
return assets.mulDiv(totalSupply() + 10 ** _decimalsOffset(), totalAssets() + 1, rounding);
}The attack: first depositor mints 1 share, then donates large amount of assets directly to the vault. Subsequent depositors get 0 shares due to rounding.
Solution 1: Virtual shares/assets (recommended)
OpenZeppelin adds virtual offset to prevent manipulation:
function _decimalsOffset() internal pure override returns (uint8) {
return 3; // 1000 virtual shares — cost of attack becomes prohibitive
}Solution 2: Dead shares on first deposit
function _afterDeposit(uint256 assets, uint256 shares) internal virtual {
if (totalSupply() == shares) {
// First deposit: burn minimum shares to address(1)
uint256 deadShares = 10 ** decimals() / 1000;
_mint(address(1), deadShares);
}
}contract YieldVault is ERC4626 {
ILendingPool public immutable lendingPool;
constructor(IERC20 asset_, ILendingPool pool_)
ERC4626(asset_) ERC20("Yield Vault", "yASSET")
{
lendingPool = pool_;
asset_.approve(address(pool_), type(uint256).max);
}
function totalAssets() public view override returns (uint256) {
return lendingPool.balanceOf(address(this));
}
function _deposit(address caller, address receiver, uint256 assets, uint256 shares)
internal override
{
super._deposit(caller, receiver, assets, shares);
IERC20(asset()).safeTransfer(address(lendingPool), assets);
lendingPool.deposit(assets);
}
function _withdraw(
address caller, address receiver, address owner, uint256 assets, uint256 shares
) internal override {
lendingPool.withdraw(assets);
super._withdraw(caller, receiver, owner, assets, shares);
}
}// Pausable vault example
function maxDeposit(address) public view override returns (uint256) {
return paused() ? 0 : type(uint256).max;
}
function maxMint(address) public view override returns (uint256) {
return paused() ? 0 : type(uint256).max;
}
// Deposit caps
uint256 public depositCap;
function maxDeposit(address) public view override returns (uint256) {
uint256 remaining = depositCap > totalAssets() ? depositCap - totalAssets() : 0;
return paused() ? 0 : remaining;
}function test_depositAndRedeem_roundTrip() public {
uint256 assets = 1e18;
deal(address(token), alice, assets);
vm.startPrank(alice);
token.approve(address(vault), assets);
uint256 shares = vault.deposit(assets, alice);
assertEq(vault.balanceOf(alice), shares);
assertEq(vault.convertToAssets(shares), assets);
uint256 redeemed = vault.redeem(shares, alice, alice);
assertEq(redeemed, assets);
vm.stopPrank();
}
function test_previewMatchesActual() public {
uint256 assets = 1e18;
uint256 previewShares = vault.previewDeposit(assets);
deal(address(token), alice, assets);
vm.startPrank(alice);
token.approve(address(vault), assets);
uint256 actualShares = vault.deposit(assets, alice);
vm.stopPrank();
assertEq(actualShares, previewShares, "Preview must match actual");
}_decimalsOffset >= 3) to prevent first depositor attacktotalAssets cannot be manipulated via direct token transfers© 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/erc4626-patterns of ccashwell/evm-cortex.
Open the folder on GitHubat commit f8f3301
Erc4626 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Erc4626 Patterns this skillccashwell/evm-cortex | 131 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Sub2API AdminWei-Shaw/sub2api | 43k | 1 repos | ~717 | Automated safety check: Pass | LGPL-3.0 | |
| Firecrawl Build Onboardingfirecrawl/firecrawl | 190k | 1 repos | ~1.4k | Automated safety check: Notes | ISC | |
| ToolJet Marketplace Plugin BuilderToolJet/ToolJet | 41k | — | ~2.1k | Automated safety check: Pass | AGPL-3.0 | |
| Firecrawl Search Integrationfirecrawl/firecrawl | 190k | 1 repos | ~1.1k | Automated safety check: Pass | ISC | |
| CoinGecko API Reference2025Emma/vibe-coding-cn | 23k | 2 repos | ~646 | Automated safety check: Pass | MIT |
Wei-Shaw/sub2api
Manages a Sub2API deployment from the command line: accounts, redeem and invitation codes, groups, proxies, imports, exports and raw admin API calls.
firecrawl/firecrawl
Gets Firecrawl working in a project: signs you in through the browser, saves FIRECRAWL_API_KEY to .env and picks the first SDK or REST path.
ToolJet/ToolJet
Turns an API description, such as an OpenAPI file or a Postman collection, into a connector plugin for ToolJet's marketplace and checks it with the repo's validator.
firecrawl/firecrawl
Guidance for adding Firecrawl's /search endpoint to product code and agent workflows when a feature starts from a query rather than a URL.
2025Emma/vibe-coding-cn
CoinGecko API documentation - cryptocurrency market data API, price feeds, market cap, volume, historical data. Use when integrating CoinGecko API, building…
internet-court/internet-court-skill
Builds cross-chain token swaps and bridge flows with the NEAR Intents 1Click API: quotes, deposit addresses, per-chain deposits and status polling.
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
A skill your agent uses when building tokenized vaults with ERC-4626. Erc4626 Patterns is an agent skill from ccashwell/evm-cortex. Use when building tokenized vaults with ERC-4626.
Erc4626 Patterns fits situations like: building tokenized vaults with ERC-4626; tasks that involve Third-party API integration.
Run `npx skills add ccashwell/evm-cortex --skill erc4626-patterns -a claude-code`. Or copy the skill folder (skills/erc4626-patterns in ccashwell/evm-cortex) into .claude/skills/erc4626-patterns in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ccashwell/evm-cortex --skill erc4626-patterns -a codex`. Or copy the skill folder (skills/erc4626-patterns in ccashwell/evm-cortex) into .agents/skills/erc4626-patterns 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 erc4626-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/erc4626-patterns, .gemini/skills/erc4626-patterns, .github/skills/erc4626-patterns and .opencode/skills/erc4626-patterns in your project.
SKILL.md names no scripts, command-line tools or credentials: Erc4626 Patterns 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.
Erc4626 Patterns 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.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 Erc4626 Patterns: Sub2API Admin (Wei-Shaw/sub2api, 43k stars), Firecrawl Build Onboarding (firecrawl/firecrawl, 190k stars), ToolJet Marketplace Plugin Builder (ToolJet/ToolJet, 41k stars) and Firecrawl Search Integration (firecrawl/firecrawl, 190k 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.