Vibe coding, also known as vibecoding, is a an approach to programming that leverages Artificial Intelligence (AI) to simplify software development. Coined by Andrej Karpathy in February 2025, this innovative practice enables programmers to articulate their coding needs in plain language, which an AI system then translates into functional code. By utilizing large language models fine-tuned for coding tasks, vibe coding empowers even novice programmers to create and debug software without the need for extensive coding expertise.
The process emphasizes capturing the "vibes" of the programmer's intent
Well in short words.
Instead of having a copilot.
You are the copilot.
Vibe coding with Cursor AI?
If you don’t know what is Cursor yet.
That’s because you haven’t opened X, Reddit or any tech website for a long time.
Cursor is code editor based on VSCode. “In just 4 months, AI coding assistant Cursor raised another $100M at a $2.6B valuation led by Thrive, sources say”
Like Lovable and some other startup in this field. Their number of users is just getting bigger and bigger everyday.
What makes it unique?
Cursor is using LLMs to their maximum potential. And help you doing it. When VSCode edits you one file and takes 1 our to do it. Cursor can creates multiple files, edit them and way more faster. It’s also having a lot of tools to make LLM more relevant and stop generating you useless code.
How to setup Cursor AI to write better Flutter code
It’s all about context
LLM are not creative. They use what you teach them. That’s why non-tech people creates unmaintainable code using AI. They don’t know how to talk with machine.
To create a great software with those editors. You need to speak the software language, and give right instructions.
You are the co-pilot. You are the creative person. If you say turn right. Machine will goes right even if there is a wall
Cursor Rules to rules them all
Cursor has included an amazing idea. Inside the .rules folder you can write all the rules that you will be able to provide to agent.
Those rules are written using markdown
But that’s not all.
- Reference a file directly in rules using (@file)
- Give a description for the rule
- A pattern for files that this rules can apply on
Creating our rules
Now this is what I personnaly found productive. I found some prompts, practices from others and created my own
Workflow and project description
A first rule that is nice to start is describing your project. But also explaining how you want the AI to work.
Ex:
Please think out loud and provide
- Overview of completed work
- Rationale for decision
- next steps checklist
This way AI will also explain and provide an overview of what it is doing. I also like to ask him to not talk that much. Just provide code and give me an overview only if I ask for it.
Flutter rules
That’s where we are starting to get fun. This file will change everything.
Each time we wanna create a new module, widgets… we will provide this list of rules to our agent. Now depending on how you work and what packages you use, you will have to create this.
I have found that I need to provides these section to the Flutter rules
Dart general guidelines
Ex :
- Avoid using type any
- Create necessary types
- Don't leave blank lines within a function
- One export per file
- Prefer super contructor
...
Nomenclature
This is how to names dart classes, methods…
- Use PascalCase for classes.
- Use camelCase for variables, functions, and methods.
- Use underscores_case for file and directory names.
- Avoid magic numbers and define constants.
- Start each function with a verb.
...
Imports
- always use package import even for our project files
Ex: import 'package:apparence_kit/core/data/entities/upload_result.dart';
- Comply to the always_use_package_imports rule
- Our package is named apparence_kit
- DO avoid relative imports for files in lib/
Without this agent will create relative imports. But Dart and Flutter team pushes for package import.
Architecture rule
Now inside the flutter rules you should provide clear rules on how to architecture your app. Meaning that you give
- A folder structure (explaining how and where to push any file )
- A layer structure (What are your differents layers and there goal)
- A definition and small example of each layer files
I also like to provide a small example of how to create a new module. But remember that you have to try making it as simple as possible. AI needs to get data but also can't ingest too much data at once. AI is not a human, but it's behavior is close to a human. We have to find the right balance between providing enough data and not overwhelming it.
Unit test rule
It’s not because we use AI that we don’t have to write tests.
It’s even faster than before to write tests. But as everything you need to explain AI a clear strategy on how and what to test.
For example in ApparenceKit we pushed for Fake over Mocks. You have to explain your agent how to work with API as unit tests don’t have access to network.
Adding Documentation from Web page
You can add documentation from web into your context
- Type on cmd + p
- type “> add new doc”
- Then enter a link to the webpage to add
Now you will be able to reference to this using
@MyDoc in your prompts (For now you can’t reference a doc inside a rules. But this should be coming soon)
Notepads
You will end creating a lot of small prompts to call each rules when you need them
For example when I want to create a new module I use this
Using our context @context.mdc ApparenceKit guidelines @flutter.mdc and @supabase_api.mdc create a new module that
As I don’t want to rewrite this all the time. I have put it inside a notepad.
Now I only need to write
@newModule [module description and specifications]
How be 10x more productive with Cursor
As I said earlier
It’s all about giving AI context and knowledge.
AI is just a pilot that follows your rules. Agent are bad at writing good code. Unless you teach him how to do it.
That’s where you should really consider using a starter kit.
- it provides a clear architecture
- pre-made modules and pages so AI has example to use
- pre-configured projects (AI can’t configure Xcode files)
AI Agent are killing no-code. With the right starter and cursor rules. You will get 10 times more productive than any n-code builder. But this will be for another article.
You can also watch our video on how to setup Cursor AI to write Flutter code
💡 Our Flutter template provides a complete list of rules that works with the provided architecture. Everything is given to agent so you can be productive instantly. You can find more information about our Flutter template here