Claude Code: Optimize Your Implementations in One Try
Le brief IA que les pros lisent chaque soir
Les 7 actus IA du jour, décryptées en 5 min. Gratuit.
Inclus dès l'inscription : notre sélection des meilleurs guides & comparatifs IA.
Choisis ton rythme
Gratuit · Pas de spam · Désabonnement en 1 clic
Optimizing Claude Code for Efficient Implementations
Making Your Coding Agent More Efficient
Claude Code is extremely effective at converting natural language queries into functional code. If you ask simple questions or request basic implementations, Claude Code usually succeeds in doing this in one go, without you needing to make additional queries or tests to ensure everything works as expected. However, when you start asking for more complex tasks and implementations, Claude Code struggles to deliver these implementations in one shot.
In these cases, you often have to spend a lot of time testing Claude Code's implementation, evaluating its effectiveness, and checking if it aligns with your preferences. When you notice discrepancies, you need to ask Claude Code to correct them, ensure it fully understands your intent, and continue this process until the implementation is exactly as you want it.
This infographic highlights the main points of this article and discusses how to make your Claude Code more efficient for achieving one-shot implementations using three specific techniques.
Why Aim for One-Shot Implementations with Claude Code
First, I want to explain why you should strive for more one-shot implementations with Claude Code. The main reason is that a one-shot implementation saves you time. Instead of having to test and iterate on implementations with Claude Code, which is a very time-consuming process, you simply get the fully ready implementation immediately.
Thus, the primary reason you want to do this is simply to save time. This gives you more time to perform other implementations, fix bugs, or, in general, work on other tasks, which in turn makes you even more efficient. The efficiency with which you can implement solutions is the most critical factor in assessing your skills as an engineer.
How to Improve Claude Code for One-Shot Implementations
In this section, I will discuss a few techniques that I use daily to make my instance of Claude Code more capable of handling the one-shot implementations I want to achieve. I will be as specific as possible and focus on the exact techniques I use for my own use cases. Of course, this may not apply exactly to your use cases. However, I believe you can easily generalize these techniques and try to apply them to your specific application areas.
Discussing Your Implementation with an LLM
The first piece of advice I offer is based on aligning your implementation idea with that of the LLM. What you want to implement is, of course, a thought you have in mind and not something very concrete. Converting that into code is somewhat of a challenge, as there may be ambiguous elements in your thought or other factors that are not entirely clear. Therefore, it is crucial to discuss with an LLM what you are trying to implement, clarify anything that is vague, and ensure the LLM understands exactly what it needs to implement.
Before you start implementing anything, you should generally have a thorough discussion with an LLM about:
- What you are exactly trying to implement
- What you need to consider during the implementation
- What context is necessary for an effective implementation
I can have this conversation multiple times for my own implementations.
If I am implementing something that requires a lot of online research, I usually have an initial discussion with Gemini Deep Research Pro Mode. In my opinion, Gemini is the best online research agent and provides me with the best results. I then discuss with Gemini to create a final product, whether it's a report or a plan for what I want to implement, including everything to consider during the implementation, and I pass it on to my coding agent, which is currently Claude Code, but could of course be any coding agent of your choice.
In other cases, I simply use the planning mode in Claude Code and discuss directly with Claude what I should do and how I should do it. During the planning, I explicitly instruct the model to ask me questions when something is vague or ambiguous. This makes the model more likely to ask questions when it needs more context, which helps me better align with my coding agent exactly what I am trying to implement.
Note that Claude Code can also perform online research, so you could, in theory, have it do that if you also want to search the web.
Granting Testing Permissions to the LLM
Once the LLM has a very clear plan, which we developed in the previous section, it is now time for the LLM to implement the plan it created with you.
When the LLM carries out this implementation, it usually takes quite a bit of time, as you are using the best LLMs, which are often slower. Since the implementation takes time, it is crucial to make the LLM autonomous and capable of testing its own implementation before coming back to you. This will save you a lot of time, as the LLM can test its own work instead of asking you to test it.
To set this up, you need to give your LLM access to the browser. The way to do this varies depending on the IDs or CLIs you are using for coding. However, in Claude Code, you can launch it with dash-dash Chrome and install the Playwright MCP.
This gives Claude Code access to the browser, and the Playwright MCP is a very powerful tool for enhancing Claude Code's browser usage. This sacrifices a bit of speed for quality, but overall, I think it's a worthwhile trade-off in coding. Using faster but lower-quality models does not actually increase speed, as it simply makes the implementations worse, and you have to do more iterations, which, in the long run, takes more time.
Retaining Your Preferences
My final piece of advice concerns retaining your preferences from previous sessions. The initial sessions you have with Claude Code will be less efficient because Claude Code does not fully understand your preferences and how you like the code. Therefore, it is crucial that after each session with Claude Code, you have it memorize what it learned from the session, the key points it would have liked to know before the session, and if it were to start a new session, it would appreciate having that knowledge.
There are several ways to achieve this. Personally, I have a generalized knowledge command that I run after each session with Claude Code, where it stores relevant knowledge about the project in the claude.md file of the project and relevant knowledge about the user in the claude.md file at the user level.
I find that Claude is very good at judging what content should be stored in which file, and I generally trust it to store relevant user knowledge in the user file and project knowledge in the project file. In my opinion, it is as good as I am at determining where the content should be stored.
If you do this after each session, subsequent sessions will be more efficient because Claude Code will automatically better understand your intent and preferences and will adjust its implementations accordingly.
If you have a specific preference for frontend style, you won’t need to ask how to design the frontend of the website. It can simply read the claude.md file describing your preference and implement it immediately without needing to ask clarifying questions or even having to implement something first. Thus, the user will not be dissatisfied with the implementation and will not need to re-implement elements.
By applying these techniques, you can transform Claude Code into a more powerful tool, capable of achieving one-shot implementations, thereby increasing your productivity and efficiency as a developer.
Brief IA — L'actualité IA en français
L'essentiel de l'actualité de l'intelligence artificielle, décrypté et expliqué chaque jour.