Deposit Qr
Superior-Trade/superior-skills
A skill your agent uses when a user needs a QR code or wallet payment URI to fund a Superior-managed EVM wallet on a specific chain before using Lighter, Polymarket, Hyperliquid, or other Superior…
Safe integration patterns for non-standard ERC-20 tokens. An agent skill from ccashwell/evm-cortex.
$ npx skills add ccashwell/evm-cortex --skill token-integration-safety -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ccashwell/evm-cortex token-integration-safety --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/token-integration-safety .claude/skills/token-integration-safety && 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 "token-integration-safety" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/token-integration-safety into .claude/skills/token-integration-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-integration-safety", 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/token-integration-safetyType 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 token-integration-safety -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ccashwell/evm-cortex token-integration-safety --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/token-integration-safety .agents/skills/token-integration-safety && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "token-integration-safety" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/token-integration-safety into .agents/skills/token-integration-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-integration-safety", 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 token-integration-safety -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ccashwell/evm-cortex token-integration-safety --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/token-integration-safety .cursor/skills/token-integration-safety && 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 "token-integration-safety" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/token-integration-safety into .cursor/skills/token-integration-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-integration-safety", 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/token-integration-safety--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 token-integration-safety -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ccashwell/evm-cortex token-integration-safety --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/token-integration-safety .gemini/skills/token-integration-safety && 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 "token-integration-safety" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/token-integration-safety into .gemini/skills/token-integration-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-integration-safety", 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 token-integration-safetyInstalls 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 token-integration-safety -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/token-integration-safety .github/skills/token-integration-safety && 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 "token-integration-safety" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/token-integration-safety into .github/skills/token-integration-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-integration-safety", 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 token-integration-safety -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 token-integration-safety --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/token-integration-safety .opencode/skills/token-integration-safety && 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 "token-integration-safety" agent skill from https://github.com/ccashwell/evm-cortex/tree/main/skills/token-integration-safety into .opencode/skills/token-integration-safety/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-integration-safety", 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.
token-integration-safetySafe integration patterns for non-standard ERC-20 tokens. An agent skill from ccashwell/evm-cortex.
Token Integration Safety is an agent skill from ccashwell/evm-cortex. Safe integration patterns for non-standard ERC-20 tokens. Use when building protocols that accept arbitrary tokens. Covers USDT (no return value), USDC (6 decimals, blacklist), fee-on-transfer, rebasing tokens, ERC-777 callbacks, pausable tokens, and Permit2.
Its SKILL.md is about 2k 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. It works with Circle USDC and Ethereum. 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.
Token Integration Safety loads about 2k tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 326 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). 326 words, ~1,976 tokens.
.claude/skills/token-integration-safety/SKILL.md (or your agent's skills folder).This is the single most important rule. Never call transfer, transferFrom, or approve directly.
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
contract Vault {
using SafeERC20 for IERC20;
function deposit(IERC20 token, uint256 amount) external {
token.safeTransferFrom(msg.sender, address(this), amount);
}
function withdraw(IERC20 token, uint256 amount) external {
token.safeTransfer(msg.sender, amount);
}
function approve(IERC20 token, address spender, uint256 amount) external {
token.forceApprove(spender, amount);
}
}USDT's transfer() and transferFrom() don't return a bool. Direct calls via the IERC20 interface will revert because Solidity expects return data.
// BROKEN with USDT:
IERC20(usdt).transfer(to, amount); // reverts — no return data
// WORKS with USDT:
IERC20(usdt).safeTransfer(to, amount); // SafeERC20 handles missing returnUSDT also requires approval to be set to 0 before changing to a non-zero value:
// BROKEN with USDT:
IERC20(usdt).approve(spender, newAmount); // reverts if current approval != 0
// WORKS with USDT:
IERC20(usdt).forceApprove(spender, newAmount); // sets to 0 first, then newAmount// USDC uses 6 decimals, not 18
// 1 USDC = 1_000_000 (1e6), NOT 1e18
// VULNERABLE: hardcoded 18 decimals
uint256 usdcAmount = ethAmount * ethPrice / 1e18; // wrong!
// SAFE: use actual decimals
uint8 decimals = IERC20Metadata(address(usdc)).decimals(); // returns 6
uint256 usdcAmount = ethAmount * ethPrice / (10 ** (18 - decimals + 18));USDC has a blacklist. Blacklisted addresses cannot send or receive USDC. Your protocol must handle transfer failures gracefully.
// If a blacklisted user has funds in your vault, they cannot withdraw
// Consider: allow withdrawal to a different address (with proper auth)
function withdrawTo(address token, address recipient, uint256 amount) external {
if (balances[msg.sender] < amount) revert InsufficientBalance();
balances[msg.sender] -= amount;
IERC20(token).safeTransfer(recipient, amount);
}Some tokens deduct a fee on every transfer. The received amount is less than the sent amount.
// VULNERABLE: assumes received amount equals sent amount
function deposit(IERC20 token, uint256 amount) external {
token.safeTransferFrom(msg.sender, address(this), amount);
balances[msg.sender] += amount; // WRONG: received less than amount
}
// SAFE: measure actual received amount
function deposit(IERC20 token, uint256 amount) external {
uint256 balanceBefore = token.balanceOf(address(this));
token.safeTransferFrom(msg.sender, address(this), amount);
uint256 received = token.balanceOf(address(this)) - balanceBefore;
balances[msg.sender] += received;
emit Deposited(msg.sender, address(token), received);
}Decision: Many protocols explicitly reject fee-on-transfer tokens for simplicity. Document this clearly if so.
Rebasing tokens change balances automatically. balanceOf() returns different values over time without transfers.
// PROBLEM: stored balance becomes stale
mapping(address => uint256) public balances;
function deposit(uint256 amount) external {
stETH.safeTransferFrom(msg.sender, address(this), amount);
balances[msg.sender] += amount; // balance will change via rebasing
}
// SOLUTION 1: Use the wrapped, non-rebasing version
// stETH → wstETH (wrapped stETH, non-rebasing)
// aUSDC → use share-based accounting internally
// SOLUTION 2: Share-based accounting (ERC-4626 pattern)
function deposit(uint256 assets) external returns (uint256 shares) {
shares = convertToShares(assets);
_mint(msg.sender, shares);
stETH.safeTransferFrom(msg.sender, address(this), assets);
}ERC-777 tokens call tokensToSend() on the sender and tokensReceived() on the recipient. This creates reentrancy vectors.
// Risk: any transfer of an ERC-777 token triggers a callback
// If your contract receives an ERC-777 token, tokensReceived() is called
// An attacker can exploit this callback for reentrancy
// Defense: ReentrancyGuard on all functions that transfer tokens
function deposit(IERC20 token, uint256 amount) external nonReentrant {
token.safeTransferFrom(msg.sender, address(this), amount);
_updateBalance(msg.sender, amount);
}USDC, USDT, and others can freeze/blocklist addresses. Your protocol should handle this.
// Consider: what happens if a user gets blocklisted after depositing?
// - They can't receive tokens back
// - Their position may become unliquidatable
// - Protocol accounting may break
// Mitigation: allow withdrawal to alternative addresses
// Mitigation: allow admin rescue for stuck funds (with timelock)Some tokens (USDC, USDT) can be paused globally by their admin, blocking all transfers.
// If the underlying token is paused:
// - deposits fail
// - withdrawals fail
// - liquidations fail (potentially dangerous)
// Mitigation: emergency mode that accounts for paused underlying
// Mitigation: alternative settlement pathsPermit2 provides a universal approval mechanism for all ERC-20 tokens (even those without EIP-2612).
import {IPermit2} from "permit2/interfaces/IPermit2.sol";
contract VaultWithPermit2 {
IPermit2 public immutable PERMIT2;
function depositWithPermit2(
address token,
uint256 amount,
uint256 nonce,
uint256 deadline,
bytes calldata signature
) external {
PERMIT2.permitTransferFrom(
IPermit2.PermitTransferFrom({
permitted: IPermit2.TokenPermissions({token: token, amount: amount}),
nonce: nonce,
deadline: deadline
}),
IPermit2.SignatureTransferDetails({
to: address(this),
requestedAmount: amount
}),
msg.sender,
signature
);
_recordDeposit(msg.sender, token, amount);
}
}| Token | Decimals | Return Bool | Blocklist | Pausable | Fee-on-Transfer | Rebasing |
|---|---|---|---|---|---|---|
| USDT | 6 | No | Yes | Yes | No | No |
| USDC | 6 | Yes | Yes | Yes | No | No |
| DAI | 18 | Yes | No | No | No | No |
| WETH | 18 | Yes | No | No | No | No |
| WBTC | 8 | Yes | No | No | No | No |
| stETH | 18 | Yes | No | No | No | Yes |
| PAXG | 18 | Yes | Yes | Yes | Yes (0.02%) | No |
forceApprove used instead of approve (USDT compatibility)decimals()© 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/token-integration-safety of ccashwell/evm-cortex.
Open the folder on GitHubat commit f8f3301
Token Integration Safety 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 |
|---|---|---|---|---|---|---|
| Token Integration Safety this skillccashwell/evm-cortex | 131 | — | ~2k | Automated safety check: Pass | MIT | |
| Deposit QrSuperior-Trade/superior-skills | 214 | — | ~1.1k | Automated safety check: Pass | MIT | |
| Alchemy Agentic Gatewaymoonpay/skills | 113 | — | ~2.1k | Automated safety check: Notes | MIT | |
| NEAR Intents Swap Integrationinternet-court/internet-court-skill | 6.5k | 1 repos | ~939 | Automated safety check: Pass | Custom licence | |
| Uniswap V3 Swapkeypo-us/keypo-cli | 182 | — | ~3.2k | Automated safety check: Pass | MIT | |
| Payram Crypto PaymentsPayRam/payram-mcp | 158 | — | ~2k | Automated safety check: Notes | None |
Superior-Trade/superior-skills
A skill your agent uses when a user needs a QR code or wallet payment URI to fund a Superior-managed EVM wallet on a specific chain before using Lighter, Polymarket, Hyperliquid, or other Superior…
moonpay/skills
A skill your agent uses when accessing Alchemy APIs for RPC calls, token balances, NFT metadata, asset transfers, transaction simulation, or Alchemy-specific features.
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.
keypo-us/keypo-cli
A skill your agent uses when the user wants to swap tokens on Base Sepolia (or Base mainnet) using Uniswap V3.
PayRam/payram-mcp
Self-hosted crypto and stablecoin payment gateway. An agent skill from PayRam/payram-mcp.
internet-court/internet-court-skill
Guides building Solana apps on Helius: sending transactions, asset and NFT queries, live streaming, webhooks, priority fees, wallet analysis and API key onboarding.
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.
Works with
Categories
Safe integration patterns for non-standard ERC-20 tokens. An agent skill from ccashwell/evm-cortex. Token Integration Safety is an agent skill from ccashwell/evm-cortex. Safe integration patterns for non-standard ERC-20 tokens.
Token Integration Safety fits situations like: building protocols that accept arbitrary tokens; tasks that involve Third-party API integration.
Run `npx skills add ccashwell/evm-cortex --skill token-integration-safety -a claude-code`. Or copy the skill folder (skills/token-integration-safety in ccashwell/evm-cortex) into .claude/skills/token-integration-safety in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ccashwell/evm-cortex --skill token-integration-safety -a codex`. Or copy the skill folder (skills/token-integration-safety in ccashwell/evm-cortex) into .agents/skills/token-integration-safety 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 token-integration-safety -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/token-integration-safety, .gemini/skills/token-integration-safety, .github/skills/token-integration-safety and .opencode/skills/token-integration-safety in your project.
SKILL.md names no scripts, command-line tools or credentials: Token Integration Safety 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.
Token Integration Safety is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2k tokens (SKILL.md is roughly 7.9k 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 Token Integration Safety: Deposit Qr (Superior-Trade/superior-skills, 214 stars), Alchemy Agentic Gateway (moonpay/skills, 113 stars), NEAR Intents Swap Integration (internet-court/internet-court-skill, 6.5k stars) and Uniswap V3 Swap (keypo-us/keypo-cli, 182 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.