My efficient workflow with Claude Code

Written by Vincent Bruijn

I have been using Claude Code for a few weeks now and I’m totally hooked! I foresee a bright future for AI code companions in general and for the role of developers in particular.

I’ve spent quite some money on private projects but I want to keep my costs under control. I think I found a good workflow that balances between having the benefit of Claude Code while also managing expenses.

Currently I’m subscribed to only one AI chat service and I chose Anthropic Claude. Apart from the UX design, especially their color theme throughout their suite of tools, I also think Claude fulfills my needs best. I would like the chat app to be extended with grouping chats though and I would like to see the projects feature function more as a set of silos where chats don’t end up on the general chats list.

Claude Code all the way

For coding projects I’ve developed several approaches which I will describe here, ending with the economic solution I came up with last week.

Initially, I would start projects this way: I create a prompt.md file in a directory (the project root). In the prompt I describe the general outline of requirements first, then dig deeper into specifics below so that I get a clear description of my project. I even make suggestions on directory structure and file naming conventions. Main data types or constants can be defined there too.

You are a test automation expert and experienced with the Playwright framework. I want you to write a command line tool to store both performance metrics and a screenshot of a URL.

Requirements: create a command line tool written in JavaScript which does the following:
1. the command line tool should accept a URL via a --url argument (required)
2. the command line tool should accept one or more cookies via one or more --cookie arguments (optional)
3. the command line tool should open the supplied url using Playwright in non-headless mode and full screen and
    1. wait 8 seconds after loading the page before continueing
    2. create a screenshot of the fully rendered page
    3. retrieve and store the performance metrics via the Chrome Devtools Protocol (CDP)
4. The downloaded data should be stored in a directoy named "results"
    1. In there a directory which is a hash of the supplied URL
        1. In that directory a date-named directory, for example 20250508133700000, which is only the numbers of an ISO date where the downloaded data will be stored.
5. Also create a package.json
6. When done, create a README.md with explanation of how the tool works.
7. Make use of the "bin" feature of a nodejs package.

When done, I start Claude Code and write a prompt to initiate the tool to start creating code:

Please read the prompt.md file and use its contents to write requested code.

This way I was able to have useful tools within an hour for which I would otherwise have spent two or three hours. A lot of the boilerplate is taken care of by Claude Code and with only minor tweaks I get my tool working. Claude Code tracks its own work in a special CLAUDE.md file which is similar to my readme but fully generated by Claude itself and uses its own terminology. Anthropic calls this file Claude Code’s “memory”.

This is a neat approach. With the /cost command one can see the tokens spent (for the above prompt I paid not even €0.50). All good, but can we be a little more efficient? Tokens for the Claude API are purchased separately from their subscription, which is inconvenient.

Coding cost effective: first chat, then code

So the approach I now take is to start a project in Claude chat first, describing what I want to achieve as best as possible so that Claude can generate some artifacts and prompts within the chat already. I review the code, request several changes based on the logic only, and I close off with a request to have it generate a CLAUDE.md file.

The nice thing is that I can do a lot of prep work while not at my laptop (during commutes, for example) and still have the basic files done for my project. This is all within the cost of my subscription without spending on API tokens. Afterwards, I take the generated artifacts including the important CLAUDE.md file to my laptop, put them in a dedicated directory and start my IDE. From there I’ll start Claude Code via claude and tell it to continue by reading its CLAUDE.md file to polish my project. This costs significantly fewer API tokens while achieving essentially the same result.

Model Rotation

You could take this further: you’re not bound to Claude to start your project. You can combine artifacts created from several AI chats, call it Model Rotation, move them into the project’s directory and proceed from there to polish your application.

So what then is the real benefit of Claude Code? It’s of course quicker when you turn on Claude Code’s auto mode and let it do its thing with little interaction from the developer. That’s a plus over copy-pasting back and forth from different tools. Besides, the output from the interaction with Claude Code communicates very well, especially since their todo-list feature was introduced, it’s more verbose than using Gemini 2.5 with aider which can be totally silent for a minute after a prompt and then just vomit code… It can also generate tests easily, debug small but tricky issues effectively, and quickly create context-aware shell scripts and examples. These capabilities make it a valuable tool in a developer’s arsenal even when you’re being conscious about costs.​​​​​​​​​​​​​​​​