affaan-m/everything-claude-code/evm-token-decimals
- community
Checking that the SKILL.md file is still in the repository.
Prevent silent decimal mismatch bugs across EVM chains. Covers runtime decimal lookup, chain-aware caching, bridged-token precision drift, and safe normalization for bots, dashboards, and DeFi tools. Use when handling token amounts across EVM chains, or when a balance, price, or transfer amount is off by orders of magnitude.
Install
npx vskill@latest install affaan-m/everything-claude-code/evm-token-decimalsSKILL.md
EVM Token Decimals
Silent decimal mismatches are one of the easiest ways to ship balances or USD values that are off by orders of magnitude without throwing an error.
When to Use
- Reading ERC-20 balances in Python, TypeScript, or Solidity
- Calculating fiat values from on-chain balances
- Comparing token amounts across multiple EVM chains
- Handling bridged assets
- Building portfolio trackers, bots, or aggregators
How It Works
Never assume stablecoins use the same decimals everywhere. Query decimals() at runtime, cache by (chain_id, token_address), and use decimal-safe math for value calculations.
Examples
Query decimals at runtime
Do not hardcode 1_000_000 because a symbol usually has 6 decimals somewhere else.
Cache by chain and token
Handle odd tokens defensively
Log the fallback and keep it visible. Old or non-standard tokens still exist.
Normalize to 18-decimal WAD in Solidity
TypeScript with ethers
Quick on-chain check
Rules
- Always query
decimals()at runtime - Cache by chain plus token address, not symbol
- Use
Decimal,BigInt, or equivalent exact math, not float - Re-query decimals after bridging or wrapper changes
- Normalize internal accounting consistently before comparison or pricing
Security
- Security scanPassed, 96 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/evm-token-decimals/SKILL.md
Popularity
- Repository stars
- 169,782
- Repository forks
- 26,313
- 7-day trend score
- 60
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 26 Apr 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/affaan-m/everything-claude-code/evm-token-decimals)