

Join the discussion
Write your take first — we'll ask for email only when you're ready to publish.
- Hacker News
- Here is my working flow, confirmed by more than 400 pr merged over the last 4 months. More than half of them were following my current strategy:
1. My agent writes code.
2. Then it creates tests and verifies that all of them actually work, not just pass. To do this, my agent writes the test, then it deletes the code it covers, reruns the test, confirms it goes red, and finally puts the code back.
3. I receive the ready-to-test code and environment setup.
4. I check that the business logic works as I expected it to be on a working product. Here we usually do several iterations of coding and bug fixing.
5. When the manual part is finished, the agent starts an external review using /code review skill. At that stage, it makes some additional fixes and corrections to the tests.
6. Finally, a branch is ready to be merged. We start CI/CD and wait until the run finishes successfully.
That's what I actually use because it generally works.
Note about only docs PRs: I just ask the agent to make the changes, then it runs the / code review skill, and then we merge the branch into main without CI running.
by alekstret - Isn't 1+2 just reverse TDD?by maleldil
- I tend to do code review in separate session. So that context is not affecting judgments.by AlfeG
- > To do this, my agent writes the test, then it deletes the code it covers, reruns the test, confirms it goes red, and finally puts the code back.
Why? Are you aware of red/green/refactor?
- Bro: superintelligent machine line go up AI AGI software solved automate everything
Also bro: Run /clearbetween tasks. This prevents prior irrelevant context from being sent back to the model, which can reduce token usage. Set your model and effort level before you start. Changing either one mid-conversation can bust your prompt cache, which can increase token cost. @-mention files instead of naming them. The file gets attached to your message directly, which saves a Read call, or a search if Claude has to go find it. Add quiet flags to noisy commands, or run them in a subagent. Command output is added to the conversation just like a file, and stays there for the rest of the session. Run /context once in a fresh session. It shows what's loaded (CLAUDE.md, MCP tool definitions), so you can cut out anything unnecessary. /compact before you take a break from your keyboard. The prompt cache expires after an hour, and summarizing a conversation is much cheaper while it's still cached.
- What do you want? Lacking omniscience, even the smartest superintelligence imaginable has to do more thinking to deal with worse inputs.by DangitBobby
- Author not bro, sorry misgender
- I mean, it feels hard not to laugh at this type of blog post. My cynical interpretation is that this is a type of passing the buck to engineers in enterprise settings ("Stop spending tokens. Did you read the value maximization blog post? It is your fault.")
Oh yes, Claude will do all sorts of different things -- it depends on how you use it! You should totally learn all of these little finicky things ... because now completing your tasks cost money. It's not "free" anymore haha like when you used your old text editor, what are you a grandpa?
Oh, and those things will definitely change, as we (the priests of Claude) are vibe coding the system you use to do your little "tasks" ... right, you can't see how it works ... the code is not available. It's all good, just trust us -- we're totally looking out for you.
I mean it is utterly ridiculous to talk around this model of development. There are so many walls between you and doing the thing you want to do.
Agents are great, but the notion of "best tricks" for how to best use an opaque costful tool which will, by all odds, be completely different in a few months time is quite funny.
You know what won't change? A fucking text editor. Or your pi config, or a local model you run and trust.
by mccoyb - I'm curious if you also laugh at articles about how to reduce your AWS bill, or how to add indices to Postgres such that you can run it on cheaper hardware.by dist-epoch
- I'm trying to understand your point of view, but it kind of just sounds like you're against learning how to use tools efficiently?
I mean, agentic coding software is hardly the first tool to exist where learning some idiosyncrasies of how to use it well can result in more efficiency and cost savings.
by csallen - dude, if you try to do harness development yourself you will realize that most things said in this blogpost is shared with any ${sufficiently_advanced_harness}. this is not really claude-specific, this is just how this class of tools, OSS or not, worksby runeblaze
- Through my weekend experiments, I've found I can get way better outcomes, and an order of magnitude less cost with my slapped together sandboxed omp setup plus ZDR openrouter models (DeepSeek, Kimi, etc) than I've ever seen from Claude Code at work.
Everything is version pinned and a deliberate choice to change, and a git revert away from changing back.
TBF the models may change underneath me to some extent still, but the cost benefit of running them myself doesn't pan out yet (for agentic coding at least, don't have enough local vram to get a usable context window and generation speed, self hosting on runpod or similar isn't economically sensible for my current consumption though I have tinkered with it)
by mnahkies - >Agents are great, but the notion of "best tricks" for how to best use an opaque costful tool which will, by all odds, be completely different in a few months time is quite funny.
The bet with this blog post is that things WON'T be completely different in a few months time. I'm going to absorb things from this blog post, and the downside of my bet is the chance that none of this will apply.
Heh I will grant that three months is a looong time in llms hours :-)
by cowboylowrez - I fully agree. All these blog posts are basically features they should be implementing. They advertise they are replacing software development, but then these tools require a massive amount of overhead akin to having to train new hires. But these tools never actually learn and are not trainable, and Anthropic releases a blog post every six months about how to re-invent your workflow. Even the author of Claude Code just told everyone they should delete all their `CLAUDE.md` and skills every six months.
It's wildly lazy.
by bmitc - Not sure how this level of cynicism is even remotely warranted. The post helps people who don't understand LLMs very well get the most out of Claude. Your incentives here are actually aligned with Anthropics since both of you want fewer tokens inputted and outputted per task completed.by DangitBobby
- I'm finding that unexpected cache rewrites cost me huge.
I have 1h cache TTL set, and do nothing to cause rewrite (response in time, no model/effort/tool changes).
At 400K tokens in, I'll write a message, and /usage shows only a small increase in cache write. On the next message, cache writes shows 800K, and by the end, I often hit 2M cache writes with no explanation.
This seems to happen when: using /btw, asking it to review code, other random times. Anyone know what's going on?
- I have long suspected but not confirmed that /btw uses a lower tier model like Haiku.
Depending on how you're triggering reviews, you may be using a sub-agent?
by radlad - You may be running into a "known" bug with Claude Code: https://github.com/anthropics/claude-code/issues/63930by Esras
- To not answer your question, I have a claude stop hook that my status line uses to tell me how close my cache is to expiring https://pastebin.com/JLXUG16Q
_entirely_ vibecoded don't @ me.
by AlexErrant - What I want is a version of `/clear` that keeps the conversation but drops out things like bloated logs, error traces, etc that were only relevant in the immediate local context.
I guess compacting somewhat does that but I want something more explicitly that trims out these extremely bloated artefacts while maintaining in full the actual conversation history.
by zmmmmm - /handoffby StilesCrisis
- Create a skill for this that you can invoke a new session in referencing your previous session id. Your instructions here read clear enough it seems to create it. Though a handover skill with this kind of behaviour in the same session might be more economical given the cache materials is already there.by hetspookjee
- Wouldn't that context with gaps where the output should be confuse the agent too much? At the very least they should be replaced with an explanation that sections were redacted. Otherwise I am imagining the agent will think the commando failed or it won't know how it fixed something.by dizhn
- This is all good to know, but funny how we are suddenly back to formal languages and commands. Aren't these things intelligent enough to figure these things out for us?by mojuba
- Codex is at least. The length of my prompts have decreased over time. Mostly I point it to relevant examples that already exist. It knows the drill.
- > @-mention files instead of naming them. The file gets attached to your message directly, which saves a Read call, or a search if Claude has to go find it.
I've heard it argued that this is an antipattern. If the file is large, it will read the whole file. With Read or something similar, it can do a targeted search and read only the relevant portion.
Is this still not the case?
Also, since they mention /context: Can anyone explain why /context takes so long to run? It usually takes several seconds, and I've had cases of it taking over a minute.
And why don't they just show the basics in a status line somewhere? Just a plain: "120K/200K tokens" I hate having to type /context just to get this. And I shouldn't need to install an extension.
by BeetleB - so i actually read beyond the TLDR and the reasons are:
- it gets attached early so fully cached, even if later cache is busted
- it gets included in every request automatically, so if your following requests are going to keep triggering File Read requests it will be much cheaper and faster to keep sending it
My main question is how this works if Claude itself keeps editing the file. Surely then you are sabotaging your own cache rather than helping it.
The things to add this way would be static files that you don't expect to change and to be highly relevant to the following requests. Especially if you want them to be mandatory reading and not just hope the agent will read it.
by zmmmmm - > I've heard it argued that this is an antipattern. If the file is large, it will read the whole file. With Read or something similar, it can do a targeted search and read only the relevant portion.
I suspect you're right and that's why they haven't fixed @-search in the desktop app.
I actually don't find myself using it anymore since moving to the desktop app. I went from using various AI extensions in the IDE to Claude Code desktop.
But if that's accurate, why mention it in this post? Maybe because that's the first thing developers will try when moving away from a code editor?
by rhaksw - it's easy to create one, or use something like https://github.com/jarrodwatts/claude-hudby imgyuri
- You can make your own status line with something like "120K/200K Fable 5", it's nice.