🚀 Antigravity AI User Guide
Master AI-Assisted Development
📋 Prerequisites
To get the most out of Antigravity, make sure you have the following installed and configured:
Essential Tools
- WSL (Windows Subsystem for Linux) - Enables Linux commands like grep and find.
- PHP - For server-side scripting and validation
Check syntax:
php -l filename.php - Python - For automation and scripting tasks
- Node.js/npm - For modern web development
- Git - Version control (essential for tracking changes)
Development Environment
- Visual Studio Code (recommended) or similar IDE
- Browser DevTools - For debugging and CSP monitoring
⚡ Critical Best Practices
1. Content Security Policy (CSP) Compliance
⚠️ NEVER use inline scripts or styles if you have a strict CSP!
Common CSP violations and solutions:
Example of this error in the console:
Content-Security-Policy: The page's settings blocked an inline style (style-src-attr) from being applied because it violates the following directive: "style-src https://computerbas.nl https://www.computerbas.nl https://fonts.googleapis.com". Consider using a hash ('sha256-XoyA6I7sr9dzOSTfmY1xNE/1EG5WVS0HHeMgznsqsTc=', requires 'unsafe-hashes' for style attributes) or a nonce.
❌ BAD - Inline event handlers:
<button onclick="toggleTheme()">Toggle</button>
✅ GOOD - Use addEventListener:
// In external JS file
document.getElementById('btn').addEventListener('click', toggleTheme);
❌ BAD - Inline style attributes:
<footer style="margin-top: 3rem; text-align: center">
✅ GOOD - Use CSS classes:
// In CSS file
.page-footer { margin-top: 3rem; text-align: center; }
// In HTML
<footer class="page-footer">
Best practices:
- Move all
style="..."attributes to external CSS files - Move all
onclick="",onload=""handlers to external JS with addEventListener - Move all inline
<script>code to external JS files - Use the browser console to check for CSP violations
- Always test on a live server with CSP headers enabled
2. Error Checking Workflow
Before considering a task complete:
- Check the Problems Tab - Look for syntax errors
- Read Error Messages Carefully - Don't skip details
- Validate PHP:
php -l filename.php - Test in Browser - Open the DevTools Console for errors
3. Read Changes Carefully
- Always review the diff blocks Antigravity provides
- Don't blindly accept changes - understand what's being modified
- Check line numbers and context to ensure accuracy
- If something looks wrong, ask for clarification immediately
🤖 Understanding AI Limitations
Remember: Antigravity is just a computer
- No memory between sessions - It doesn't remember previous conversations.
- Can't automatically execute code - You must run commands yourself
- Makes mistakes - Always validate the output
- Fabricates information - AI can invent facts
- Literal interpretation - Be specific with requests
- No access to your live server - Can't see runtime errors
Session Management Strategy
Question: Should I do everything in one BIG session or use separate sessions?
Answer: Separate, focused sessions are better!
🎯 Proven Success Strategies
What led to this success
- Clear, Specific Requests
- Iterative Improvements
- Environment Setup (WSL, PHP)
- Active Verification (Testing)
🔧 Quick Reference Commands
# PHP Syntax Check
php -l filename.php
# Execute PHP Script
php filename.php
# WSL Commands
wsl grep -r "search term" .
wsl find . -name "*.php"
# Count Lines in File
wsl wc -l filename.php
✨ Pro Tips
- Keep conversations focused
- Use file paths
- Use checkpoints - Summarize progress after major milestones
- Save working states - Commit to Git before major refactors
🚫 Common Pitfalls
- ❌ Thinking Antigravity can run code on your server
- ❌ Not checking the Problems tab
- ❌ Trusting inline styles will work with strict CSP
- ❌ Editing large files all at once
This guide is based on successful projects with computerbas.nl.
Last updated: 23/12/2025