Tips on agentic coding
It's always helpful if there is a running thread of tips for agentic coding so I'm writing this up so that everyone adds their own.
I'll start with some of mine that I seem to be going back to every time I pick up a task. I use Claude Code in my work but you can assume that these will also work in every other coding agent (Codex, Gemini, etc).
Writing specs
The most important part of agentic coding, this will save you from lots of round trips and burned tokens. There is no fixed recipe here, you just have to make sure that you understand what you need to build (and clarify with your fellow humans if you have any upstream uncertainties) and then explain that really well to the agent. You don't need to use a specific format but I've found that an invitation to the agent to ask you questions (you can even be strict such as "ask me no less than 5 question") often helps a lot. Plan mode does that too, but Claude seems to cap them to 3, and sometimes you need to provide more input than that.
Writing Code
Well, there's no writing here, actually you just wait for the agent to finish writing. In the meantime, instead of meandering to your social media you can install exercise-timer and do some squats instead.
If it's the first half of the day when my brain cells are still functioning I might hit ctrl+o and observe the agent's thinking process. There were many times when I was able to catch the agent red-handed doing something it wasn't supposed to, or I took a mental note for a direction they took in order to get back to it later.
Reviewing Code or PRs
Whether it's your agent's local generated code or a colleague's PR, you will spend 50% of your days (if not more) reading up and understanding their code. Here, I have a concrete tip: always ask the agent to "Explain in simple terms and assume zero context". Especially, if you're using your CLI where the addition of visual cues like diagrams is absent, getting significantly simpler prose is key - even with repetition of know terms, that actually also helps.
I've actually found that more helpful and natural to keep conversing and drilling down on concept with my agent instead of using a dedicated review plugin that is more formulaic than my tastes.
What are your tips? Add yours in a comment!
— Posting to forums since 2004 like an old man.
No replies yet
Sign in to leave a reply.