token-approval-safety

token-approval-safety is a skill for Claude Code, Codex from nirholas/three.ws. It costs 52 tokens per session (1,189 once invoked), scanned A, original, Apache-2.0.

A guide to ERC-20 token approvals, which give a decentralised application permission to spend tokens from your wallet. It explains unlimited approvals, their risks, and how to review or revoke them.

In plain words
What is it for?
Use it to audit wallet permissions, choose safer approval amounts, and revoke approvals you no longer need.
Why use it?
It helps prevent a hacked or untrusted application from spending more tokens than intended.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to audit wallet permissions, choose safer approval amounts, and revoke approvals you no longer need.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nirholas/three.ws/token-approval-safety
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add nirholas/three.ws --skill token-approval-safety
Clone the repo
git clone --depth 1 https://github.com/nirholas/three.ws

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 token-approval-safety

README.md
[![agentmods](https://agentmods.dev/badge/skills/nirholas/three.ws/token-approval-safety/github.svg)](https://agentmods.dev/skills/nirholas/three.ws/token-approval-safety)
Your own site
<a href="https://agentmods.dev/skills/nirholas/three.ws/token-approval-safety"><img src="https://agentmods.dev/badge/skills/nirholas/three.ws/token-approval-safety/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 token-approval-safety

Your own site · 80×15
<a href="https://agentmods.dev/skills/nirholas/three.ws/token-approval-safety"><img src="https://agentmods.dev/badge/skills/nirholas/three.ws/token-approval-safety.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,189 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.00052 $0.01189
Opus 5.5 $0.00021 $0.00476
Sonnet 5.5 $0.00010 $0.00238
Haiku 4.5 $0.00005 $0.00119

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

Security

Grade A, and why

token-approval-safety 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 2mo 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.

data/skills/security/token-approval-safety/SKILL.md · 148 lines

How it starts

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

Token Approval Safety Guide

Token approvals are one of the most overlooked security risks in DeFi. This guide helps AI agents protect users from approval-related attacks.

How Approvals Work

When you interact with a DeFi protocol, you must first "approve" it to spend your tokens:

1. You call approve(spenderAddress, amount) on the token contract
2. The spender (DEX, protocol) can now transfer up to `amount` of your tokens
3. When you swap/deposit, the protocol calls transferFrom() to move your tokens

The Problem: Unlimited Approvals

Most DeFi UIs request unlimited approval (type(uint256).max):

  • Saves gas on future interactions (no re-approval needed)
  • But: the protocol can spend ALL your tokens FOREVER
  • If the protocol gets hacked, attackers drain your tokens via the approval

Risk Levels

Approval Type Risk When to Use
Exact amount Low Large deposits, untrusted protocols
Limited amount Medium Regular use with trusted protocols
Unlimited High Only with battle-tested protocols (Uniswap, Aave)
Permit (EIP-2612) Medium Gasless approvals, common in modern DeFi

How to Check Approvals

On-Chain (Direct)

Query the token contract: allowance(ownerAddress, spenderAddress)

Tools

Tool URL Features
Revoke.cash https://revoke.cash Most popular, multi-chain
Etherscan Token Approvals https://etherscan.io/tokenapprovalchecker Ethereum-only
Arbiscan https://arbiscan.io/tokenapprovalchecker Arbitrum

What to Look For

  • Unlimited approvals to contracts you no longer use
  • Approvals to unknown contracts you don't recognize
  • Old approvals from months/years ago
  • Approvals for valuable tokens (USDC, USDT, WETH)

Revoking Approvals

Revoking sets the allowance to 0:

approve(spenderAddress, 0)

Cost: Small gas fee per revocation

When to revoke:

  • After you're done using a protocol
  • If a protocol announces a security incident
  • During regular security checkups (monthly recommended)
  • Before a token migration or contract upgrade

Read the full file on GitHub · 148 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. 2mo ago First seen · 148 lines · 52 tokens per session scan A 55a909053cc4

Subscribe to this mod's changes

token-approval-safety is a skill published in the GitHub repository nirholas/three.ws (287 stars, last pushed yesterday), licensed Apache-2.0. It adds 52 tokens to every session and 1,189 once invoked, about $0.0002 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.

Related

token-approval-safety compared with skills from other repositories

token-approval-safety next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
token-approval-safetynirholas/three.wsSkill287yesterdayApache-2.0A52Claude Code, Codex
pay-x402-servicenirholas/x402-payments-mcpSkill919d agoApache-2.0A51Claude Code
granite-pay-per-callnirholas/ibm-x402-mcpSkill919d agoApache-2.0A49Claude Code
pumpfun-token-researchnirholas/pumpfun-claims-botSkill2511d agononeA59Claude Code
jupiter-vrfdinternet-court/internet-court-skillSkill7.2k6d agononeA45Claude Code
vybe-token-market-intelvybenetwork/solana-mcp-vybeSkill3.2k4d agononeA60Claude Code, Codex
solana-security-reviewYD811/potbot-v2Skill223d agoMITA75Claude Code, Codex