Blog

Using commercetools for builders on a budget

Publish date: November 24, 2026
Using commercetools for builders on a budget
  • Most of the bill is re-reading context. In my longest sessions, cache reads and writes were 93% of the cost and the output the model produced was 7%.
  • Session length affects cost more than prompt wording. Capping context at 200k tokens alone would have brought my bill to ~70% of what I spent.
  • Skills and MCP tools add to startup context. Load only the ones a task needs, and name the skill for each task in the plan.
  • Instrument your usage. Cache read divided by output, per session, tells you when a session has gone on too long.

Introduction

As an AI-enabled software architect whose day revolves around working with commercetools through the Knowledge MCP, the Commerce MCP and the commercetools for Builders AI skills, I go through a good number of tokens in a day. This was fine on an “all-you-can-eat” Claude buffet, but as we all know, AI tokens have changed that dynamic. I have found that such constraints encourage a shift in perspective from “how do I get this done faster” to “how do I get the most measurable outcomes for the least amount of money.”

Since January 2026, I’ve run a local OpenTelemetry and Grafana stack that captures Claude Code telemetry like token usage and prompts. When my company began publishing commercetools for Builders, skills and spec-driven development took off. This helped me see how skills get used and how prompt-driven development burns far more tokens than well-written specs. This article is a reflection on these findings, and an analysis of where LLM tokens get used.

Where the money really goes

It’s common knowledge at this point, but understanding that an LLM  has no memory between turns was an ‘aha!’ moment for me. What the models do to give us an illusion of memory and context is resend the entire conversation on every turn. As a result, the cost of a session grows with the square of the length of the conversation.

In my conversation run, where I built a storefront and a commerce agent using commercetools for Builders’ skills over two very long sessions, re-reading context from cache accounted for the bulk of the cost. Cache writes, that is, new content entering the context, were the second big chunk. The code and artifacts produced by the model (output tokens) were a fraction of those produced by the first two.

In other words, I was mostly paying to reread my own history, since cache reads and writes accounted for more than 90% of the bill.

The takeaway:

Session length affected my cost far more than how I wrote my prompts.

Session length as the cost lever

Once you understand context replay is your highest cost, tracking it becomes your best tool. I track this with a ratio I call “R”. “R” is the number of tokens of context the model rereads divided by the number of tokens it writes, or “R” = Cr / To. The lower “R” is, the more productive your session tends to be.

I compared two approaches: Prompt-first (asking step by step) versus spec-driven (writing a detailed plan once, then building from it). The prompt-first version replayed context at roughly five times the rate. Spec-driven wasn’t just cheaper; it also produced more code per prompt.

It turns out you don’t need a strict adherence to spec-driven methodology to optimize token usage. Just limiting context accumulation to 200k tokens would have cut my bill to roughly 70% of actual spending. 

Here are the best practices:

  • Plan long, implement short. One longer planning session maps architecture. That planning phase is expensive but becomes the foundation for multiple short, focused implementation sessions.
  • One session, one topic. If work splits into two topics, split before starting. Start fresh for new work.
  • Don’t resume old sessions. You bring the entire history forward. Instead, write down where you stopped and start fresh.
  • Keep sessions short and scoped. Each session has one clear goal. When done, close it.

The takeaway:

Plan in one long session, then implement in short sessions that each start from the written plan.

Skills and their relation to session cost

The commercetools for Builders skills are what make LLM outputs correct when working with the platform. These skills also add to the startup context, which in turn may increase session cost. Here’s what I found in my own setup:

  • Startup context is paid on every turn of every session: My workspaces start with between 28k and 62k tokens of context before I type anything. One of my CLAUDE.md files were about 16k tokens on their own, mostly containing report formats and checklists that only matter occasionally. To better work within a budget, I’ve started moving occasional material into on-demand documents, and I install skills at the individual project level rather than globall.
  • Only load relevant skills (i.e., those relevant to the task at hand): I’ve started turning off skills that aren’t relevant to the task at hand. For example, if I’m working on a connector that facilitates integrations between commercetools and an external tax provider such as Avalara, I usually just load the commercetools-integrations, commercetools-connect, and commercetools-commerce-patterns skills. There is no need to have the commercetools-checkout or commercetools-storefront skills enabled for this activity, so keep them off.
  • Don’t expect the skills to get used just because they are loaded: Even with the precise skills turned on, I found the model reaching for MCP and raw REST instead because it approximately knew how to. As models improve, I imagine this behavior would change, but this is also a cost problem because ‘nearly’ right means more turns to get an output ‘exactly’ right. What works best to counteract this is explicitly assigning a commercetools skill to each action in the plan. The commercetools-spec-driven-development skill does this by creating a plan-time table that maps every architectural area to a named skill or an explicit none, and every task carries a [SKILL: <name>] annotation. From a budgeting perspective, this means that each implementation session only loads the skill the task names.
  • Turn off the MCP tools that aren’t used: A Commerce MCP server configured with ‘--tools=all’ loads every tool definition into the context for the entire session. I usually default those to off and enable them as needed per session.
  • Do not paste large artifacts: 53 of my prompts exceeded 20k characters. Two of them were JSON pastes of 770k and 930k characters, just to get a SKU count (silly, I know). When sharing such artifacts as context, save them to a file and ask for a script or a targeted read.
  • Keep NL processing out of the main session: Bash output, file reads, documentation search and Google Drive/Confluence lookups were the largest sources of new context in my sessions. I found that when such activities are delegated to a subagent, it performs the research and sweeps in its own context and then hands back the conclusion.
  • Batch the small asks: In my mid-length sessions, a prompt cost $2.37 on average, against $0.85 in short ones, and each prompt averaged 5.6 API calls. Writing a multi-step ask as one list, or using /plan mode and then reviewing the diff costs less than six one-line follow-ups.

The takeaway:

Load only the skills and MCP tools a task needs, and name each skill in the plan.

Where I would start

If you’re looking to manage AI costs with commercetools for Builders, here’s the priority order based on what saved costs the most for me:

  1. Stop letting sessions grow endlessly. Cap context at 200k tokens and start fresh often.
  2. Scope sessions tightly. One topic per session. When you’re done, close it.
  3. Name the skill for each task in your plan. Use spec-driven development, which does this for you.
  4. Enable only the skills you need. Disable everything else.
  5. Turn off unused MCP tools. Each tool definition is weight you’re carrying.
  6. Use files instead of large text pastes. Write a script to read the file when you need it.
  7. Separate research from development. Use sub-agents for information gathering.
  8. Track your own usage. Measure context replay versus output produced. Under 150:1 is healthy; above 500:1 means your session has gone on too long.

The core insight that made this whole difference clear was simply tracking where my money went. In a world of fixed AI budgets, that goes beyond curiosity: it’s actually how you stay on track.

Explore what you can build with commercetools for Builders in our documentation — or contact our team for more information.

About the authors
Kapil Madan Bathija
Kapil Madan Bathija
Senior Solution Architect, commercetools

Kapil Bathija is a solutions architect at commercetools in the Forward Deployed Services and Expert Services roles. Kapil helps customers build commerce agents and adopt AI-assisted development using the commercetools for Builders skills, Knowledge MCP and Commerce MCP.

You may also be interested in

View all blogs
Taming vibe coding: Our takeaways from spec-driven development
September 7, 2026
Build with AI

Taming vibe coding: Our takeaways from spec-driven development

Anthropic built the agents. We built the engine to run them on.
September 10, 2026
Build with AI

Anthropic built the agents. We built the engine to run them on.

commercetools for Builders: From creating digital storefronts to further solving what blocks modernization
August 31, 2026
Build with AI

commercetools for Builders: From creating digital storefronts to further solving what blocks modernization

Get in touch

Stay informed

Receive monthly updates on trends, products and growth insights in your inbox.