Claude Code Tips Complete Guide - Practical Techniques for Beginners
When you start using Claude Code, it’s easy to treat it as a simple IDE integration. In reality, small techniques compound and can dramatically change development speed and efficiency. The GitHub repo “ykdojo/claude-code-tips” collects 44 tips. From those, this article picks 10 you can apply right now and shows concrete ways to implement them.
1. Learn the slash commands
Claude Code provides commands you can run by putting / at the start of the input. They’re shortcuts that let you access core features quickly.
Key commands
| Command | Purpose | Example |
|---|---|---|
/usage | Show token usage | How much have we used in this conversation? |
/clear | Clear conversation history | Switch to a new topic |
/mcp | Manage MCP (Model Context Protocol) servers | Add external tools like Playwright |
/stats | Show session statistics | Visualize productivity |
Use cases
/usage
→ 「このセッションで12,000トークン使用済み」と表示
As conversations get long, the context fills up. Use /usage to see the current state, and reset the thread with /clear when needed. That makes the handoff point to the next session clear.
Always‑on with a HUD plugin
If typing /usage every time is a hassle, use a HUD plugin to show token usage at all times.
| Plugin | Features | Repository |
|---|---|---|
| Claude HUD | Real‑time status line display. Shows context health, tool activity, and TODO progress | jarrodwatts/claude-hud |
| ccusage | Detailed token usage analysis. Track by day/month/session and estimate cost | ryoppippi/ccusage |
Claude HUD stays resident at the bottom of the terminal. ccusage focuses on analysis and is handy when you want to review usage later.
Tip: Even after
/clear, conversation logs are saved under~/.claude/. Only the Claude Code context is cleared, so you can search later.
2. Manage your context
AI works best when the context is fresh and condensed. Rather than sticking to one long conversation, it’s important to cut threads at the right moments.
When to split conversations
- After finishing a task (creating files, fixing bugs, etc.)
- When switching to a new feature
- When
/usageexceeds 70% - When moving to a different project
How to split
現在の会話: ユーザー認証機能の実装
完了後:
→ 新規会話を開始して「ダッシュボード画面の実装」に移行
→ 必要に応じて前の会話のURLを参照
On long projects you’ll end up managing multiple conversations in parallel. Each conversation has its own URL, so keeping them in your browser history or a notes app makes it easy to track which thread covered which task.
Related articles: Token management guide for when CLAUDE.md gets bloated, Claude Code session management — how do you do it?
3. Set up terminal aliases
Typing claude or claude --profile production in full every time is inefficient. Use shell aliases to create shortcuts.
Example setup (bash/zsh)
# ~/.bashrc または ~/.zshrc に追加
# Claude Code の起動
alias c='claude'
# Chrome統合(Playwright)を使う場合
alias ch='claude --mcp playwright'
# 特定プロジェクト向けプロファイル
alias work='claude --profile work'
alias personal='claude --profile personal'
Apply and verify
source ~/.bashrc
# または
source ~/.zshrc
# 確認
alias c
# → c='claude' と表示
If you type a command dozens of times a day, a one‑letter shortcut saves seconds that add up to hours. Developers who live in the terminal especially benefit from these micro‑optimizations.
Bonus: Terminal font
For the terminal font I use x14y24pxHeadUpDaisy, a HUD‑style pixel font that’s pretty cute. It supports Japanese and is free for commercial use.
4. Break big problems into small pieces
Instead of asking Claude to handle a complex task all at once, split it into small subtasks and proceed step by step. AI performs better with staged instructions.
Example split
❌ 「ユーザー認証機能を全て実装して」
→ 範囲が広い、何度もやり直す可能性
✅ 「まずユーザー登録のバリデーションロジックを書いて」
↓
✅ 「次にパスワードハッシュ化のテストケースを追加」
↓
✅ 「最後にエラー処理を統合」
Checklist
- Can you clearly tell when the task is done (no ambiguity)?
- Is it focused on a single file or function?
- Is it small enough to test?
Even complex bug fixes or large features go faster overall when split, because you reduce the number of retries.
That said, “do it all end‑to‑end” might become realistic. With the plugin described in Automate overnight testing with Ralph Wiggum, you can keep it running for hours, and once something like Codex CLI 5.2 lands, fully hands‑off might be feasible.
5. Use Git and the GitHub CLI
From Claude Code, you can automate Git commits, branch creation, and PR creation. Letting the AI do it often yields more consistent results than doing it manually in the terminal.
Common instruction pattern
以下のファイルを変更しました。コミットして PR を作成してください:
- src/auth.ts
- tests/auth.test.ts
PR タイトル: "Add password validation logic"
Claude then automatically runs:
git add src/auth.ts tests/auth.test.ts
git commit -m "Add password validation logic"
git push origin feature/auth
# → GitHub上で PR が作成される
Tip: When creating a PR, also ask Claude to include a description so reviews go smoothly.
6. A complete write‑test cycle
Writing code isn’t enough. Have Claude itself run the tests and make sure the build passes.
Cycle example
1. ファイルを書き込む(Edit/Write ツール)
↓
2. テストを実行する(Bash: `npm test`)
↓
3. テスト失敗時は分析して修正
↓
4. すべてのテストが緑になったら完了
To let Claude iterate autonomously, you need verifiable outputs. Don’t just create files—have it confirm behavior right there.
7. Search your conversation history
Past conversations saved under ~/.claude/ can be searched via Bash or even from Claude Code itself. There’s no need to solve the same problem twice.
How to search
# ローカルで過去の会話を検索
grep -r "特定キーワード" ~/.claude/
# 例:Docker設定の記事
grep -r "docker-compose" ~/.claude/
Search inside Claude Code
Depending on version, Claude Code’s UI also has options to list and search past conversations. Record frequently referenced settings in CLAUDE.md so they’re shared across projects.
8. Turn CLAUDE.md into your personal workflow
Place CLAUDE.md at the project root to give Claude project‑specific instructions. For a personal blog, for example, you can write once: “Articles are in Japanese; tech posts use plain style without honorifics” and never repeat it.
Example structure for CLAUDE.md
# 命名規則
- コンポーネント: PascalCase
- 関数: camelCase
- ファイル: kebab-case
# 文体ルール
- tech: 丁寧語なし、簡潔体
- diary: 一人称は「わたし」
# ビルドコマンド
pnpm build
Claude automatically reads and follows this. Even if each project has a different style guide, CLAUDE.md keeps things consistent.
Related articles: How we cut this site’s CLAUDE.md to less than half, Solved “nobody reads CLAUDE.md after splitting it” using GitHub features
9. Invest in your workflow
If you plan to keep using Claude Code, spending time on custom tools, scripts, and templates has high ROI. I call this “investing in your workflow”.
Investment examples
| Item | Effect | Example |
|---|---|---|
| Templates | Start article drafts from a template in about a minute | articles/tech.md template |
| Custom scripts | Automate recurring tasks | scripts/generate-sitemap.sh |
| CLAUDE.md upkeep | No need to repeat instructions | Project‑specific rules written down |
| Separate conversation threads | Reuse knowledge | Refer to past Docker setup threads |
Do it manually the first time, with Claude the second time, and automate from the third time onward to improve efficiency step by step.
10. Be proactive with unknown problems
The attitude of “I don’t know yet, but I’ll try” matters. Don’t use Claude as an excuse—iterate.
Mindset
- Partial understanding is fine—don’t wait until you know everything
- Read error messages—analyze them yourself before asking Google or Claude
- Fix iteratively—don’t aim for perfection in one shot
- Keep running the implement → verify → improve cycle
Complex library settings and build issues often won’t be solved by docs alone. Working through them with Claude leads to deeper understanding.
Troubleshooting
Slash commands don’t respond
Your Claude Code UI may be outdated. Update to the latest version.
claude --version
Aliases don’t work
Restart your shell or reload your settings with source ~/.bashrc. If you use zsh, edit ~/.zshrc.
CLAUDE.md isn’t being read
Check the filename. Make sure the capitalization is exact and that it’s placed at the project root.
Can’t find conversation logs
~/.claude/ is a hidden directory. Enable showing hidden files in Finder or Explorer.
# macOS で表示
defaults write com.apple.finder AppleShowAllFiles TRUE
# Linux で確認
ls -la ~/.claude/
Related articles
- Token management guide for when CLAUDE.md gets bloated
- Claude Code session management — how do you do it?
- How we cut this site’s CLAUDE.md to less than half
- Solved “nobody reads CLAUDE.md after splitting it” using GitHub features
- Automate E2E tests: Ralph Wiggum plugin