An iterative thought and planning tool powered by the Gemini API. This web application helps developers and teams refine their ideas, plans, and solutions through AI-assisted thinking.
- Secure API Key Management: No hardcoded API keys - users provide their own
- Iterative Refinement: Start with an initial request and iteratively improve the AI's thoughts
- Clean UI: Modern, responsive design built with Tailwind CSS
- Real-time Processing: Immediate feedback and thought generation
- Memory-only Storage: API keys are never saved to disk for maximum security
This application prioritizes security:
- ✅ No exposed API keys in source code
- ✅ Password-protected input for API key entry
- ✅ Memory-only storage - keys are never saved to localStorage or disk
- ✅ Session-based security - keys are cleared when page is refreshed
- ✅ Input field clearing after API key is set
- A modern web browser
- Python 3 (for local server)
- A Gemini API key from Google AI Studio
- Clone or download this repository
- Start a local server:
python3 -m http.server 8000
- Open your browser and navigate to:
http://localhost:8000/cursorPrompt.html
- Enter your Gemini API key in the secure input field
- Click "Set Key" to store it securely in memory
- Enter your initial request (e.g., "Plan a marketing campaign for a new coffee shop")
- Click "Think" to generate initial thoughts and plans
- Review the generated thoughts in the blue thought bubble
- Add refinements in the refinement box (e.g., "Focus more on social media")
- Click "Refine Thoughts" to improve and integrate your feedback
The tool follows a structured thinking process:
- Deconstruct the Request: Breaks down your request into core objectives
- Identify Key Assumptions: States any assumptions being made
- Formulate a Plan: Outlines clear, step-by-step actions
- Identify Potential Challenges: Notes complexities or edge cases
- Iterative Refinement: Incorporates your feedback to improve the plan
prompt-engineering-refine-for-cursor/
├── cursorPrompt.html # Main application file
└── README.md # This file
- Frontend: Pure HTML5, CSS3, and JavaScript
- Styling: Tailwind CSS via CDN
- Font: Inter font family for modern typography
- API: Google Gemini 2.0 Flash model
- Security: Client-side only, no backend required
The application can be easily customized:
- Styling: Modify the Tailwind classes or add custom CSS
- Prompts: Adjust the system prompts in the JavaScript for different use cases
- UI Elements: Add new sections or modify the existing workflow
- Project Planning: "Plan a new mobile app development project"
- Problem Solving: "How to improve team communication in remote work"
- Strategy Development: "Create a content marketing strategy for a tech startup"
- Process Design: "Design a code review process for our development team"
- API Costs: This tool uses the Gemini API which may incur charges based on usage
- Internet Required: Requires internet connection to communicate with Gemini API
- Session-based: API key and data are lost when the page is refreshed
- No Data Persistence: Conversations are not saved between sessions
Feel free to contribute improvements:
- Fork the repository
- Make your changes
- Test thoroughly
- Submit a pull request
This project is open source. Please ensure you comply with Google's Gemini API terms of service when using this tool.
API Key Issues:
- Ensure your API key starts with "AIza" and is at least 30 characters long
- Verify your API key is active in Google AI Studio
- Check that you have sufficient API credits
Connection Issues:
- Ensure you have a stable internet connection
- Check if the Gemini API service is operational
- Verify CORS is not blocking the requests (use local server as shown above)
Browser Issues:
- Use a modern browser (Chrome, Firefox, Safari, Edge)
- Ensure JavaScript is enabled
- Clear browser cache if experiencing issues
Happy developing! 🚀