r/ClaudeCode • u/Muted-Floor-7274 • 3h ago
Help/Question How should one properly use Claude Code?
Two weeks ago, I started trying to build a small Android application for myself and some friends. It turned out as expected.
However, seeing what others are able to achieve with it—and how it seems to work autonomously—I realize I’ve been using it quite poorly; I’ve had to repeat many tasks just to get the desired outcome.
My biggest issue is that it doesn't automatically run tests, even when I explicitly instruct it to do so every time. Also, if it fixes an issue in one place, it often fails to apply the same fix elsewhere—I have to specifically point it out. Yet, I’m amazed by the impressive results others manage to get from it.
I’ve been using one main chat thread where I list my requirements in bullet points, and the tool spins off smaller, separate chats for specific tasks.
- What is the best way to set up a project and maintain it?
- When a chat thread gets long, does it close automatically, and how do you continue the work?
- How should I phrase my requests to ensure the best, most automated, and accurate results? Since I’m not a programmer, I can’t specify exactly what needs to be changed and where. I would expect it to understand the context—for instance, if I want to test the app for bugs or optimization, I’d assume it already knows the standard procedures.
- If I provide a more detailed specification—researching the precise terminology and listing everything in bullet points—the prompt ends up becoming extremely long.
In short: how do the pros work with this? What should I do, and what concepts do I need to grasp to use it as effectively as possible?
Thanks for the information.
•
u/AutoModerator 3h ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
5
u/Pixelplanet5 3h ago edited 3h ago
the best way i found is having one agent with all the context and either use ultra code mode so it can spawn its own agents to build, review, judge and fix or to do that remotely using docker sandboxes.
a proper test can never be done by the same agent that build what ever is being tested, it will never find the real problems and often just assume things work without actually checking them.
A new agent without any context doesnt know anything about the code so it has to check it properly.
Im doing some very long running sessions that spend a lot of time waiting on something to be build and because i dont wanna keep my PC on over night with an Agent doing what ever he wants i build myself a remote agent pool with docker sandboxes.
My main agent on my PC knows the todos and all the details required and he writes a little script that is executed in a runner on my server which then queues up docker sandboxes which dont know anything about each other beside getting a briefing prompt and being told which data to ingest and where to push results.
That was i have kind of a remote ultracode instance thats still running on my own hardware and has the full compute power of my server available.
Heres whats currently running, i also integrated the deepseek API because im close to my weekly limit and deepseek is cheap.
Its now building everything its instructed to build, then Claude sonnet reviews the code while another deepseek instance takes measurements (its a 3d scanning application so its running tests to confirm known good pointclouds still come out with the correct sizing)
Any review that finds something categorizes the findings into high, medium, low and passes the findings to the fix agent which is a new session running in the same sandbox as the build to save on ~15 min warmup time that would otherwise be required to load the data for the fix.
If there was any high impact problem in the review it will go into a 2nd review after which high impact findings will go into fix2 after which there will be another review.
Ever sandbox pushes into its own branch and the next morning my main agent reviews the branches and results and merges everything that is good to main.
This saves me a TON of time and tokens as every session starts with an empty context and only knows what it needs to know.
It also keeps my PC free to play games or run more stuff locally while im here.
Below is just a sceenshot of the minimal webinterface i build for myself so i can see whats running and when it will finish.
5
u/norviking 3h ago
Q: What is the best way to set up a project and maintain it?
- Use github, ask claude to set it up for you and help you.
- Make a good architecture plan before writing too much code. Stack, storage, modules, auth etc. etc.
- I made and use this (completely free, MIT) : https://github.com/vegardjorg/ravenseat . It is probably overkill for your needs, but it can help you set up deterministic gates, tests, lint, ci. etc. But genuinely the other stuff too, project state fully outside claude, merging logic, engineering dicipline, planning, parallel work, structured work process, it is what I made for myself to work efficiently.
Q: When a chat thread gets long, does it close automatically, and how do you continue the work?
I auto compact at 300K. Token spend above that is crazy. Its context size x turns, so it really wastes tokens if you leave it at 1000K which is the default. Ravenseat above will handle this for you in setup, and the logic and structure needed behind it. It will allow you to only ever chat in one single chat, without opening extra windows. It will run subagents with the same context limit. The regular workaround is 1. to open many windows for fresh context, this becomes messy fast, and saves no tokens compared to compacting around 300K (17 turns upp to speed, vs 6 in compact), or 2. manually compacting, but without project state outside claude, you have no control over what is lost. (people will tell you that they use compact instructions, but it is lossy no matter what they think).
From my measurements:
Q: How should I phrase my requests to ensure the best, most automated, and accurate results?
You cant really. Before learning more. But you will learn along the way. Also do active planning sessions. What would I need for x feature? What would be the best way of building it. What are the pros and cons with the proposed solutions? What did we maybe forget about? And so on.
Q: If I provide a more detailed specification—researching the precise terminology and listing everything in bullet points—the prompt ends up becoming extremely long.
this is not a problem at all. you can over engineer and over plan it of course, but it is often better with some directions. Ask claude to review your idea and research, and recommend a solution.
Q: how do the pros work with this? What should I do, and what concepts do I need to grasp to use it as effectively as possible?
In more ways than you can imagine. Most have their own way. But there are several common problem areas, that you learn how to overcome and make your own solutions, like I did with ravenseat.
You nead to grasp some simple security essentials, and architecture essentials, for most small scale projects that will be enough.
Best of luck
2
u/jadhavsaurabh 3h ago
Just keep using it, use md files always
1
u/called9527 3h ago
for the tests thing, put the exact command in CLAUDE.md, something like "after changing code run ./gradlew test, don't say done until it passes". if it still skips it, a Stop hook in settings can run the tests every time it finishes, so you're not relying on it remembering. plan mode (shift+tab) before bigger tasks also helps with the redo loops
1
u/Calm_Boat_8680 3h ago
Sounds like you're using Sonnet for everything. I say this because I can't imagine Opus not using tests aggressively. To stay token-efficient, tell it to "make a settings change: use opus for orchestrator and sonnet for subagents". If you're on the $200.00 plan, turn on Ultracode; I don't think you can use up this subscription working with Sonnet.
Workflow-wise, name every change you want to make. It could be as simple as "overhaul" or as complex as "ui_update_10_5". Write a prompt to develop a plan for that change. You can even include something like, "Create a question framework of 20 questions to clarify the plan and deliver them to me one by one." Then have it execute that plan.
1
u/JonesJoneserson 3h ago
Questions:
-What plan are you on? Are credits tight?
-Are you an engineer? (Sounds like you are, just confirming, and of course fine if you're not)
-How big is the Android app and did you initially build it by hand, or did you start out with Claude as the primary builder and involved in planning processes?
-----
Anecdotally it seems like the internal memory local to the machine it's being run on can make a big difference, so to some degree it'll get better as you work with it.
You can add some instructions, either within prompts themselves or instructions markdown files (CLAUDE.md / AGENTS.md) to be biased towards evaluating changes across apps in entirety and to avoid examining things myopically. Even today I *think* if you were to install Claude fresh on a machine, and give it no other instructions than "build x", it might still start from the point of, "this is a prototype, I won't worry about making this production-grade."
(That said, try to keep instructions minimal, and only include what really seems appropriate.)
The biggest thing you'll want to start getting comfortable is for any non-trivial work / changes aim to have the agent you're chatting with act as an orchestrator and have it oversee a group of other agent instances. While the models are super powerful on their own, the non-deterministic nature behind them means just a few working together can bring _way_ more firepower.
1
u/AIOSAI 🔆 Max 20 3h ago
Ok basic first approaches, unfortunately u will have to try fail try again, learn by doing.
Plan before hand ask questions, dont just let cksude do as it pleases, later when u have more knowledge u will be able to let claude run longer alone.
Ur app. Explain ur end goal the idea. Use artifacts to capture ur ideas form the plan
Discuss framework, what best suite ur applications. Research it, ask why it chose this language and frame work, ask for alternative options and explain. Get claude Sell it to you with evidence backing.
Start with a standard ready framework ( most languages will have this) follow their dics standards.
Design each piece separately, mock up the designs with graphs and plsce holders in artifacts. Don't answer every question while designing, get the rough shape, leave open ended q and for the end final step before building
Once ur satisfied your ready to build.
Look into agent harnesses to help you clsude stay inline. Ponytail plugin is also helpful.
Claude also is good at small 1 to 2 day projects, but without memory. Orginigization, structure, support for claude, life is not easy.
On your tests, have claude study best practices for ur language, and build a rulee doc, even a simple markdown. When it comes to writing test. Have it reference the tests doc.
Looking skills plugins, mcps, agent harnesses. Research with claude to find tge right ones for you.
You won't figure it out tiday, give it time you will get better. What u see other doing us possiable because tge put the time in. Im 2 yrs with claude. I just say hi, and away we go. No re explain, not what where we doing, it more like, here is what I worked on whike u slept, morning brief, suggested next steps. And so on. A fully automated process with multi agents happly working under my control. Consistently performing.
Dont get me wrong, u need claude and it needs u.
1
u/GuidingPrinciples 2h ago
Telling it every time may not be enough by itself, going by what I counted last summer while AI agents worked on an earlier software project of mine. Written rules at the start of a session held about 77 to 87% of the time, and in the middle of a task only 11 to 37%. Where a program enforced a rule, I found 0 real violations in 13,586 commands.
Those are one person's numbers, so yours could easily differ.
1
u/BullBuchanan 2h ago
The answer to your question is quite complex and not something you can learn overnight. It's a craft I've spent 25 years working on and I probably didn't get somewhat fluent until 5-6 years of intense study.
In short, clause can explain all of this to you. Ask if to research best practices for X (planning, building, testing, deployment, etc), and every time you don't understand something, ask it to clarify. Don't trust what it tells you, because it confidently lies and hallucinates. Get sources and check them.
Just because building software is faster now, doesn't mean it's easy. There's a reason big tech still pays people hundreds of thousands to millions of dollar a year to build it.
0
u/zipperdeedoodaa 2h ago
read the docs