Prompt Guide
Learn how to communicate effectively with Civra's AI to build better Web3 applications.
Basics of Prompting
Civra uses advanced AI to understand your intent and generate code. The more specific you are, the better results you'll get.
Good Prompts
✅ Specific and detailed
Create a token staking contract where users can stake ETH
and earn 5% APY. Include emergency withdraw function.✅ Include context
Add a leaderboard to my NFT game that shows top 10 holders
by rarity score. Use a table with wallet addresses and scores.✅ Mention standards
Implement ERC-721 NFT contract with royalty support (ERC-2981)
and batch minting capability.Avoid Vague Prompts
❌ Too generic
Make a DeFi app❌ Missing details
Add a button❌ Unclear intent
Fix the thingWeb3-Specific Prompting
Smart Contract Development
When working with smart contracts, specify:
- Token standards (ERC-20, ERC-721, ERC-1155)
- Access control requirements
- Gas optimization needs
- Security considerations
Example:
Create an ERC-20 token with:
- 1M total supply
- Owner can mint new tokens
- 2% tax on transfers
- Pausable functionality
- Use OpenZeppelin for securityFrontend Integration
For UI components that interact with blockchain:
Create a wallet connection button that:
- Shows connected address (shortened)
- Displays ETH balance
- Supports MetaMask and WalletConnect
- Shows network indicator
- Has disconnect optionMulti-Step Workflows
Break complex features into steps:
Step 1: Create NFT minting page with:
- Upload image form
- Name and description fields
- Rarity selector
Step 2: Add payment processing:
- Accept 0.1 ETH per mint
- Max 10 NFTs per transaction
- Show transaction status
Step 3: Display user's minted NFTs in galleryAdvanced Techniques
Iterative Development
Start broad, then refine:
- "Create a DAO voting interface"
- "Add proposal creation form"
- "Include voting power based on token holdings"
- "Add charts showing vote distribution"
Reference Existing Code
Update the staking contract to match the UI we created earlier,
add claimRewards functionSpecify Design Preferences
Create a modern, dark-themed swap interface similar to Uniswap
with gradient buttons and smooth animationsCommon Use Cases
Token Launch
I want to launch a governance token:
- Name: MyDAO Token (MDT)
- Supply: 10M with vesting
- 40% community, 30% team, 30% treasury
- 2-year vesting for team
- Snapshot voting integrationNFT Collection
Create an NFT collection:
- 10,000 supply
- Generative art from traits
- Whitelist mint: 0.05 ETH
- Public mint: 0.08 ETH
- Reveal mechanism after selloutDeFi Protocol
Build a lending protocol where:
- Users deposit USDC as collateral
- Borrow up to 80% LTV
- 5% interest rate
- Liquidation at 90% LTV
- Flash loan protectionTips for Success
- Be specific about numbers: Token amounts, percentages, limits
- Mention security: Access control, validation, edge cases
- Describe user flow: Step-by-step interaction
- Reference standards: ERC tokens, common patterns
- Ask for explanations: "Explain how this works"
Prompt Library
Check out our Prompt Library for dozens of ready-to-use prompts.
Need Help?
If you're not getting the results you want:
