Token Budget Advisor
affaan-m/ECC
回答する前に、どれだけの回答深度を消費するかについてユーザーに情報に基づいた選択を提供する。ユーザーが回答の長さ、深さ、またはトークンバジェットを明示的に制御したい場合にこのスキルを使用する。トリガー条件:"token budget", "token count", "token usage", "token limit", "response length", "answer depth"…
A skill your agent uses when building ERC-4626 tokenized vaults, yield aggregators, or share-based deposit/withdraw systems.
$ npx skills add ccashwell/evm-cortex --skill yield-vault-patterns -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ccashwell/evm-cortex yield-vault-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/yield-vault-patterns .claude/skills/yield-vault-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 "yield-vault-patterns" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/yield-vault-patterns into .claude/skills/yield-vault-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "yield-vault-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/yield-vault-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 yield-vault-patterns -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ccashwell/evm-cortex yield-vault-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/yield-vault-patterns .agents/skills/yield-vault-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 "yield-vault-patterns" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/yield-vault-patterns into .agents/skills/yield-vault-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "yield-vault-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 yield-vault-patterns -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ccashwell/evm-cortex yield-vault-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/yield-vault-patterns .cursor/skills/yield-vault-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 "yield-vault-patterns" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/yield-vault-patterns into .cursor/skills/yield-vault-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "yield-vault-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/yield-vault-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 yield-vault-patterns -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ccashwell/evm-cortex yield-vault-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/yield-vault-patterns .gemini/skills/yield-vault-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 "yield-vault-patterns" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/yield-vault-patterns into .gemini/skills/yield-vault-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "yield-vault-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 yield-vault-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 yield-vault-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/yield-vault-patterns .github/skills/yield-vault-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 "yield-vault-patterns" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/yield-vault-patterns into .github/skills/yield-vault-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "yield-vault-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 yield-vault-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 yield-vault-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/yield-vault-patterns .opencode/skills/yield-vault-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 "yield-vault-patterns" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/yield-vault-patterns into .opencode/skills/yield-vault-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "yield-vault-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.
yield-vault-patternsA skill your agent uses when building ERC-4626 tokenized vaults, yield aggregators, or share-based deposit/withdraw systems.
Yield Vault Patterns is an agent skill from ccashwell/evm-cortex. Use when building ERC-4626 tokenized vaults, yield aggregators, or share-based deposit/withdraw systems. Covers share math, rounding, first depositor attack mitigation, and complete implementation patterns.
Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
The repository describes itself as: Ethereum protocol engineering squad for AI coding assistants. The licence is MIT.
3 steps, taken from the first numbered list in SKILL.md.
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.
Yield Vault Patterns loads about 1.8k tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 181 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). 181 words, ~1,768 tokens.
.claude/skills/yield-vault-patterns/SKILL.md (or your agent's skills folder).ERC-4626 standardizes yield-bearing vaults. Depositors receive shares proportional to their deposit. Shares appreciate as the vault earns yield.
Core Invariant: shares * totalAssets / totalShares = user's assets
deposit: shares = assets * totalSupply / totalAssets (round DOWN)
mint: assets = shares * totalAssets / totalSupply (round UP)
withdraw: shares = assets * totalSupply / totalAssets (round UP)
redeem: assets = shares * totalAssets / totalSupply (round DOWN)Rounding rule: Always round in favor of the vault (against the user) to prevent value extraction.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
import {IERC4626} from "@openzeppelin/contracts/interfaces/IERC4626.sol";
contract YieldVault is ERC20, IERC4626 {
using SafeERC20 for IERC20;
using Math for uint256;
IERC20 public immutable asset_;
uint8 private immutable _decimals;
// Virtual shares/assets to prevent first depositor attack
uint256 internal constant VIRTUAL_SHARES = 1e3;
uint256 internal constant VIRTUAL_ASSETS = 1;
constructor(IERC20 _asset, string memory name, string memory symbol)
ERC20(name, symbol)
{
asset_ = _asset;
_decimals = ERC20(address(_asset)).decimals();
}
function asset() external view returns (address) { return address(asset_); }
function decimals() public view override returns (uint8) { return _decimals; }
function totalAssets() public view returns (uint256) {
return asset_.balanceOf(address(this));
}
function convertToShares(uint256 assets) public view returns (uint256) {
return assets.mulDiv(
totalSupply() + VIRTUAL_SHARES,
totalAssets() + VIRTUAL_ASSETS,
Math.Rounding.Floor
);
}
function convertToAssets(uint256 shares) public view returns (uint256) {
return shares.mulDiv(
totalAssets() + VIRTUAL_ASSETS,
totalSupply() + VIRTUAL_SHARES,
Math.Rounding.Floor
);
}
function maxDeposit(address) external pure returns (uint256) {
return type(uint256).max;
}
function maxMint(address) external pure returns (uint256) {
return type(uint256).max;
}
function maxWithdraw(address owner) external view returns (uint256) {
return convertToAssets(balanceOf(owner));
}
function maxRedeem(address owner) external view returns (uint256) {
return balanceOf(owner);
}
function previewDeposit(uint256 assets) public view returns (uint256) {
return convertToShares(assets);
}
function previewMint(uint256 shares) public view returns (uint256) {
return shares.mulDiv(
totalAssets() + VIRTUAL_ASSETS,
totalSupply() + VIRTUAL_SHARES,
Math.Rounding.Ceil // round UP against user
);
}
function previewWithdraw(uint256 assets) public view returns (uint256) {
return assets.mulDiv(
totalSupply() + VIRTUAL_SHARES,
totalAssets() + VIRTUAL_ASSETS,
Math.Rounding.Ceil // round UP against user
);
}
function previewRedeem(uint256 shares) public view returns (uint256) {
return convertToAssets(shares);
}
function deposit(uint256 assets, address receiver) external returns (uint256 shares) {
shares = previewDeposit(assets);
require(shares > 0, "zero shares");
asset_.safeTransferFrom(msg.sender, address(this), assets);
_mint(receiver, shares);
emit Deposit(msg.sender, receiver, assets, shares);
}
function mint(uint256 shares, address receiver) external returns (uint256 assets) {
assets = previewMint(shares);
asset_.safeTransferFrom(msg.sender, address(this), assets);
_mint(receiver, shares);
emit Deposit(msg.sender, receiver, assets, shares);
}
function withdraw(uint256 assets, address receiver, address owner_)
external returns (uint256 shares)
{
shares = previewWithdraw(assets);
if (msg.sender != owner_) {
_spendAllowance(owner_, msg.sender, shares);
}
_burn(owner_, shares);
asset_.safeTransfer(receiver, assets);
emit Withdraw(msg.sender, receiver, owner_, assets, shares);
}
function redeem(uint256 shares, address receiver, address owner_)
external returns (uint256 assets)
{
assets = previewRedeem(shares);
if (msg.sender != owner_) {
_spendAllowance(owner_, msg.sender, shares);
}
_burn(owner_, shares);
asset_.safeTransfer(receiver, assets);
emit Withdraw(msg.sender, receiver, owner_, assets, shares);
}
}Without protection, an attacker can:
totalAssetsVirtual shares/assets solve this by ensuring the exchange rate always has a floor:
uint256 internal constant VIRTUAL_SHARES = 1e3;
uint256 internal constant VIRTUAL_ASSETS = 1;
// Share calculation uses (totalSupply + VIRTUAL_SHARES) / (totalAssets + VIRTUAL_ASSETS)
// Cost of attack = VIRTUAL_SHARES * donation_amount / VIRTUAL_ASSETSOpenZeppelin's ERC4626 uses _decimalsOffset() which is equivalent.
function totalAssets() public view override returns (uint256) {
// Include assets deployed to yield strategies
return asset_.balanceOf(address(this)) + _deployedAssets();
}
function harvest() external {
// Collect yield from strategy, increasing totalAssets
// Share price automatically increases for all holders
strategy.claim();
}deposit and redeem (favors vault)mint and withdraw (favors vault)totalAssets() includes all assets under management (not just balance)preview* functions match actual execution (same rounding)max* functions account for strategy liquidity limitsDeposit and Withdraw events per spec© 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/yield-vault-patterns of ccashwell/evm-cortex.
Open the folder on GitHubat commit f8f3301
Yield Vault 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 |
|---|---|---|---|---|---|---|
| Yield Vault Patterns this skillccashwell/evm-cortex | 131 | — | ~1.8k | Automated safety check: Pass | MIT | |
| Token Budget Advisoraffaan-m/ECC | 274k | — | ~910 | Automated safety check: Pass | MIT | |
| Token Budget Advisoraffaan-m/ECC | 274k | — | ~927 | Automated safety check: Pass | MIT | |
| UI Tokenssickn33/agentic-awesome-skills | 47k | 1 repos | ~691 | Automated safety check: Pass | MIT | |
| Yield Intelligencesickn33/agentic-awesome-skills | 47k | 1 repos | ~1.1k | Automated safety check: Pass | MIT | |
| Token Mapnexu-io/open-design | 100k | — | ~1.4k | Automated safety check: Pass | Apache-2.0 |
affaan-m/ECC
回答する前に、どれだけの回答深度を消費するかについてユーザーに情報に基づいた選択を提供する。ユーザーが回答の長さ、深さ、またはトークンバジェットを明示的に制御したい場合にこのスキルを使用する。トリガー条件:"token budget", "token count", "token usage", "token limit", "response length", "answer depth"…
affaan-m/ECC
在回答前,为用户提供关于消耗多少响应深度的知情选择。当用户明确希望控制响应长度、深度或令牌预算时使用此技能。触发条件:"token budget", "token count", "token usage", "token limit", "response length", "answer depth", "short version", "brief answer", "detailed…
sickn33/agentic-awesome-skills
View, add, or modify design tokens in the StyleSeed design system
sickn33/agentic-awesome-skills
Passive income portfolio analysis — activate when user asks about dividend yields, Treasury rates, REIT income, monthly passive income goals, or portfolio yield optimization.
nexu-io/open-design
Map an extracted Figma / source-code token bag onto the active OD design system, producing a deterministic mapping the generate stage can consume.
ruvnet/ruflo
Scaffold an aggregate root with entity, value objects, repository interface, domain events, and test stubs.
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.
A skill your agent uses when building ERC-4626 tokenized vaults, yield aggregators, or share-based deposit/withdraw systems. Yield Vault Patterns is an agent skill from ccashwell/evm-cortex. Use when building ERC-4626 tokenized vaults, yield aggregators, or share-based deposit/withdraw systems.
Yield Vault Patterns fits situations like: building ERC-4626 tokenized vaults; yield aggregators; share-based deposit/withdraw systems.
Run `npx skills add ccashwell/evm-cortex --skill yield-vault-patterns -a claude-code`. Or copy the skill folder (skills/yield-vault-patterns in ccashwell/evm-cortex) into .claude/skills/yield-vault-patterns in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ccashwell/evm-cortex --skill yield-vault-patterns -a codex`. Or copy the skill folder (skills/yield-vault-patterns in ccashwell/evm-cortex) into .agents/skills/yield-vault-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 yield-vault-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/yield-vault-patterns, .gemini/skills/yield-vault-patterns, .github/skills/yield-vault-patterns and .opencode/skills/yield-vault-patterns in your project.
SKILL.md names no scripts, command-line tools or credentials: Yield Vault 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.
Yield Vault 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.8k tokens (SKILL.md is roughly 7.1k 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 Yield Vault Patterns: Token Budget Advisor (affaan-m/ECC, 274k stars), Token Budget Advisor (affaan-m/ECC, 274k stars), UI Tokens (sickn33/agentic-awesome-skills, 47k stars) and Yield Intelligence (sickn33/agentic-awesome-skills, 47k 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.