CJ Zafir Profile picture
Nov 30, 2024 11 tweets 5 min read Read on X
Today I've completed my 28th project with AI Code.

3 months back I knew nothing about Cursor, bolt, v0 or even Claude as a coding assistant.

But after spending 600+ hours with these AI tools, I have learned some TRICKs.

I'm sharing TOP 10 TRICKs of:
- Cursor
- Bolt
🧵
Let's start with bolt.

1. Do you know Bolt is open source? which means I can inspect their Github repo and find their "system prompt"

I copy this prompt and feed it to claude/o1 when I work on bolt related tasks.

I ask AI to keep the prompt in mind and bolt instructions.

It always works. Try it.

You can find this prompt under:
bolt .new/app/lib/.server/llm/prompts.tsImage
2. Target file

I paste v0 code in bolt to get my frontend components done quickly and with less token burn.

But when I paste the code in the file myself, bolt doesn't update its context.

For this purpose I use "target file" option.

I let bolt know that I pasted the code in x file. Help me run the update and update linked files.

It works.Image
3. Let me help you save tokens on Bolt.

When you ask bolt to make a specific change in the code. Bolt tries to rewrite the code for complete file.

It burns alot of tokens.

To solve this issue Bolt launch a beta feature "Diffs"

Go to Settings/Preview features and enable Diffs

(There're still some issues with accuracy but it is much better now)Image
4. Specific Change.

If you want to use Diffs even better and you know some context of code. Try this.

Highlight the code snippet and click on "Ask AI"

Bolt will attach the snippet to input filed. Now prompt it to mak ethat specific change.

This works fast and burn very less tokens.Image
5. Enhance prompt.

When you start your workflow or during the process, when you ask bolt to make any changes.

Try this "enhance prompt" feature to make your prompt more detailed.

8/10 times it makes your request alot clear, resulting in less errors and less token burn. Image
Now let me give you 5 Cursor Tricks.

1. Check if you're using latest Sonnet Model?

By default Cursor is using the old Claude Sonnet 3.5 model.

Go to Cursor Settings/Models and enable Cursor sonnet-20241022

Then in composer select that model.

New model is alot efficient for coding and debugging.Image
3. New Agent 0.43 Update Download.

Many of you are still using Cursor 0.42 which doesn't have Cursor agent.

Go to changelog .cursor.sh/ and download cursor from here.

This is Cursor's feature update page. Image
3. Enable Bug finder

This is an experimental (beta feature) that helps you find minor bugs in the code.

Go to Cursor Settings/beta and enable this feature.

It will show up alongside composer.

(Still not super accurate but alot better than manual prompting and fixing).

Documentation makes a huge difference.Image
4. Documentation

Project Documentation works like a context boundary around Cursor.

You need to understand that Cursor's system prompt is very complex. If you don't provide context around your project.

It will mess up code, file structure, layout. You'll burn out and quit.

Let me help you.

Check out my earlier posts where I shared what docs you need to create to make cursor work with you not gainst you.

I was asked alot that how do you upload documents?

you just need to create a folder in your root directory. I name it "Documents" and them upload all your docs in .md format.

Good part. Cursor Agent picks up docs right away. Just tag the right doc, prompt cursor and boom. It works.Image
For Dumentation process which is 80% work of the AI code.

I am building codeguide .dev to create High Quality Docs in 15 minutes rather than 5 hours after burning all chat limits on o1 and Claude.

I fixed my painpoint. Sign up today to get early access.
(720 signed up in 48 hours. 🙌)

Share this Post with others to Support.

If you want me to share more Tricks on tools like v0, Windsurf, Cline? Comment your thoughts below. ✨

Peace.
CJImage

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with CJ Zafir

CJ Zafir Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @cjzafir

Apr 18
What are AI Agents?

OpenAI just published 30-page guide on AI agents.

I explained the guide in 10 points. Bookmark this: Image
1. Agents ≠ basic workflows

A normal “workflow” just runs a fixed list of steps with an LLM; it doesn’t think for itself.

On the other hand, Agents are systems that independently accomplish tasks on your behalf.

Workflows are linear. Agents are dynamic & autonomous. Image
2. Use agents for the complex jobs

Agents handle changing rules, tricky choices, and unstructured data better than any fixed script.

Pick jobs that need judgment, change a lot, or rely on messy text, images, or PDFs. Image
Read 12 tweets
Apr 10
I tested Gemini Pro 2.5 as my main coding model for 40+ hours.

Here're 2 documents that are working brilliantly well with Gemini.

"App flow document + App flowchart."

This made my Cursor workflow 10x better. Here's why it is working: ↓
Gemini Pro 2.5 has a 1 million token context window.

In simple terms it can scan upto 100,000 lines of code instantly to understand full codebase.

Claude & GPT models has 200k context window and that's why they struggle with large codebases.
But large context window doesn't mean Gemini doesn't hallucinate or assume things.

That issue is still there but I'm able to fix hallucinations by 95% in Gemini with my 'Context Boundary' technique.

You need to provide context with coding docs:
- PRD
- App flow doc
- Tech stack doc
etc

But here's how 2 docs are working really good with Gemini.Image
Read 7 tweets
Apr 8
Debugging is the most frustrating part of AI coding.

But it can be solved if you build a strong "wall of context" around AI models.

Here's how you can fix debugging in Cursor/Windsurf: ↓ Image
If you say "build me a spotify like app" and you expect AI to code the entire frontend and backend in 1 prompt. That's not possible.

AI models can output limited code in 1 request.

Also, AI models are not perfect they have 2 limitations:
1. AI hallucinations
2. Context window
So, first you need to provide deep context about your idea in the form of a context boundary around AI models.

To build this boundary, you need to turn your plain english idea into a set of coding docs:

1. Project Requirement Document (PRD)
2. App Flow Doc.
3. Tech Stack Doc.
4. Frontend Guidelines
5. Backend Structure

These 5 docs are your core docs. Let's expand them:Image
Read 11 tweets
Apr 6
Google's Gemini Pro 2.5 is the best AI coding model right now.

I use Gemini 2.5 + Sonnet 3.5 + GPT o1 models in my new coding workflow.

After using it for 20 hours, here're my finding: ↓ Image
I admit, Google has done a wonderful job this time with Gemini Pro 2.5 model.

They competed with Claude's Sonnet models for coding and the code quality is far better.

In new workflow I use:
- 80% of the time Gemini Pro 2.5
- 10% of the time Sonnet 3.5
- 10% of the time GPT o1
My findings after testing Gemini for 20+ hours:

1. Gemini is great for planning docs, understanding large codebases and one-shotting code snippets.

But there're some issues.

It struggles to understand the user's requests sometimes. (You need to be super clear) Image
Read 12 tweets
Apr 5
What is Vibe Coding?

Here's a complete Crash Course for you: 🧵 Image
2024 has changed coding forever.

It gave birth to AI coding models like Claude Sonnet 3.5, GPT 4o that can code better than junior devs.

We saw AI coding tools like Cursor, Windsurf, Bolt, Replit, Lovable etc built on top of AI coding models.

But..
The biggest change of all is that it made 'English' the largest coding language of all time.

Now anyone with an idea can code.

So people started coding landing pages, websites, web apps, mobile apps, browser extensions or even browsers.

Until recently this type of coding is given a name by @karpathy - Vibe Coding

"you forget about the code even exists...... Just see tuff, say stuff, run stuff and copy paste stuff, and it mostly works"Image
Read 12 tweets
Apr 4
Truth: AI coding models are good for code execution, but not good at planning.

If you let AI plan next step while coding, it will mess up the codebase.

You can solve this by attaching a detailed "Implementation Plan"

Here's how I create my plan: ↓
When you build production-grade applications, you need to sure about:
- What features you want in v1?
- What features are out-of-scope right now?
- How's your UI will look like?
- What tech stack are you using?

These are basic but core questions that AI tries to figure out itself if you don't provide context.
But here's the problem.

All the AI coding models have 1 core issue, that is "hallucinations"

In simple terms, AI models start to assume things on their own and mess up the code structure.

So if you don't hardwire your plan into AI, it'll make its own at every step.

That's a disaster.
Read 9 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(