12 ms·
Getting good results from Claude Code
- deleted 1y ago[deleted]
- aosaigh 1y agoI’m just today after having my first real success with Claude (and generally with coding agents). I’ve played with Cursor in the past but am now trying Claude and others. As mentioned in the article, the big trick is having clear specs. In my case I sat down for 2 hours and wrote a 12 step document on how I would implement this (along with background information). Claude went through step by step and wrote the code. I imagine this saved me probably 6-10 hours. I’m now reviewing and am going to test etc. and start adjusting and adding future functionality. Its success was rooted in the fact I knew exactly how to do what it needed to do. I wrote out all the steps and it just followed my lead. It makes it clear to me that mid and senior developers aren’t going anywhere. That said, it was amazing to just see it go through the requirements and implement modules full of organised documented code that I didn’t have to write.
- philipwhiuk 1y agoFrankly, even if you ignore Claude entirely, being able to write a good spec for yourself is a worthwhile endeavour.
- aosaigh 1y agoComplete agree. It’s a core skill of a good developer. What’s interesting is that in the past I’d have started this process but then jumped into coding prematurely. Now when you know you are using an agent, the more you write, the better the results.
- danielbln 1y agoYes but let's not forget the lessons of waterfall planning. You can't anticipate everything, so the detail level of the implementation plan should be within a goldi locks zone of detailed but not too detailed, and after each implementation and test phase one should feel comfortable adjusting the spec/plan to the current state of things.
- aosaigh 1y agoAnother good point. I noticed this happening while writing my document. A few times while writing the doc I had to go back and update the previous steps to add missing features. Also I knew when to stop. It’s not fully finished yet. There are additional stages I need to implement. But as an experienced developer, I knew when I had enough for “core functionalty” that was well defined. What worries me is how do you become a good developer if AI is writing it all? One of my strengths as a developer is understanding the problem and breaking it down into steps, creating requirements documents like I’ve discussed. But that’s a hard-earned skill from years of client work where I wrote the code. I have a huge step up in getting the most from these agents now.
- danielbln 1y agoAgents raise the floor for all, but they raise the ceiling for those of us with sufficient priors.
- closewith 1y agoThe downside of waterfall was not overly detailed specs. In fact, the best software development is universally waterfall following a good, ideally formal spec. The downside that Agile sought to remedy was inflexibility, which is an issue greatly ameliorated by coding agents.
- danielbln 1y agoMaybe if you know the entire possibility space beforehand, in which case that's a great position to be in. In other cases and if the spec doesn't align with reality after implementation has begun or unforseen issues pop up, the spec needs revision, does it not?
- fooster 1y agoafter 30+years of engineering writing lots of specs is mostly a waste of time. The problem is more or less you don’t know enough. The trick is to write the smallest simplest version of whatever you are trying to achieve and then iterate on that. Be prepared to throw it out. The nice thing with Claude (or Gemini) is that it lets to do this really really quickly.
- esafak 1y agoYou can use Claude to write the spec next time.
- mft_ 1y agoCan you (or anyone) share an example of such a specification document? As an amateur programmer experimenting with CC, it would be very helpful to understand the nature and depth of the information that is helpful.
- bongodongobob 1y agoI do a multistep process Step 1: back and forth chat about the functionality we want. What do we want it to do? What are the inputs and outputs? Then generate a spec/requirements sheet. Step 2: identify what language, technologies, frameworks to use to accomplish the goal. Generate a technical spec. Step 3: architecture. Get a layout of the different files that need to be created and a general outline of what each will do. Step 4: combine your docs and tell it to write the code.
- jamesponddotco 1y agoI have multiple system prompts that I use before getting to the actual specification. 1. I use the Socratic Coder[1] system prompt to have a back and forth conversation about the idea, which helps me hone the idea and improve it. This conversation forces me to think about several aspects of the idea and how to implement it. 2. I use the Brainstorm Specification[2] user prompt to turn that conversation into a specification. 3. I use the Brainstorm Critique[3] user prompt to critique that specification and find flaws in it which I might have missed. 4. I use a modified version of the Brainstorm Specification user prompt to refine the specification based on the critique and have a final version of the document, which I can either use on my own or feed to something like Claude Code for context. Doing those things improved the quality of the code and work spit out by the LLMs I use by a significant amount, but more importantly, it helped me write much better code on my own because I know have something to guide me, while before I used to go blind. As a bonus, it also helped me decide if an idea was worth it or not; there are times I'm talking with the LLM and it asks me questions I don't feel like answering, which tells me I'm probably not into that idea as much as I initially thought, it was just my ADHD hyper focusing on something. [1]: https://github.com/jamesponddotco/llm-prompts/blob/trunk/data/socratic-coder.md https://github.com/jamesponddotco/llm-prompts/blob/trunk/dat... [2]: https://github.com/jamesponddotco/llm-prompts/blob/trunk/data/brainstorm-specification.md https://github.com/jamesponddotco/llm-prompts/blob/trunk/dat... [3]: https://github.com/jamesponddotco/llm-prompts/blob/trunk/data/brainstorm-critique.md https://github.com/jamesponddotco/llm-prompts/blob/trunk/dat...
- miroljub 1y ago> That said, it was amazing to just see it go through the requirements and implement modules full of organised documented code that I didn’t have to write Small side remark, but what is the value added of the AI generated documentation for the AI generated code. It's just a burden that increases context size whenever AI needs to re-analyse or change the existing code. It's not like any human is ever going to read the code docs, when he can just ask AI what it is about.
- nisegami 1y agoIt's entirely possible that the parameters that get activated by comments in code are highly correlated with the parameters involved in producing good code.
- infecto 1y agoDoc strings within the code could be helpful for both humans and AI. Sometimes spoken word intent is easier to digest then code and help identify side effects for both human and AI.
- felixgallo 1y agofrequently your session/context may drop (e.g. claude crashes, or your internet dies, or your computer restarts, etc.). Claude does best when it can recover the context and understand the current situation from clear documentation, rather than trying to reverse engineer intent and structure from an existing code base. Also, the human frequently does read the code docs as there may be places where Claude gets stuck or doesn't do what you want, but a human can reason their way into success and unstick the obstacle.
- spyckie2 1y agoCan’t you send the same spec through cursor? Am I missing something there?
- aosaigh 1y agoYes certainly. I’m sure Cursor would do a good job. That said, I think that the differing UIs of Cursor (in the IDE) and Claude (in the CLI) fundamentally change how you approach problems with them. Cursor is “too available”. It’s right there and you can be lazy and just ask it anything. Claude nudges you to think more deeply and construct longer prompts before engaging with it. That my experience anyway
- danielbln 1y agoFun fact: there is a Cursor CLI now
- camel_gopher 1y agoMany mid and senior developers cannot write specs. I agree with the intent of your statement.
- dewey 1y agoAfter someone mentioned that recently I've started to write really detailed specs with the help of ChatGPT Deep Research and editing it myself. Then getting this exported as a Markdown document and passing it to Cursor really worked very well. It puts you in a different mind space to sit down and think about it instead of iterating too much and in the end feeling productive while actually not achieving much and going mostly in circles.
- sillyfluke 1y agoThe test and review cycle is what determines time saved in my view. Since you were satisfied overall I take it that cycle was not too cumbersome? The parent wrote: >I imagine this saved me probably 6-10 hours. I’m now reviewing and am going to test etc. Guessing the time saved prior to reviewing and testing seems premature fron my end.
- The_Fox 1y agoI too just yesterday had my first positive experience with Claude writing code in my project. I used plan mode for the first time and gave it the "think harder" shove. It was a straightforward improvement but not trivial. The spec wasn't even very detailed- I mentioned a couple specific classes and the behaviour to change, and it wrote the code I would have expected to write, with even a bit more safety checking than I would have done.
- mfalcon 1y agoThat's the way I'd used it, I've built a document with all the requirements and then gave it to CC. But it was not a final document, I had to go back and make some changes after experimenting with the code CC built.
- noiv 1y agoThis is the way.
- andrewgleave 1y agoYeah. Read “Programming as Theory Building” by Naur [1] to understand why you need to still need to develop a theory of the problem and how to model it yourself lest the LLM concoct (an incorrect) one for you. [1] https://gwern.net/doc/cs/algorithm/1985-naur.pdf https://gwern.net/doc/cs/algorithm/1985-naur.pdf
- malshe 1y agoThanks for sharing this article.
- UncleOxidant 1y agoI don't know how many times now that I've seen these things claim to have run the code and show me the hallucinated output and then go on to develop an incorrect theory based on that hallucinated output.
- antonvs 1y agoI've never seen the CLI coding tools do anything like that. They're designed to integrate with the tools. If you're just using a chat interface then yes, you're likely to get some inconsistent behavior.
- UncleOxidant 1y agoThis was Gemini CLI in kilocode. Does it often. Sometimes it even imagines that it's done a build when it hasn't - imagines build errors and then sets out to fix them. I have it set so that it asks permission prior to running commandline tools so I know it hasn't actually run make.
- antonvs 1y agoI use Gemini CLI daily (work is a Google shop), directly (no kilocode). I've never seen anything like that. I wonder if it could be something to do with the kilocode integration. But, I do more commonly run with permission required for many operations, because I find it works much better if I help it every now and then. It can get stuck on some pretty simple stuff.
- wiremine 1y ago> As mentioned in the article, the big trick is having clear specs I've been building a programming language using Claude, and this is my findings, too. Which, after discovering this, makes sense. There are a LOT of small decisions that go into programming. Without detailed guidance, LLMs will end up making educated guesses for a lot of these decision, many of which will be incorrect. This creates a compounding effect where the net effect is a wrong solution.
- fooster 1y agoI get excellent results and don’t do anything like that. Basically I ask Claude to write code as I do. A small step at a time. I literally prompt it to do the next step I’d do and so on and so forth. I accept all changes immediate and then commit after every change and then review the diff. If Claude did some badness then I ask it to fix that. I typically also give references to existing code that I want it to model or functions to use. This gives me excellent results with far less typing and time.
- kookamamie 1y agoExactly this. In my view people over-think the use of Claude in many cases.
- bamboozled 1y agoBecause it's marketed as AI and it takes a while to figure out that it's really quite limited. In my opinion there's not a lot of intelligence going on, It's great at translating a requirement and giving you an approximation of what you asked for, but there isn't really any "thinking" going on. I think when they advertise "thinking" it just does a few more iterations of giving you the closest "number in your head from the clues you've given it (requirements). I saw someone once say that LLMs are a kind of "word calculator" and I feel that's quite a good description.
- v5v3 1y agoTo be fair, if you turn on thinking mode on Llms and see the output their is some thinking/reasoning. A simple example: Prompt:Make it yellow Think: the user wants something yellow but hasn't said what it is. Previously the user talked about creating a Button, so it must be the button but I should clarify by asking Response: is it the button that you want yellow?
- timacles 1y agothis part of LLMs is the pre-programmed human logic. The LLMs arent actually thinking, they're just going through a defined IF THEN loop based on whatever weights, if there is some ambiguity in a prompt the LLM is just programmed to prompt for more info. Its not actually thinking it needs to ask anything, its just coming back with low precision probability. All of the recent improvements in the LLM's "thinking" have just been layers of programming on top of its statistical models. Which is why its becoming clear LLMs are really not advancing that much.
- cortesoft 1y ago> It makes it clear to me that mid and senior developers aren’t going anywhere. I kinda feel like this is a self-placating statement that is not going to stay true for that long. We are so early in the process of developing AI good enough to do any of these things. Yes, right now you need senior level design skills and programming knowledge, but that doesn't mean that will stay true.
- simion314 1y ago>I kinda feel like this is a self-placating statement that is not going to stay true for that long. We are so early in the process of developing AI good enough to do any of these things. Yes, right now you need senior level design skills and programming knowledge, but that doesn't mean that will stay true. So you really think that in a few years some guy with no coding experience will ask the AI "Make me a GTA 6 clone that happens in Europe" and the AI will make actually make it, the code will just work and the performance will be excellent ? The LLMs can't do that, they are attracted to solutions they seen in their training, this means sometimes they over complicate things, they do not see clever solutions, or apply theory and sometimes they are just stupid and hallucinate variable names and functions , like say 50% of the time it would use speed and 50% of the time it would use velocity and hte code will fail because undefined stuff. I am not afraid of LLMs taking my job, I am afraid of bullshit marketing that convinces the CEO/management that if they buy me Claude then I must work 10x faster.
- jezzamon 1y agoThe GTA example is not a good one because the vast majority of the work in making a videogame is not coding...
- ajmurmann 1y agoAnd, somewhat besides the point, generative AI is getting better at a lot of those things as well. Maybe I want to believe this will happen because it's probably the only way to get a sequel to Sleeping Dogs.
- 1y ago
- kookamamie 1y agoI think it can already replace mid-level engineers, based on my experience. Also, you really don't need meticulously crafted specs for this - I've completed multiple projects with Claude with loose specs, iterating in case the direction is not looking good. You can always esc-out in case you see it doing something you didn't wish for.
- chrz 1y agoWas it frontent or/and did you deploy them to prod to be used by 5 million daily users or just had fun at home?
- gronglo 1y agoYou could have saved yourself another 2 hours by getting Claude 4 Opus to write out the specs for you first. Why did you need to write them at all?
- mnky9800n 1y agoI write out a document that explains what I want. Then I write stubs for the functions and classes or whatever. Every stub I write a docstring for what it’s supposed to do. Then I have Claude write unit tests for each stub one at a time. Then I have it write the functions one at a time. At some point I should just start writing the codes itself again. Haha.
- delichon 1y agoAsking the agent to perform a code review on its own work is surprisingly fruitful. I do this routinely with its suggestions, usually before I apply them. It is surprising how often Claude immediately dumps on its own last output, talking both of us out if it, and usually with good reasons. I'd like to automate this double-take.
- doctorhandshake 1y agoI found that for a period of time Claude was almost excessively negative when reviewing its own work. It was only after some contemplation that I realized that it was the phrasing of my code review slash command that framed the review with a negative bent, essentially prompting Claude to dump on its own stuff. The phrasing of that prompt has been a focus of a lot of effort on my side since.
- deleted 1y ago[deleted]
- rcfox 1y agoSeems like a good use case for a subagent. https://docs.anthropic.com/en/docs/claude-code/sub-agents https://docs.anthropic.com/en/docs/claude-code/sub-agents
- keizo 1y agoThis. Lately for some harder problems, I'll open two sessions. One writes a draft spec to a file. Then in the 2nd, i ask it to analyze, critique, etc. Often feed that response back to the first. A few ping pongs later, get a pretty polished plan. Open a new session to execute.
- bgirard 1y agoI'm playing with Claude Code to build an ASCII factorio-like. I first had it write code without much code supervision. It quickly added most of the core features you'd expect (save/load, options, debug, building, map generation, building, belts, crafting, smart belt placing, QoL). Then I started fixing minor bugs and each time it would break something eg. tweaking movement broke belts. So I prompted it to add Playwright automation. Then it wasn't able to write good quality tests and have them all pass, the test were full of sleep calls, etc... So I looked at the code more closely and it was using the React frontend and useEffect instead of a proper game engine. It's also not great at following hook rules and understanding their timing in advance scenarios. So now I'm prompting it to use a proper tick based game engine and rebuilding the game up, doing code reviews. It's going 'slower' now, but it's going much better now. My goal is to make a Show HN post when I have a good demo.
- FeepingCreature 1y agoYep, human contribution is extremely valuable especially very early in before the AI has a skeleton it can work off of. You have to review those first few big refactors like a hawk. After that you can relax a bit.
- stuartaxelowen 1y agoIt sounds like you implicitly delegated many important design decisions to claude? In my experience it helps to first discuss architecture and core components of the problem with Claude, then either tell it what to do for the high leverage decorations, or provide it with the relevant motivating context to allow it to make the right decisions itself.
- qn9n 1y agoI'd probably play that, any information on the game yet?
- berlinismycity 1y agoIncluding Claude Code into the normal subscription was a genius move by Anthrophic. It's so much better than copy and pasting code from chat windows, but that's hard to tell if I had to pay via an API for that service
- iambateman 1y agoif you use Laravel, I wrote github.com/iambateman/speedrun to help get good results. You type /feature [[description of feature]] and it takes it from there. The system helps you build out a spec first, then uses a few subagents which are tuned for placing files, reviewing for best practice, etc. I've been using it for about a week and about 70% of my Claude Code usage runs through /feature right now. The nice thing is you can give it a _lot_ of requests and let it run for 10-15 minutes without interruption. Plus, it makes a set of planning documents before it implements, so you can see exactly what it thought it was changing.
- wriggler 1y agoUsing this now - works brilliantly! What makes it Laravel specific? Would also love to use this with a React Native app I'm struggling to build.
- iambateman 1y agoOh cool! Let me know if there’s any changes that would be helpful. Some of the language is geared toward a Laravel project and it’s a composer package but the ideas are pretty general. I bet it could be generalized!
- wriggler 1y agoThis wrote a complete Laravel feature for me from start to finish almost perfectly, better than any other approach I have tried (e.g. TaskMaster). Amazing job. I need to take the time to see what the Laravel side of this is so perhaps I can adapt for my RN app too.
- tobyhinloopen 1y agoThat's a great, short prompt. I'm going to steal it.
- OJFord 1y agoDo you mean the claude.md?
- tobyhinloopen 1y agoYes
- softwaredoug 1y agoI get a lot of success when I’ve laid out the patterns and first implementation of an idea in my code. Then tell Claude to repeat the pattern to implement X feature. And do it very step by step in what would equate to a tiny PR that gradually roles out the functionality. Too big and I find lots of ugly surprises and bugs and reorganizations that don’t make sense.
- time0ut 1y agoI've been working with Claude Code daily for a month or so. It is quite excellent and better than the other agents I have used (Cursor, Q). This article has some good tips that echo some of the things I have learned. Some additional thoughts: - I like to start with an ideation session with Claude in the web console. I explain the goals of the project, work through high level domain modeling, and break the project down into milestones with a target releasable goal in mind. For a small project, this might be a couple hours of back and forth. The output of this is the first version of CLAUDE.md. - Then I start the project with Claude Code, have it read my global CLAUDE.md and the project CLAUDE.md and start going. Each session begins this way. - I have Claude Code update the project CLAUDE.md as it goes. I have it mark its progress through the plan as it goes. Usually, at the end of the session, I will have it rewrite a special section that contains its summary of the project, how it works, and how to navigate the code. I treat this like Claude's long term memory basically. I have found it helps a lot. - Even with good guidelines, Claude seems to have a tendency to get ahead of itself. I like to keep it focused and build little increments as I would myself if it is something I care about. If its just some one off or prototype, I let it go crazy and churn whatever works.
- torben-friis 1y agoDoes the $20 subscription hold a similar bang for your buck as cursor? I’m curious about the tool but I wonder if it requires more significant investment to be a daily driver.
- time0ut 1y agoUsing claude code feels like pairing with another programmer. Cursor feels like a polished extension of the IDE. They are both good tools and easily worth $20/mo. I think Anthropic has a 7 day free trial going on. Worth trying it out.
- polishdude20 1y agoDo you use Claude code on the side and have you ide open to visualize the files and project structure and stuff? I've been using only cursor for now and I really like having it in the ide. Being able to see the diffs and accept/ reject them and navigate my codebase is really nice.
- nlh 1y agoOne fantastic tip I discovered (sorry I've forgotten who wrote it but probably a fellow HNer): If you're using an AI for the "architecture" / spec phase, play a few of the models off each other. I will start with a conversation in Cursor (with appropriate context) and ask Gemini 2.5 Pro to ask clarifying questions and then propose a solution, and once I've got something, switch the model to O3 (or your other preferred thinking model of choice - GPT-5 now?). Add the line "please review the previous conversation and critique the design, ask clarifying questions, and proposal alternatives if you think this is the wrong direction." Do that a few times back and forth and with your own brain input, you should have a pretty robust conversation log and outline of a good solution. Export that whole conversation into an .md doc, and use THAT in context with Claude Code to actually dive in and start writing code. You'll still need to review everything and there will still be errors and bad decisions, but overall this has worked surprisingly well and efficiently for me so far.
- enobrev 1y agoI do something very similar for the planning phase, as well as for the code-review after a task is complete. I like to switch between opus in claude code and gemini cli, so I can work from the same files rather than copying and pasting things. One tip I picked up from a video recently to avoid sycophancy was to take the resulting spec and instead of telling the reviewing LLM "I wrote this spec", tell it "an engineer on my team wrote this spec". When it doesn't think it's insulting you, it tends to be a bit more critical.
- jihadjihad 1y ago"The summer intern wrote this spec."
- abroun_beholder 1y agoNice post, I'll try a few of those in my own file. From my side, one thing in the troubleshooting section that I think is missing is telling the agent that it should collect some proof of what it thinks is wrong before trying to proceed with a fix. I have burnt through a large number of tokens in the past in situations where Claude took a look at the dodgy code (that it had written) and went 'aha! I know what the problem is here' before proceeding to make things worse. Telling Claude to add in debug print statements can be remarkably effective but I'm sure it can also come up with other approaches.
- enobrev 1y agoNothing quite like "I see what the problem is", and then seeing Claude start reading a bunch of files and strategizing the re-architecture of a feature just resolve its own 3-line blunder. If you happen catch it and you're quick to "esc" and just tell it to find a simpler solution, it's surprisingly great at reconsidering, resolving the issue simply, and picking up where it left off before the blunder.
- nightshift1 1y agoyes, that is why even in full automated mode, it is better to pay attention. Sometimes it even tries to git checkout the file when it is stuck with some i indentation issues.
- toxik 1y agoI just never run it in full auto, I look at its proposed changes and more often than not ask it to do it another way. Sometimes I'm just so disappointed that I just go code it up myself.
- libraryofbabel 1y agoI use Claude Code regularly and have been responsible for introducing colleagues to it. The consensus here seems to be that it’s the best coding agent out there. But since it’s the only coding agent I’ve used, when colleagues ask why it’s better than Cursor, Cline, GitHub Copilot, Gemini CLI, etc., I sometimes struggle to articulate reasons. Claude Code power users, what would you say makes it superior to other agents?
- aosaigh 1y agoI mentioned this is another comment, but for me one of the big positives is nothing to do with the model, it’s the UI of how it presents itself. I hated at first that it wasn’t like Cursor, sitting in the IDE. Then I realised I was using Cursor completely differently, using it often for small tasks where it’s only moderately helpful (refactoring, adding small functions, autocompleting) With Claude I have to stop, think and plan before engaging with it, meaning it delivers much more impactful changes. Put another way, it demands more from me meaning I treat it with more respect and get more out of it
- libraryofbabel 1y agoThis is a good point, the CLI kind of forces you to engage with the coding process through the eyes of the agent, rather than just treating it as “advanced autocomplete” in the IDE. However, there are a lot of Claude Code clones out there now that are basically the same (Gemini CLI, Codex, now Cursor CLI etc.). Claude still seems to lead the pack, I think? Perhaps it’s some combination of better coding performance due to the underlying LLM (usually Sonnet 4) being fine-tuned on the agent tool calls, plus Claude is just a little more mature in terms of configuration options etc.?
- enobrev 1y agoI haven't tried codex or cursor-cli yet, but I have tried to give gemini a few tasks and in my experience, compared to claude code, it's not great. Gemini's been very quick to dive in and start changing things, even when I don't want it to. But those changes almost always fall short of what I'm after. They don't run or they leave failing tests, and when I ask it to fix the tests or the underlying issue, it churns without success. Claude is significantly slower and definitely not right all the time, but it seems to do a better job of stepping through a problem and resolving it well enough, while also improving results when I interject.
- monkeydust 1y agoBeen playing around with Claude Code for a home project over the last week. I started with an idea but no spec. I got it to a happy place I can deploy yesterday. Spent around $75 on tokens. It was starting to feel expensive towards the end. I did wonder if I had started with a clearer specification could I have got there quicker and for less money. The thing is though, looking back at the conversations I had with it, the back and forth (vibe coding I guess) helped me refine what I was actually after so in two minds if a proper tight specification upfront would have been the best thing.
- electroly 1y agoSwitch from Opus to Sonnet. When people report high spending in Claude Code it's always because they're using Opus. Opus is for people on unlimited plans who aren't paying API rates.
- JulesRosser 1y agoYou could also define a subagent that uses Opus, for special cases such as planning
- maherbeg 1y agoI highly recommend having fairly succinct project level CLAUDE.md files, and defer more things into sub-folders. Use the top level as a map. Then during your planning of a feature, it can reach into each folder as it sees fit to find useful context to build out your phased implementation plan. I have it use thinking mode to figure out the right set of context. At the end of each phase, I ask claude to update my implementation plan with new context for a new instance of claude to pick it up. This way it propagates context forward, and then I can clear the context window to start fresh on the next phase.
- andrew_lastmile 1y agoCreating temporary artifacts of implementation plans seem to be very useful for breaking down complex tasks and even more so, for me to double check the logic and plans.
- naiv 1y agoThe update to Opus 4.1 really improved the quality. I personally really like to use Claude Code together with Zen MCP https://github.com/BeehiveInnovations/zen-mcp-server https://github.com/BeehiveInnovations/zen-mcp-server to analyse existing and review fresh code with additional eyes from Gpt5 and Gemini.
- JulesRosser 1y agoFor anyone like me who was struggling to manage work and personal Claude subscriptions, you can just use an alias like this: alias claude-personal="CLAUDE_CONFIG_DIR=~/.claude-personal claude" https://julesrosser.com/blog/Multiple-Claude-accounts.html https://julesrosser.com/blog/Multiple-Claude-accounts.html
- michaelteter 1y agoThere’s an interesting transition point that we must keep in mind when using these tools. For research, investigation, and proof of concept, it is good to be flexible and a bit imprecise. But once a path seems clear, writing a single detailed document (even with “help”) is valuable before working with a separate AI assistant. The challenge is recognizing that transition point. It’s very easy to just meander from zero to sort-of-product without making this separation.
- renewiltord 1y agoClaude code is fantastic. For me, the insight was that you have to give it the ability to close the loop. If it writes code it will try to reason about the code. "The button has the right CSS and so should be visible". But everything is better if it can close the loop. So I instead instruct it to always use the puppeteer tool to launch the app and use some test credentials and see if the functionality works. That's for a web app but you can see how you can do this for other things. Either unit tests, integration tests, or the appropriate MCP. It needs to see what it's done and observe the resulting world. Not just attempt to reason to it. Claude also leans towards what it's good at. Repetition costs it nothing so it doesn't mind implementing the same 5 times. One thing it did when I started is implement a sidebar on every page rather than using a component. So you need to provide some pressure against that with your prompts or at least force it to refactor at the end.
- polishdude20 1y agoWhen using puppeteer, how does it see that things work like if a div was properly centered? For example.
- atentaten 1y agoBy taking a screenshot in puppeteer
- gabrielpoca118 1y agoI don’t write any structured specs and I still get a lot of value out of it. I basically use it in incremental steps where I’m telling it what I want at a much lower level. Am always watching what it is doing and stopping it to correct the action. At least for me this approach has worked much better than asking it for bigger things.
- fooster 1y agoFully agree. Small pieces one step at a time. If you ask it to do something big be prepared for disappointment.
- kleyd 1y agoDoes anyone else find themselves starting projects that wouldn't otherwise be worth the time investment, while avoiding Claude Code for the tasks that actually have high priority? Who has had success using Claude Code on features in older, bigger, messier projects?
- allenu 1y agoAbsolutely. I only just started using Claude Code on Sunday and I tested it by taking a small project that I was toying with and extending it with lots of features that I had thought about adding but didn't have the time. Then, I explored a product feature in an existing app of mine that I also had put off because I didn't feel it was worth spending several days exploring the idea. It's something that would've required me to look up tutorials and APIs on how to do some basic things and then write some golang code which I hadn't done in a while. With Claude Code, I was able to get a prototype of the idea from a client app and a golang service working within an hour! Today I started prototyping yet another app idea I came up with yesterday. I started off doing the core of the prototype in a couple of hours by hand and then figured I'd pull Claude in to add features on top of it. I ended up spending several hours building this idea since I was making so much fantastic progress. It was genuinely addictive. A few days ago I used it to help me explore how I should refactor a messy architecture I ended up with. I didn't initially consider it would even be useful at all but I was wowed by how it was able to understand the design I came up with and it gave me several starting points for a refactor. I ended up doing the refactor myself just because I really wanted to be sure I understood how it worked in case something went wrong. I suspect in a few weeks, I'll get used to just pairing with Claude on something like that.
- kleyd 1y agoThat matches exactly my experience. Now there are a couple of prototypes to be finished, which still takes time. And higher priority tasks get delayed instead of sped up.
- tinodb 1y agoYes and yes. I find that you can really let it rip (vibe) on something greenfield, but you’ll have to take a more measured approach once something gets off the ground. I use it daily on our 10yo production repo with success.
- 1zael 1y agoI’ve found my workflow is much faster now after implementing a dedicated Claude agent for test-driven development. This TDD agent reviews code and generates comprehensive tests for my primary agent before commits enter the CI/CD pipeline. I have multiple terminals open running various Claude agents.
- catigula 1y agoThe magic of these agents is how quickly and adaptably they enable you to plagiarize work they've seen many times before.
- kookamamie 1y agoI think the guidelines look over-engineered. I'm getting good results with a bare minimum set of instructions, such as "use spaces instead of tabs. This is in C++/Python and computer vision.
- jen729w 1y ago> Use for AI training prohibited. Yep, that’ll do it.
- Anamon 1y agoIt seems silly, but I have something similar on my sites now. Are there any better options? My content is under a license, the terms of which already explicilty prohibits training LLMs on them. I'm not under the delusion that this alone is going to stop any of the criminal GenAI companies from doing it anyway. Yet I still put an additional sentence like this just because, as someone with no particular legal experience, it makes me feel like I'd had a better argument if I ever decided to sue someone about it for kicks. I think it should make it more difficult for any GenAI company to claim that they couldn't have known what the terms were when they accessed the content.
- Nizoss 1y agoI've found that keeping my CLAUDE.md minimal (under 100 lines) yields the best results. I focus mainly on these areas: - Essential project context and purpose - A minimal project structure to help locate types, interfaces, and helpers - Common commands to avoid parsing package.json repeatedly. Regarding the specific practices mentioned: Implementation Flow: I've noticed Claude Code often tries to write all tests at once, then implements everything when import fails (not true TDD). To address this, I created a TDD-Guard hook that enforces one test at a time, test fail for the right reason, only implement the minimal code to make the test pass. Code quality: I've had good success automating these with husky, lint-staged, and commitlint. This gives deterministic results and frees up the context for more important information. When Stuck: I agree that developer intervention is often the best path. I'm just afraid the specific guidance here might be too generic. For anyone interested in this automated approach: https://github.com/nizos/tdd-guard https://github.com/nizos/tdd-guard (includes example configuration) https://github.com/typicode/husky https://github.com/typicode/husky https://github.com/conventional-changelog/commitlint https://github.com/conventional-changelog/commitlint https://github.com/lint-staged/lint-staged https://github.com/lint-staged/lint-staged
- vemv 1y agoI'm not gonna lie, that ~/.claude/CLAUDE.md is not going to work. There are a lot of subjective, ambigous instructions that really won't affect what Claude writes. Remember it's not a human, it's not performing careful reasoning over each individual LOC. Context rot is a thing (https://news.ycombinator.com/item?id=44564248 https://news.ycombinator.com/item?id=44564248 ). As of today, you cannot squeeze a true rule system out of a single file given as context. Many of us have done this mistake at some point – believing that you can specify arbitrarily many rules and that they'll be honored. If you really care about every such rule, you'd have to create sub-agents, one per rule, and make the agents a required part of a deterministic (non-AI orchestrated) pipeline. Then costs would explode of course.
- Xmd5a 1y ago>Then costs would explode of course. You can slash the costs by using cheap LLMs once your workflow is stable (but pricey to run!). Fine-tuning, prompt optimization, special distillation techniques, this is a well covered area.
- vemv 1y agoYes, I've had such a system in the back of my mind for a few months, mixing and matching cheaper/local and more expensive LLMs. Sometimes I've wanted to implement it but I sense that someone else will sooner or later, putting in more resources than I could currently. In the meantime I'm happy with vanilla CC usage.
- yahoozoo 1y agoWhat kind of things would be good to put in the CLAUDE.md?
- vemv 1y agoIn my experience as an early adopter of both Cursor and CC, nothing. I don't have a CLAUDE.md. My expectations have shifted from "magic black box" to "fancy autocomplete". i.e. CC is for me an autocomplete for specific intents, in small steps, prompted in specific terms. I do the thinking. I do put effort in crafting good context though.
- anonzzzies 1y ago> A key is writing a clear spec ahead of time, which provides context to the agent as it works in the codebase. Yeah, people say that. I even was sitting next to some 'expert' (not him saying; others saying) who told me this and we did a CC session with Opus 4 & Sonnet 4. He had this well written, clear spec. It really didn't do even an inch better than my adhoc shooting in features as they came to me in /clear contexts without CLAUDE.md. His workflow kept forgetting vital things (even though there are in the context doc), making up things that are NOT in the context doc and sometimes forbidden etc. While I just typed stuff like; now add a crud page for invoices, first study the codebase and got far better results. It is anecdotal obviously but I now managed to write 100+ projects with Claude and, outside hooks to prevent it from overstepping, I found no flow working better than another; people keep claiming it does, but when asked to 'show me', it turns out they are spending countless hours fixing completely wrong stuff EVEN when told explicitly NOT to do things like that in CLAUDE.md.
- skydhash 1y agoMy most valuable specs, when coding sans agent, is either a UI sketch, some transition diagrams for logic flows, or a few bullet points of business rules. Then coding becomes just a Zen activity. I can get most of it done in one go vibing to my favorite tunes. Then comes the tweaking phase where everything left unspecified get specified. I still don't feel the need for an agent. The writings of the loose specs is either done offline on paper, through rounds of discussions with stakeholders, and/or with a lot of reading. When I'm hit with an error while coding, that's usually a signal that I don't know something and should probably stop to learn about it. When it comes to tweaking, fast feedback is king. I know where the knobs are and checking the adjustment should be quick. So it's mostly tests, linting, or live editing environment.
- Anamon 1y agoThanks for sharing your experiences. That's about what I'd have expected. I always found it very weird to see people declaring instructions to LLMs as if they were talking to a person. "Do this", "never do that", as if there was some kind of interpreter behind that built a ruleset to follow. There isn't. It's all just context. Theory would suggest that in the rare cases that these instructions actually achieve the desired effect, they do so more coincidentally than anything else. Easy to see how it could work for something like "Write tests according to pattern X" because there are going to be examples of that around in the training data; highly unlikely that instructions like "don't repeat yourself" or "study the codebase first" would do anything reasonably effective.
- StarterPro 1y agoAt a certain point though, you lose any creative input. If you review the code and it needs a change, do you run it back through Claude with the requested changes or do you make the changes yourself?
- CuriouslyC 1y agoDepends on how busy you are doing other things and how hard it is to manually do the change vs how long it takes to describe to the agent. I'll queue up instructions for the agent to make 4 or 5 small modifications to files even if it takes longer for the agent to do it than me, as long as it's quick to fire off the instruction and context switch back to more important work.
- doppelgunner 1y agoThat is a good one. Another way to achieve good results is to find similar code or a similar user interface. Providing him with references helps make my code better and keeps it aligned with my goals and expectations.
- sickcodebruh 1y agoMy approach to Claude Code is evolving. I’m still unable to get Claude Code to contribute meaningful features directly my large web app at work. Specs will sometimes help it get close but it eventually veers off course and enters a feedback loop of bad decisions. Some of this might be attempting tasks it’s not suited well for, or perhaps my specs just aren’t precise enough, but I had enough failed attempts that I stopped trying to do anything that I’d describe as “challenging” or need too much domain knowledge. A friend recommended I try it for less brainy backlog tasks, especially the kinds of things I can run casually in the background and not feel too invested in. This keeps failure from being too frustrating because there’s minimal effort and success becomes a pleasant surprise. My first attempt with this was writing Playwright tests of the large web app in a new workspace within the monorepo. It was a huge success. I explained some user experiences the way I’d walk a person through them, pointed it at a path on my dev server, and told it the process I wanted it to follow: use Playwright MCP to load the page and discover the specifics of using the feature, document execution steps, write playwright tests based on what it learned from discovery, run the tests and debug errors with Playwright MCP. I instructed it to seek out the UI code within the project and add data-testid selectors as needed. I had it write this process to a master task.md, then make more task markdown files for each feature to be tested. It was very effective. Some of the features were somewhat complex, requiring two users with two browsers interacting in non-trivial ways. Not 100% accurate and more complex features needed more contextual and code corrections, but overall it probably saved days of frustrating work.
- breppp 1y agoCuriously all the examples of the projects at the bottom of the page is hyper specialized software for a single use case. I suspect most open sources projects will go that way, fits the needs of a single human being, and 'that' kind of software (utilities) will become throw away code generated in a single LLM sitting
- hoppp 1y agoClaude code is good but it often gives me too much result, if I dont tell it to give me just the answer I tried mistral and the code is often buggy Chatgpt is a good middle ground All free tier only
- torginus 1y agoConsidering how much positive feedback this article has garnered, let me be a hater: I checked out the first repo (https://github.com/cdzombak/xrp/tree/main https://github.com/cdzombak/xrp/tree/main), and it's just so full of fluff. Documentation for various things, including coding methodology, all sorts of deployment scripts, it's a quite large repo, even though the code that does the thing is maybe a couple hundred lines without comments. I know, I know all those best practices require you to write all this, but I feel like when a repo is only 10% meat by LoC, something has gone wrong somewhere. Claude always generates code like this, I'd rather have something terse and to the point as a human being, I'd rather not wade through lines upon lines of window dressing, especially for a small project like this.