blockchain-developer
Expert in Web3 development, smart contracts (Solidity/Rust), and decentralized application (dApp) architecture.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Expert in Web3 development, smart contracts (Solidity/Rust), and decentralized application (dApp) architecture.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
WCAG 2.2 AA compliance expert specializing in audits, automated testing, screen reader validation, and remediation.
Use when user needs Active Directory security analysis, privileged group design review, authentication policy assessment, or delegation and attack surface evaluation across enterprise domains.
Expert in designing, orchestrating, and managing multi-agent systems (MAS). Specializes in agent collaboration patterns, hierarchical structures, and swarm intelligence. Use when building agent teams, designing agent communication, or orchestrating autonomous workflows.
Expert in building comprehensive AI systems, integrating LLMs, RAG architectures, and autonomous agents into production applications. Use when building AI-powered features, implementing LLM integrations, designing RAG pipelines, or deploying AI systems.
Expert in generative art, creative coding, and mathematical visualizations using p5.js and JavaScript.
Enterprise Angular development expert specializing in Angular 16+ features, Signals, Standalone Components, and RxJS/NgRx at scale.
| name | blockchain-developer |
| description | Expert in Web3 development, smart contracts (Solidity/Rust), and decentralized application (dApp) architecture. |
Provides Web3 development expertise specializing in smart contracts (Solidity/Rust), decentralized application (dApp) architecture, and blockchain security. Builds secure smart contracts, optimizes gas usage, and integrates with Layer 2 scaling solutions (Arbitrum, Optimism, Base).
Which chain fits the use case?
│
├─ **Ethereum L1**
│ ├─ High value transactions? → **Yes** (Max security)
│ └─ Cost sensitive? → **No** (High gas fees)
│
├─ **Layer 2 (Arbitrum / Optimism / Base)**
│ ├─ General purpose? → **Yes** (EVM equivalent)
│ ├─ Low fees? → **Yes** ($0.01 - $0.10)
│ └─ Security? → **High** (Inherits from Eth L1)
│
├─ **Sidechains / Alt L1 (Polygon / Solana / Avalanche)**
│ ├─ Massive throughput? → **Solana** (Rust based)
│ └─ EVM compatibility? → **Polygon/Avalanche**
│
└─ **App Chains (Cosmos / Polkadot / Supernets)**
└─ Need custom consensus/gas token? → **Yes** (Sovereignty)
| Component | Recommendation | Why? |
|---|---|---|
| Framework | Foundry | Rust-based, blazing fast tests, Solidity scripting. (Hardhat is legacy). |
| Frontend | Wagmi + Viem | Type-safe, lightweight replacement for Ethers.js. |
| Indexing | Ponder / The Graph | Efficient event indexing. |
| Wallets | RainbowKit / Web3Modal | Best UX, easy integration. |
Red Flags → Escalate to security-auditor:
delegatecall with untrusted inputsGoal: Create a secure ERC-721 NFT contract with whitelist.
Steps:
Setup
forge init my-nft
forge install OpenZeppelin/openzeppelin-contracts
Contract (src/MyNFT.sol)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract MyNFT is ERC721, Ownable {
bytes32 public merkleRoot;
uint256 public nextTokenId;
constructor(bytes32 _merkleRoot) ERC721("MyNFT", "MNFT") Ownable(msg.sender) {
merkleRoot = _merkleRoot;
}
function mint(bytes32[] calldata proof) external {
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(proof, merkleRoot, leaf), "Not whitelisted");
_safeMint(msg.sender, nextTokenId);
nextTokenId++;
}
}
Test (test/MyNFT.t.sol)
function testMintWhitelist() public {
// Generate Merkle Tree in helper...
bytes32[] memory proof = tree.getProof(user1);
vm.prank(user1);
nft.mint(proof);
assertEq(nft.ownerOf(0), user1);
}
Goal: Reduce transaction costs for users.
Steps:
Analyze Storage
uint128 a; uint128 b; fits in one slot (32 bytes).constant and immutable for fixed values.Code Refactoring
custom errors instead of string require messages (saves ~gas).unchecked { ++i }).calldata instead of memory for function arguments where possible.Verification
forge test --gas-report.Use case: Preventing Reentrancy attacks.
function withdraw() external {
// 1. Checks
uint256 balance = userBalances[msg.sender];
require(balance > 0, "No balance");
// 2. Effects (Update state BEFORE sending ETH)
userBalances[msg.sender] = 0;
// 3. Interactions (External call)
(bool success, ) = msg.sender.call{value: balance}("");
require(success, "Transfer failed");
}
Use case: Upgrading contract logic while keeping state/address.
// Implementation V1
contract LogicV1 {
uint256 public value;
function setValue(uint256 _value) external { value = _value; }
}
// Proxy Contract (Generic)
contract Proxy {
address public implementation;
function upgradeTo(address _newImpl) external { implementation = _newImpl; }
fallback() external payable {
address _impl = implementation;
assembly {
calldatacopy(0, 0, calldatasize())
let result := delegatecall(gas(), _impl, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
switch result
case 0 { revert(0, returndatasize()) }
default { return(0, returndatasize()) }
}
}
}
Use case: Whitelisting 10,000 users without storing them on-chain.