usdc-integration

usdc-integration is a skill for Claude Code, Codex from ccashwell/evm-cortex. It costs 75 tokens per session (6,804 once invoked), scanned A, original, MIT.

A guide to using USDC, a dollar-linked digital token, in smart contracts. It explains USDC's six-decimal number format, transfers, approvals, addresses, different chain versions, permits, and blocklist behavior.

In plain words
What is it for?
Use it when adding USDC payments, balances, transfers, approvals, or permits to blockchain applications.
Why use it?
It helps avoid amount-conversion mistakes and integration failures when contracts handle USDC alongside tokens that use 18 decimals.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import {USDCVault} from "../src/USDCVault.sol";.

Good fit Use it when adding USDC payments, balances, transfers, approvals, or permits to blockchain applications.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/ccashwell/evm-cortex
agentmods
npx agentmods add skills/ccashwell/evm-cortex/usdc-integration

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for usdc-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/ccashwell/evm-cortex/usdc-integration/github.svg)](https://agentmods.dev/skills/ccashwell/evm-cortex/usdc-integration)
Your own site
<a href="https://agentmods.dev/skills/ccashwell/evm-cortex/usdc-integration"><img src="https://agentmods.dev/badge/skills/ccashwell/evm-cortex/usdc-integration/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for usdc-integration

Your own site · 80×15
<a href="https://agentmods.dev/skills/ccashwell/evm-cortex/usdc-integration"><img src="https://agentmods.dev/badge/skills/ccashwell/evm-cortex/usdc-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,804 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00075 $0.06804
Opus 5.5 $0.00030 $0.02722
Sonnet 5.5 $0.00015 $0.01361
Haiku 4.5 $0.00007 $0.00680

Measured 1mo ago against content hash 96290a8e0343, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

usdc-integration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/usdc-integration/SKILL.md · 683 lines

How it starts

The opening of the file, as written. The whole thing — 683 lines — stays where its author put it; the contents beside it link to each section on GitHub.

USDC Integration for Smart Contracts

The 6-Decimal Rule

USDC uses 6 decimals on every chain. Not 18. This is the single most common integration bug.

// 1 USDC = 1_000_000 (1e6)
uint256 constant USDC_UNIT = 1e6;

// $100 USDC
uint256 amount = 100 * 1e6; // 100_000_000

// $0.01 USDC (one cent)
uint256 oneCent = 1e4; // 10_000

// WRONG — this is 1 trillion USDC ($1,000,000,000,000)
uint256 catastrophic = 1e18;

Decimal Conversion

When protocols mix USDC (6 decimals) with 18-decimal tokens (WETH, DAI, most ERC-20s), explicit scaling is required:

uint256 constant SCALE_FACTOR = 1e12; // 18 - 6 = 12

// Scale 6 → 18 (lossless)
uint256 wad = usdcAmount * SCALE_FACTOR;

// Scale 18 → 6 (LOSES up to 1e12 - 1 wei of precision)
uint256 usdc = wadAmount / SCALE_FACTOR;

Never scale in a single arithmetic expression without isolating the conversion. Multiply before dividing to preserve precision:

// BAD — precision loss compounds
uint256 result = (usdcAmount * price) / 1e18;

// BETTER — scale USDC to 18 decimals first, then divide
uint256 result = (usdcAmount * SCALE_FACTOR * price) / 1e18;

// BEST — use a helper that makes intent explicit
uint256 result = _toWad(usdcAmount) * price / 1e18;

Production Contract Addresses

Mainnet — Native (Circle-issued) USDC

These are the canonical addresses issued directly by Circle via CCTP. All are FiatTokenV2_2 proxies.

Chain Address Chain ID
Ethereum 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 1
Base 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 8453
Arbitrum One 0xaf88d065e77c8cC2239327C5EDb3A432268e5831 42161
Optimism 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85 10
Polygon PoS 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359 137
Avalanche C-Chain 0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E 43114
Solana EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v —

Testnet Addresses

Read the full file on GitHub · 683 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 683 lines · 75 tokens per session scan A 96290a8e0343

Subscribe to this mod's changes

usdc-integration is a skill published in the GitHub repository ccashwell/evm-cortex (131 stars, last pushed 18d ago), licensed MIT. It adds 75 tokens to every session and 6,804 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.