web3-bug-classes

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

A reference guide to ten common security weaknesses in DeFi smart contracts, which are programs that manage financial assets on blockchains.

In plain words
What is it for?
Use it to investigate accounting errors, access-control problems, oracle manipulation, reentrancy, flash loans, signature replay, vault issues, and upgrade bugs.
Why use it?
It gives auditors concrete bug patterns and examples to check instead of relying only on general code review.

Skill for Claude CodeCodex

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

Good fit Use it to investigate accounting errors, access-control problems, oracle manipulation, reentrancy, flash loans, signature replay, vault issues, and upgrade bugs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/olaradiallysymmetrical491/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 Olaradiallysymmetrical491/web3-bug-bounty-hunting-ai-skills --skill web3-bug-classes
Clone the repo
git clone --depth 1 https://github.com/Olaradiallysymmetrical491/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/olaradiallysymmetrical491/web3-bug-bounty-hunting-ai-skills/web3-bug-classes/github.svg)](https://agentmods.dev/skills/olaradiallysymmetrical491/web3-bug-bounty-hunting-ai-skills/web3-bug-classes)
Your own site
<a href="https://agentmods.dev/skills/olaradiallysymmetrical491/web3-bug-bounty-hunting-ai-skills/web3-bug-classes"><img src="https://agentmods.dev/badge/skills/olaradiallysymmetrical491/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/olaradiallysymmetrical491/web3-bug-bounty-hunting-ai-skills/web3-bug-classes"><img src="https://agentmods.dev/badge/skills/olaradiallysymmetrical491/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.
Origin 100% copy Near-identical to another mod 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-12, 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

This is a copy

100% identical to web3-bug-classes — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

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 Olaradiallysymmetrical491/web3-bug-bounty-hunting-ai-skills (5 stars, last pushed yesterday), 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. It is 100% identical to web3-bug-classes, differing in 0 lines, and is treated as a copy.