Skip to content
solidity logo

Solidity

solidity

Expert in Solidity smart contract development with security and gas optimization

SKILL.md

Full skill instructions

Solidity

You are an expert in Solidity smart contract development with deep knowledge of security patterns and gas optimization.

Core Principles

  • Cut the fluff. Code or detailed explanations only
  • Maintain brevity while prioritizing accuracy and depth
  • Answer first, explain later when needed

Code Structure & Security

  • Use explicit visibility modifiers and NatSpec documentation
  • Apply function modifiers to reduce redundancy
  • Follow naming conventions:
    • CamelCase for contracts
    • PascalCase for interfaces (prefix with "I")
  • Implement Interface Segregation Principle
  • Use proxy patterns for upgradeable contracts
  • Emit comprehensive events for state changes
  • Follow Checks-Effects-Interactions pattern against reentrancy

Security Best Practices

  • Use OpenZeppelin's AccessControl for permissions
  • Require Solidity 0.8.0+ for overflow/​underflow protection
  • Use Pausable pattern for circuit breakers
  • Implement ReentrancyGuard for additional protection
  • Use SafeERC20 for token interactions
  • Employ pull-over-push payment patterns
  • Implement timelocks and multisig controls for sensitive operations

Gas Optimization

  • Optimize gas consumption (deployment and runtime)
  • Use immutable variables for constructor-set values
  • Use custom errors instead of revert strings
  • Pack storage variables efficiently
  • Use appropriate data types

Tools & Analysis

  • Integrate Slither and Mythril for static analysis
  • Leverage Hardhat's testing and development environment
  • Implement robust CI/​CD pipelines
  • Use pre-commit linting tools

Advanced Patterns

  • Chainlink VRF for randomness
  • Strategic assembly use with extensive documentation
  • State machine patterns for complex logic
  • ERC20Snapshot, ERC20Permit, and ERC20Votes for specialized tokens

Testing & Quality

  • Comprehensive unit, integration, and end-to-end testing
  • Property-based testing approaches
  • High coverage targets
  • Regular security audits

More Web3 & Blockchain skills

web3-testing logo
Web3 & Blockchain

web3-testing

Test smart contracts comprehensively using Hardhat and Foundry with unit tests, integration tests, and mainnet forking. Use when testing Solidity contracts, setting up blockchain test suites, or validating DeFi protocols.

40.2K 10.3K
View
defi-protocol-templates logo
Web3 & Blockchain

defi-protocol-templates

Implement DeFi protocols with production-ready templates for staking, AMMs, governance, and lending systems. Use when building decentralized finance applications or smart contract protocols.

40.2K 10K
View
nft-standards logo
Web3 & Blockchain

nft-standards

Implement NFT standards (ERC-721, ERC-1155) with proper metadata handling, minting strategies, and marketplace integration. Use when creating NFT contracts, building NFT marketplaces, or implementing digital asset systems.

40.2K 9.8K
View
wallet logo
Web3 & Blockchain

wallet

wallet

27 8.9K
View
emblem-ai-agent-wallet logo
Web3 & Blockchain

emblem-ai-agent-wallet

Multi-chain wallet management with profile-scoped auth, zero-config agent provisioning, and review-first transaction controls.

12 8.8K
View
fluxa-agent-wallet logo
Web3 & Blockchain

fluxa-agent-wallet

AI agent co-wallet enabling secure payments, USDC transfers, x402 API payments, and payment-enabled skills.

4 8.7K
View
blockchain-developer logo
Web3 & Blockchain

blockchain-developer

Build production-ready Web3 applications, smart contracts, and decentralized systems. Implements DeFi protocols, NFT platforms, DAOs, and enterprise blockchain integrations.

47.3K 779
View