4 Techniques + Bonus Tips for Using Claude Code Comfortably

2025年7月14日

This article is a machine translation from Japanese. It may contain translation errors.

I’m Tokunaga, the CEO of PredNext. Since the beginning of this year, I’ve gradually been delegating coding to coding agents, and recently, I’ve had significantly fewer opportunities to write long code myself. The review burden has increased, which is tough, but I can’t go back to the old way of doing things.

While I’ve tried several tools besides Claude Code, I find that Claude Code has a much higher task success rate compared to other tools. It’s interesting that even when using the same Claude backend, there seems to be a difference in success rates between tools. As a result, I’ve been increasingly turning to Claude Code for more difficult tasks. This time, I’ve compiled some lesser-known tips to make Claude Code even more convenient to use.

1. Slightly Speed Up Startup

Although it’s not yet reflected in the official documentation, according to information on X (Twitter), there’s a single-binary version of Claude Code available, which can be installed with the following command:

curl -fsSL http://claude.ai/install.sh | bash

It’s a bit concerning that this isn’t officially documented, but since it’s from the official domain, it’s probably safe.

The benefits of using this are: startup is slightly faster, and it’s installed in ~/.local/bin instead of a mysterious directory (under ~/.claude/local/). Also, it feels a bit like a secret technique, which is exciting.

This single-binary version is built with bun.

2. Avoid Timeouts with Environment Variable SHELL=/bin/bash

If command execution in Claude Code frequently times out, your shell configuration might be the cause. Especially if you’ve customized your zsh prompt, Claude Code may not correctly recognize when commands finish, making timeouts more likely.

In such cases, starting Claude Code with SHELL=/bin/bash claude will allow it to correctly recognize command completion. Conversely, if you’ve customized bash, specifying zsh might work better.

3. Prevent Directory Confusion with CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=1

When a project has a complex directory structure, Claude Code can sometimes lose track of the current working directory. Normally, it automatically adjusts the current directory with commands like cd full_path_to_dir && command, but it can get confused and try to execute invalid commands.

Setting this environment variable ensures that Claude Code always returns to the original directory when executing bash commands, preventing directory confusion. While this issue doesn’t occur frequently, having this setting provides peace of mind.

Combined with tip #2, my startup environment variables look like this:

SHELL=/bin/bash CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=1 claude

4. Branch Conversations with --resume and --continue Options

Claude Code’s work accuracy tends to decline as conversations get longer. When you want to ask questions but worry that doing so might reduce accuracy for the next task, the --resume and --continue options are useful.

These options allow you to branch conversations and ask as many questions as you like. Personally, I often use --continue. Simply open a new terminal and start Claude with claude --continue.

Many people find the UI for --resume confusing. There are tools available to make --resume easier to use, so consider trying them:

Both tools allow you to preview conversation logs, making it easier to find the session you want to resume.

Bonus: Automated Testing Environment is Crucial!

Let me share one simple but important point. The most important thing to master Claude Code is “setting up an automated testing environment.” Many articles mention this, but I feel that many people still underestimate its importance relative to how crucial it is. Honestly, I haven’t been thorough about it myself either.

When Claude Code can verify implementations through tests, it becomes capable of arriving at the correct implementation through trial and error.

For command-line apps or servers, simply asking “Please list what we want to verify with unit tests” and “Please implement the items on that list” will result in more practical tests. For web apps, Claude Code tends to avoid UI testing, so requesting “Set up an E2E testing environment with Playwright and then write tests” will lead to more practical tests.

However, be aware that Claude Code sometimes uses excessive mocks, so review the code and point this out. The trap of having too many mocks and losing sight of what’s being tested is something humans occasionally fall into, but Claude Code does it quite frequently.

Summary

Using Claude Code effectively allows you to develop at a speed previously unimaginable. Make use of environment variables and options to experience an even more comfortable development workflow.

Looking for Work

PredNext is currently accepting a few more project requests. PredNext specializes in AI-related technologies, particularly natural language processing and image processing, with a special focus on model compression and optimization. If you’re interested, please feel free to contact us through our contact form.

Share: