iktok90-design/ai-smart-contract-auditor/pragma-and-addresses
Claude Code and agent skill by iktok90-design/ai-smart-contract-auditor
- community
Checking that the SKILL.md file is still in the repository.
Detect floating pragma, hardcoded addresses, missing zero-address checks, deprecated Solidity versions. Activate on every `pragma solidity` line, `constant ADDRESS = 0x...`, `immutable` address parameters, address comparisons.
Install
npx vskill@latest install iktok90-design/ai-smart-contract-auditor/pragma-and-addressesSKILL.md
Pragma & address-hygiene detection
When this applies
- Top of every Solidity file
- Constants and immutables typed
address - Constructor / initializer parameters typed
address mapping(address => …)updates- Any cross-chain deployment where addresses differ per chain
Detection patterns
Floating pragma (LOW-MEDIUM)
Production deployments should pin: pragma solidity 0.8.24;. Floating pragma means audited bytecode ≠ deployed bytecode.
Outdated Solidity version (MEDIUM)
<0.8.0 lacks built-in overflow checks. <0.8.20 lacks PUSH0 opcode handling for some L2s. Audit pin date vs known compiler bugs.
Hardcoded address tied to a single chain (HIGH)
WETH/USDC/USDT all have different addresses per chain. Use a chain-configurable resolver.
Missing zero-address check (HIGH on key fields)
Affects ownership, oracles, treasury, fee receiver, token addresses.
Address(0) as default sentinel (MEDIUM)
Using address(0) to mean "unset" works but is brittle — collides with default mapping values.
payable(0) as burn (LOW-MEDIUM)
Burning by sending to address(0)'s payable is legal but locks ether forever. Document intent.
address(this) in cross-chain context (HIGH for CREATE2 deployments)
address(this) differs unless deterministically deployed at same address across chains.
address public foo; instead of address public immutable foo; (LOW)
Mutable when it shouldn't be — gas cost + risk of accidental setter.
Chain-ID-dependent address resolution missing (HIGH)
Severity rubric
| Pattern | Severity | |
|---|---|---|
| Hardcoded mainnet address in multi-chain deployment | High | |
| Missing zero-address check on owner/admin set | High | |
| Chain-ID-based resolver missing for cross-chain | High | |
| Outdated Solidity version with known CVE | High | |
Floating pragma (^0.8.0) in production | Medium | |
| Mutable address that should be immutable | Low | |
| Outdated but CVE-free Solidity version | Low | |
| Comment-only address documentation outdated | Info |
Remediation patterns
- Pin exact Solidity version:
pragma solidity 0.8.24;(or whatever you tested with). - Zero-address checks on every setter:
require(newAddr != address(0), "zero address");. - Chain-aware address resolver:
``solidity function _weth() internal view returns (address) { if (block.chainid == 1) return MAINNET_WETH; if (block.chainid == 8453) return BASE_WETH; if (block.chainid == 42161) return ARB_WETH; revert UnsupportedChain(); } ``
- Use OZ
Ownable2Stepso even a bad zero-address would require accept(). - For immutable-when-possible, mark with
immutablekeyword.
False-positive notes
- Test/mock files with hardcoded addresses are fine.
address(0)checks may be redundant if subsequent OZ library calls already validate.- Floating pragma in libraries (vs deployed contracts) is sometimes intentional.
Related
- [[access-control]]
- [[storage-layout]]
- [[upgrade-safety]]
Security
- Security scanPassed, 95 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/pragma-and-addresses/SKILL.md
Popularity
- Repository stars
- 37
- Repository forks
- 5
- 7-day trend score
- 18
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
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/iktok90-design/ai-smart-contract-auditor/pragma-and-addresses)