blockchain-web3
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.
Best use case
blockchain-web3 is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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.
Teams using blockchain-web3 should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/blockchain-web3/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How blockchain-web3 Compares
| Feature / Agent | blockchain-web3 | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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 accessRelated Skills
example-skill
Example skill - replace with your skill's description and activation keywords
websockets-realtime
Real-time communication with WebSockets, Server-Sent Events, and related technologies. Use when building chat, live updates, collaborative features, or any real-time functionality.
video-production
Professional video production from planning to delivery. Use when creating video content, editing workflows, motion graphics, or optimizing video for different platforms.
ui-research
Research-first UI/UX design workflow. Use BEFORE any frontend visual work to research modern patterns, gather inspiration from real products, and avoid generic AI-generated looks. Mandatory prerequisite for quality UI work.
ui-animation
Motion design and animation for user interfaces. Use when creating micro-interactions, page transitions, loading states, or any UI animation across web and mobile platforms.
travel-planner
Travel destination research and daily itinerary creation with logistics planning, budget tracking, and experience optimization. Use when planning trips, creating travel itineraries, comparing destinations, or organizing travel logistics.
test-specialist
This skill should be used when writing test cases, fixing bugs, analyzing code for potential issues, or improving test coverage for JavaScript/TypeScript applications. Use this for unit tests, integration tests, end-to-end tests, debugging runtime errors, logic bugs, performance issues, security vulnerabilities, and systematic code analysis.
tech-debt-analyzer
This skill should be used when analyzing technical debt in a codebase, documenting code quality issues, creating technical debt registers, or assessing code maintainability. Use this for identifying code smells, architectural issues, dependency problems, missing documentation, security vulnerabilities, and creating comprehensive technical debt documentation.
tdd-workflow
Test-Driven Development workflow enforcement with RED-GREEN-REFACTOR cycle. Use when implementing features test-first or improving test coverage.
tauri-desktop
Tauri 2.0 project setup, Rust backend + web frontend, plugin system, IPC commands, security model, auto-update, and mobile support. Use when building lightweight cross-platform desktop or mobile apps with Tauri.
svelte-development
Svelte 5 development with runes ($state, $derived, $effect), SvelteKit full-stack framework, and modern reactive patterns. Use when building Svelte applications, implementing fine-grained reactivity, or working with SvelteKit routing and server functions.
sustainability-esg
Sustainability and ESG expertise for ESG strategy, carbon footprint management, sustainable supply chains, circular economy, renewable energy, climate risk, and ESG reporting (GRI, SASB, TCFD). Use when building sustainability programs, measuring carbon impact, or creating ESG reports.