TL;DR Tips about how to use Vibe Coding tools (use Gemini CLI as an example) effectively in the coding process.
Nowadays, AI (especially LLMs like ChatGPT) is changing many aspects of our daily life, making it more convenient and supportive. Few groups have been impacted by LLMs as much as programmers. A new trend in programming has emerged, called “Vibe Coding”, which means using Artificial Intelligence (AI) software to help coding, even write the whole project all by AI. Traditional software development processes and workflows have been changed dramatically and forever. Since everyone uses LLMs to accelerate their coding, how efficiently you use these tools distinguishes your productivity as a developer, whether you work for yourself or for a FAANG company. Today, I will share some tips that will help developers use vibe coding tools effectively. In this article, I will use Google’s Gemini CLI as an example, but you can easily find similar features in other tools, which makes this post generally applicable to all reasonably well-designed tools.
Tip 1: Storing your project context in a reusable way
Although LLMs are smart and become smarter every couple of weeks, without proper context, they will still make mistakes. Some context (e.g., architecture, framework, or toolset) can be inferred from the project files, but it will take lots of tokens and time to read and understand everything. Even worse, some context cannot be inferred from the project files (e.g., the purpose of the project: MVP or production-ready). A good practice is to provide enough context for the task so the agent/LLM will perform well. During the development process, we will use this context every time we start a session (it’s pretty rare that you can finish all the jobs in one session). So it’s better to store the context somewhere so that when we start a new session, we can copy and paste the context from where we stored it. Gemini CLI provides a good way to store and automatically load the context at the beginning of each session. Specifically, you can create a file called GEMINI.md, write the context text in it, and store it in the project root directory. Next time, Gemini CLI will try to find and load the file before you ask it to do something. This is a standard way to version control the context and share it with your co-workers. For more details, please visit: https://google-gemini.github.io/gemini-cli/docs/cli/configuration.html#context-files-hierarchical-instructional-context
Tip 2: Extracting routine tasks into custom commands
Sometimes, we have tasks that are repeated within a project or across projects. Some of them have pretty long contexts and prompts, which will take time to manually input and are error-prone. In such situations, it’s a good time to put such prompts into custom commands, which, just like built-in commands, can be called when you need them. Essentially, custom commands are a configuration file that contains prompts. Some advanced vibe coding tools like Gemini CLI also support additional features, such as command arguments. When you use vibe coding tools, you will find that some tasks are very common and repetitive. For example, when you start a new project, you need to create the project structure, set up the environment, install dependencies, etc. When you finish a feature, you need to write tests, update documentation, etc. These tasks are very common and repetitive, but they are not the main focus of your project. You can extract these tasks into custom commands, then you can run them with a single command. For example, in Gemini CLI, you can create a file called <command-name>.toml
, write the custom commands in the file, and store it in the proper directory (in ~/.gemini/commands/
or <project>/.gemini/commands/
). Next time, you can run the custom commands with /<command-name>
. This will save you lots of time and effort. For more details, please visit: https://google-gemini.github.io/gemini-cli/docs/cli/commands.html#custom-commands.
Tip 3: Using checkpoints to prevent bad changes
Agents sometimes make bad changes, break the code, or remove useful files. There are two ways to restore from such a situation: First, use a version control system (e.g., git) to save important work progress in time. This is the traditional way, but it can be tedious if you save every change. Second, use the checkpoints feature of vibe coding tools, such as Copilot, Cursor, and of course Gemini CLI. The checkpoints feature gives you time machine ability, allowing you to go back to the past where all files and conversations will be restored to that time. See more details at https://google-gemini.github.io/gemini-cli/docs/checkpointing.html.
Tip 4: Using Model Context Protocol (MCP) as additional tools
Two things make vibe coding powerful: the thinking power to solve complex problems, and the ability to use tools. Vibe coding tools usually provide some common tools for general usage. But if you want more tools, you can use MCP as additional tools. MCP is a protocol that allows your LLM agent to use services or tools provided by other software or even other LLM agents. MCP is so popular that not only do almost all vibe coding tools support it (of course, Gemini CLI supports it), but also many software programs and libraries provide MCP interfaces for agents to integrate.
One of my favorite MCP tools is Playwright MCP (https://github.com/microsoft/playwright-mcp). Playwright MCP allows vibe coding to open a web browser, navigate around, operate buttons and forms, and take screenshots, which is pretty useful when I need to design my own websites or want vibe coding to check some facts from websites.
Tip 5: Using shortcuts to improve efficiency
Although vibe coding tools are smart about your coding jobs, the vibe coding tools themselves are not smart. Knowing some shortcuts will help you do things faster.
All vibe coding tools need human approval before making changes or performing dangerous operations (like executing shell commands). If you are confident about the agent’s behavior, you can set the tools to always proceed without asking permission (auto-approval). The implementation differs across different tools. In Gemini CLI, you can start Gemini with the --yolo
option, which will not ask for any approval. During sessions, you can use Ctrl+Y
to toggle the YOLO mode. Or if you want a less risky approach, use keyboard shortcuts (in Gemini CLI, it is Alt+Tab
) to toggle auto-accepting mode if you’re pretty sure the following operations are safe. In this way, you can allow the agent to do the task automatically, instead of requiring your approval at every step, which can be pretty time-consuming.
Another shortcut I find particularly useful is for quick tasks where I need fast help (e.g., I forget how to use git or shell commands to find files). Instead of opening the vibe coding tool, waiting for the terminal user interface (TUI) to start, typing my question, and then quitting after getting my answer, I find it more efficient to call the vibe coding tool directly from the terminal for a quick one-off query. For example: gemini -p "which command can pull the latest git lfs content?"
Conclusion
With these tips, you can finish your vibe coding job more quickly and efficiently. Happy vibe coding!