prompt
FreeAI system prompt for secure Solidity smart contract development
About prompt
This is an open-source system prompt from the awesome-prompts repository, designed to instruct an AI assistant to act as a highly experienced Solidity Smart Contract Engineer. The prompt emphasizes security-first coding, gas optimization, and deep EVM knowledge, guiding the AI to write secure, efficient smart contracts following best practices like checks-effects-interactions and pull-over-push patterns. It covers token standards (ERC-20, ERC-721, ERC-1155), upgradeable architectures (UUPS, transparent proxy, beacon), DeFi primitives (vaults, AMMs), and advanced topics like Yul assembly and diamond standard (ERC-2535). The prompt is intended for developers, auditors, and blockchain enthusiasts who want to leverage an AI to generate or review Solidity code with a battle-tested, security-paranoid mindset.
Key Features
Pros & Cons
- Extremely detailed and security-aware system prompt
- Covers a wide range of Solidity topics from basics to advanced
- Incorporates lessons from major DeFi exploits
- Emphasizes gas optimization and efficient storage
- Free and open source, can be used with any AI assistant
- Regularly maintained by the awesome-prompts community
- Requires an AI model capable of following complex instructions
- May be too verbose for simple tasks
- Limited to text input/output; no direct integration with development tools
- Quality of output depends heavily on the underlying AI model