web3-bug-classes

web3-bug-classes is a skill for Claude Code, Codex from Awarexone/web3-bug-bounty-hunting-ai-skills. It costs 72 tokens per session (10,306 once invoked), scanned A, original, MIT.

A reference for ten common vulnerability classes in DeFi smart contracts, which are programs that manage blockchain-based financial assets. It describes causes, attack patterns, code-search clues, fixes, and real examples.

In plain words
What is it for?
Use it when hunting for accounting errors, access-control flaws, incomplete paths, off-by-one errors, oracle manipulation, vault issues, reentrancy, flash-loan abuse, signature replay, or proxy and upgrade bugs.
Why use it?
It gives security reviewers a structured way to look for specific flaws instead of relying only on general intuition. The examples connect each bug class to how it can affect protocol funds or state.

Skill for Claude CodeCodex

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

Good fit Use it when hunting for accounting errors, access-control flaws, incomplete paths, off-by-one errors, oracle manipulation, vault issues, reentrancy, flash-loan abuse, signature replay, or proxy and upgrade bugs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/awarexone/web3-bug-bounty-hunting-ai-skills/web3-bug-classes
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 Awarexone/web3-bug-bounty-hunting-ai-skills --skill web3-bug-classes
Clone the repo
git clone --depth 1 https://github.com/Awarexone/web3-bug-bounty-hunting-ai-skills

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 web3-bug-classes

README.md
[![agentmods](https://agentmods.dev/badge/skills/awarexone/web3-bug-bounty-hunting-ai-skills/web3-bug-classes/github.svg)](https://agentmods.dev/skills/awarexone/web3-bug-bounty-hunting-ai-skills/web3-bug-classes)
Your own site
<a href="https://agentmods.dev/skills/awarexone/web3-bug-bounty-hunting-ai-skills/web3-bug-classes"><img src="https://agentmods.dev/badge/skills/awarexone/web3-bug-bounty-hunting-ai-skills/web3-bug-classes/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 web3-bug-classes

Your own site · 80×15
<a href="https://agentmods.dev/skills/awarexone/web3-bug-bounty-hunting-ai-skills/web3-bug-classes"><img src="https://agentmods.dev/badge/skills/awarexone/web3-bug-bounty-hunting-ai-skills/web3-bug-classes.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 10,306 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.00072 $0.10306
Opus 5 $0.00036 $0.05153
Sonnet 5 $0.00014 $0.02061
Haiku 4.5 $0.00007 $0.01031

Measured 12d ago against content hash 03cd842c5cba, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

web3-bug-classes 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 12d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

web3-bug-classes/SKILL.md · 1,121 lines

How it starts

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

BUG CLASSES — DeFi Smart Contract Vulnerabilities

10 bug classes. Each one with root cause, vulnerable code, fix, grep patterns, and real paid examples.


1. ACCOUNTING STATE DESYNCHRONIZATION

#1 Critical bug class — 28% of all Criticals on Immunefi. Real protocols: Yeet, Alchemix V3, Folks Finance, ResupplyFi, MetaPool

What It Is

Two state variables are supposed to stay in sync. One code path updates variable A but forgets variable B. Later code reads both and makes decisions based on the stale B.

Real Value = A - B
If A is updated but B isn't → Real Value appears larger than it is → phantom value

Root Cause Pattern

// BEFORE (correct state):
// aToken.balanceOf(this) = 1000  (principal + yield)
// totalSupply = 1000              (only principal)
// yield = 1000 - 1000 = 0        ✓ correct

// Attacker triggers startUnstake:
totalSupply -= amount;  // decremented BEFORE transfer
// totalSupply = 900 now
// aToken.balanceOf still = 1000
// yield appears = 1000 - 900 = 100 (PHANTOM)

// Now harvest():
yieldAmount = aToken.balanceOf(this) - totalSupply;
// = 1000 - 900 = 100 (phantom yield — no real yield was earned)
// Protocol harvests 100 of principal and distributes as "yield"

Variants

Variant 1: Phantom Yield — totalSupply decremented before transfer

// Yeet protocol (35 duplicate reports):
function startUnstake(uint256 amount) external {
    totalSupply -= amount;  // decremented here, transfer happens later
    // balanceOf(this) - totalSupply now shows phantom yield
}

Variant 2: Fast Path Skips State Update — early return bypasses critical updates

// Alchemix V3 claimRedemption:
function claimRedemption(uint256 tokenId) external {
    if (transmuter.balance >= amount) {
        transmuter.transfer(user, amount);
        _burn(tokenId);
        return;  // EARLY RETURN — cumulativeEarmarked, _redemptionWeight, totalDebt never updated
    }
    // SLOW PATH: updates all state vars correctly
    alchemist.redeem(...);
}

Read the full file on GitHub · 1,121 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. 12d ago First seen · 1,121 lines · 72 tokens per session scan A 03cd842c5cba

Subscribe to this mod's changes

web3-bug-classes is a skill published in the GitHub repository Awarexone/web3-bug-bounty-hunting-ai-skills (142 stars, last pushed 17d ago), licensed MIT. It adds 72 tokens to every session and 10,306 once invoked, about $0.0004 per session on Opus 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-08-30.

Related

Other skills, from other repositories

analyzing-ethereum-smart-contract-vulnerabilities

Perform static and symbolic analysis of Solidity smart contracts using Slither and Mythril to detect reentrancy, integer overflow, access control, and other vulnerability classes before deployment to Ethereum mainnet.

xalgorix/xalgorix · 49 tokens

propfund

Trade on PropFund, the decentralized on-chain prop firm for AI agents. Use this skill to get funded with the liquidity pool's capital and trade without risking your own bankroll — pass a transparent evaluation, then place leveraged long/short trades with mandatory stop-loss/take-profit and on-chain risk limits, and…

NO7r34L/PropFund.eth · 0 tokens

token-antiflash

When this skill is triggered, DO NOT directly implement all strategies. Follow this workflow.

0xlayerghost/solidity-agent-kit · 91 tokens

solidity-coding

When a contract involves state initialization (external addresses, business parameters, role assignments), DO NOT default to any single approach. Follow this workflow.

0xlayerghost/solidity-agent-kit · 66 tokens

solidity-checklist

Most on-chain operation failures come from skipping systematic verification. Instead of the reactive loop.

0xlayerghost/solidity-agent-kit · 68 tokens

programmable-v4-hook-builder

Build, repair, validate, submit, or track a complete Programmable Uniswap v4 Custom launch through the public V3 API. Use when the user names Programmable and wants implementation or launch work for a hook, token, multi-contract graph, app, game, service, or hybrid. Do not use for explanation-only questions, unrelated…

programmablehq/PROGRAMMABLE · 90 tokens