Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save VenkataSakethDakuri/7957e95b0ee5f3cb3d497ceac5422b4a to your computer and use it in GitHub Desktop.
Save VenkataSakethDakuri/7957e95b0ee5f3cb3d497ceac5422b4a to your computer and use it in GitHub Desktop.
Vibe Coding
Lovable:
Encourage External Tool Usage
Nudge GPT to use external tools for specific tasks.
Particularly useful for frontend tasks (e.g., progress bars, UI components).
Explicitly Include "Connect to Database"
Mention "Connect to database" in either the user prompt or system message to ensure proper handling of database-related tasks.
Fix Row-Level Security (RLS) Issues
Sometimes, GPT needs explicit instructions to fix RLS when dealing with database permissions.
Chunk Large Data for Efficient Processing
Prompt GPT to split large input and output into smaller chunks.
Improves processing efficiency and avoids memory limitations.
Use OpenAI Function Calling for Structured Responses
Explicitly say "use AI" for integrating AI capabilities in any usecase.
When requiring structured responses, leverage OpenAI's function calling.
⚠️ Not applicable for casual chat scenarios.
For reasoning models like o1, it is better to have a concise prompt.
Say the expected input and output for edge functions
Give this to gpt to generate prompts:
you are a world class prompt engineer you put together very detailed prompts that are concise but detailed enough that I can get my desired output, when I ask you for a prompt I want you to put together the prompt in markdown in a code block so I can easily copy it.
Generate reverse meta prompt at the end of project asking how the prompt should have been so that the errors encountered during building could have been avoided, this can be used as reference later on.
Images are a great way to set the tone of what we are trying to build (especially the first prompt).
Sometimes while using supabase we may have to disable security:
If we are making a match making application, then we need to see interests of 2 users , hence we may need to disable rls.
When uploading some document, the application may not allow to view it on UI because it is protecting from viewing.
Webhook calling example:
POST JSON {text: InputValue} to the webhook below. This means you need to send a JSON object containing a text field with a value from the input.
clean up the supabase data to match the current build as i realized when i revert to a backup the supabase data stays the same, this might be causing issues
1- In Chat mode, detail what you want to achieve. Here's how I end that prompt: "Could you please repeat the request back to me and propose a detailed implementation plan? Please address only the question; do not do anything else, and don’t modify the code. Thank you."
2- Still in Chat mode, have a back and forth with the AI to agree on the implementation plan.
3- Once you are happy with the AI's plan, switch to dev mode and request the AI execute the plan. Here's the prompt I use at this point:
"Please follow the next steps, one by one:
1- Please implement the plan based only on what you mentioned and our agreement.
2- Ensure the implementation will not break anything.
3- Update the changelog. No need to mention the update to the changelog in your response.
4- Don't do or change anything else, thank you."
🤖 Thinking Steps (Claude-Specific)
📌 For AI models like Claude, structuring thoughts enhances problem-solving efficiency.
Think step by step and provide reasoning for complex problems.
Break down large tasks and ask clarifying questions if needed.
Use Artifacts for:
Web apps
Code demos
Documents
💡 Feedback Best Practices
When providing feedback, explain the thought process and highlight both issues & opportunities.
For updates to existing Artifacts, documents, or code, rewrite everything, not just the modified section.
Before improving a prompt, review all knowledge base content related to Lovable.
Cursor :
Cursor rules or windsurf rules indicate what tech you use, what workflows, how you want to code.
coding preference:
Always prefer simple solutions
Avoid duplication of code whenever possible, which means checking for other areas of the codebase that might already have similar code and functionality
Write code that takes into account the different environments: dev, test, and prod
You are careful to only make changes that are requested or you are confident are well understood and related to the change being requested
When fixing an issue or bug, do not introduce a new pattern or technology without first exhausting all options for the existing implementation. And if you finally do this, make sure to remove the old implementation afterwards so we don't have duplicate logic.
Keep the codebase very clean and organized
Avoid writing scripts in files if possible, especially if the script is likely only to be run once
Avoid having files over 200–300 lines of code. Refactor at that point.
Mocking data is only needed for tests; never mock data for dev or prod
Never add stubbing or fake data patterns to code that affects the dev or prod environments
Never overwrite my .env file without first asking and confirming
Workflow preference:
Focus on the areas of code relevant to the task.
Do not touch code that is unrelated to the task.
Write thorough tests for all major functionality.
Avoid making major changes to the patterns and architecture of how a feature works after it has shown to work well, unless explicitly instructed.
Always think about what other methods and areas of code might be affected by code changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment