blockchain-web3 — Claude Code skill: what it does, how to install
The blockchain-web3 skill supports Solidity contracts, dApps, DeFi, NFTs, and EVM work. Use it when you need contract security checks or Web3 wallet integration.
MIT 109 installs ★ 114 updated 2026-10-25
npx skills add travisjneuman/.claude --skill blockchain-web3 -a claude-codeWhat blockchain-web3 does
The skill covers Solidity contract structure, including OpenZeppelin-based tokens, access control, reentrancy protection, and safer handling of external calls. It also walks through common issues such as front-running, oracle manipulation, unchecked return values, and unsafe delegatecall usage.
Hardhat and Foundry commands cover project setup, compilation, tests, and deployment scripts. Frontend examples use ethers.js v6, viem, and React hooks from wagmi, including wallet balance reads. The guide also outlines AMMs, lending, staking, governance, and ways to reduce gas usage.
The contract examples import @openzeppelin/contracts, while Solidity 0.8+ supplies built-in overflow checks. Compilation is not a security review: the skill separates defensive patterns from the vulnerability cases they address.
What it helps with
- write a Solidity token contract
- check a contract for common Web3 vulnerabilities
- build and test a project with Hardhat or Foundry
- connect a dApp to a wallet and read its balance
- reduce gas use in Solidity code
Example prompts for the agent
- Write a Solidity token contract with
Ownableand show whereReentrancyGuardbelongs. - Review this contract for reentrancy, front-running, oracle manipulation, and unsafe
delegatecall. - Set up the project with Hardhat or Foundry, then add a
viemfrontend that reads the wallet balance.
How to install blockchain-web3
1Skills CLI (Vercel)
npx skills add travisjneuman/.claude --skill blockchain-web3 -a claude-code2Manually: put the files in place
~/.claude/skills/blockchain-web3/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/blockchain-web3/
1Skills CLI (Vercel)
npx skills add travisjneuman/.claude --skill blockchain-web3 -a codex2Manually: put the files in place
.agents/skills/blockchain-web3/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add travisjneuman/.claude --skill blockchain-web3 -a cursor2Manually: put the files in place
.cursor/skills/blockchain-web3/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install travisjneuman/.claude skills/blockchain-web32Manually: put the files in place
.github/skills/blockchain-web3/SKILL.md1Skills CLI (Vercel)
npx skills add travisjneuman/.claude --skill blockchain-web3 -a gemini-cli2Platform CLI
gemini skills install https://github.com/travisjneuman/.claude --path skills/blockchain-web3Manually: put the files in place
.devin/skills/blockchain-web3/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add travisjneuman/.claude --skill blockchain-web3 -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about blockchain-web3
How do I install blockchain-web3 in Claude Code?
Run npx skills add travisjneuman/.claude --skill blockchain-web3 -a claude-code, then check ~/.claude/skills/blockchain-web3/SKILL.md.
What does blockchain-web3 do?
It guides Solidity contract work, DeFi protocols, dApps, NFTs, and EVM development. It also covers security review patterns, wallet integration, and gas-focused code changes.
Which development tools does blockchain-web3 cover?
The skill includes Hardhat and Foundry for builds and tests, plus ethers.js v6, viem, and wagmi for frontend integration.
Source text
SKILL.md · MIT
---
name: blockchain-web3
description: Solidity smart contracts, Web3 development, DeFi protocols, NFTs, EVM chains, Hardhat/Foundry tooling, and blockchain security. Use when writing smart contracts, building dApps, auditing contract security, or integrating Web3 wallets.
---
# Blockchain & Web3 Development
## Smart Contract Development (Solidity)
### Contract Structure
```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract MyToken is ERC20, Ownable {
constructor() ERC20("MyToken", "MTK") Ownable(msg.sender) {
_mint(msg.sender, 1000000 * 10 ** decimals());
}
}
```
### Security Patterns
- **Checks-Effects-Interactions:** Validate → update state → external calls
- **Reentrancy guard:** Use OpenZeppelin `ReentrancyGuard` or `nonReentrant`
- **Access control:** `Ownable`, `AccessControl`, or custom modifiers
- **Integer safety:** Solidity 0.8+ has built-in overflow checks
- **Pull over push:** Let users withdraw rather than sending funds
### Common Vulnerabilities
| Vulnerability | Prevention |
|--------------|------------|
| Reentrancy | `nonReentrant` modifier, CEI pattern |
| Front-running | Commit-reveal schemes, flashbot protection |
| Oracle manipulation | Use Chainlink, TWAP over spot prices |
| Unchecked return values | Always check `transfer()` return or use `safeTransfer` |
| Delegatecall injection | Never delegatecall to user-supplied addresses |
## Development Tooling
### Hardhat
```bash
npx hardhat init
npx hardhat compile
npx hardhat test
npx hardhat deploy --network sepolia
```
### Foundry
```bash
forge init
forge build
forge test -vvv
forge script script/Deploy.s.sol --rpc-url $RPC --broadcast
```
## Frontend Integration (ethers.js v6 / viem)
```typescript
// viem (recommended for new projects)
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({ chain: mainnet, transport: http() })
const balance = await client.getBalance({ address: '0x...' })
// wagmi hooks (React)
import { useAccount, useBalance, useContractWrite } from 'wagmi'
const { address } = useAccount()
const { data: balance } = useBalance({ address })
```
## DeFi Patterns
- **AMM:** Constant product formula (x * y = k), concentrated liquidity
- **Lending:** Overcollateralized loans, liquidation mechanisms, interest rate models
- **Staking:** Reward distribution with `rewardPerToken` accumulator pattern
- **Governance:** Token-weighted voting, timelock controllers, proposal lifecycle
## Gas Optimization
- Use `calldata` over `memory` for read-only params
- Pack structs (smaller types together for slot efficiency)
- Use `unchecked` blocks for safe arithmetic
- Minimize storage reads/writes (cache in memory)
- Use events instead of storage for data that doesn't need on-chain access
© travisjneuman · MIT · travisjneuman/.claude