Skip to content

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 thing

Web3-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 security

Frontend 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 option

Multi-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 gallery

Advanced Techniques

Iterative Development

Start broad, then refine:

  1. "Create a DAO voting interface"
  2. "Add proposal creation form"
  3. "Include voting power based on token holdings"
  4. "Add charts showing vote distribution"

Reference Existing Code

Update the staking contract to match the UI we created earlier,
add claimRewards function

Specify Design Preferences

Create a modern, dark-themed swap interface similar to Uniswap
with gradient buttons and smooth animations

Common 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 integration

NFT 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 sellout

DeFi 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 protection

Tips for Success

  1. Be specific about numbers: Token amounts, percentages, limits
  2. Mention security: Access control, validation, edge cases
  3. Describe user flow: Step-by-step interaction
  4. Reference standards: ERC tokens, common patterns
  5. 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:

  1. Try rephrasing your prompt
  2. Break it into smaller requests
  3. Ask the AI to explain what it built
  4. Check our FAQ
  5. Join our Discord for community help

Built with Civra - Web3 Development Platform