In this chapter, we go beyond the first step into Claude Code and build a solid foundation, focusing on power-user setup patterns that optimize your environment so you and the AI can produce the best possible synergy.
ykdojo's first tip is the Custom Status Line: a feature that shows important information in real time at the bottom of your terminal. It's one of the first things power users configure.
Problems with the default status line:
The default status line shows minimal info, but in practice you often need these in real time:
ykdojo's custom status line setup:
ykdojo published a status-line.sh script in his GitHub repo. It displays:
~/project (main*) | Tokens: 45k/200k | Opus 4.5 | MCP: 3 active
Installation:
# 1. Clone the repo
git clone https://github.com/ykdojo/claude-code-tips.git
# 2. Create a symlink to the script
ln -s $(pwd)/claude-code-tips/scripts/status-line.sh ~/.claude/scripts/status-line.sh
# 3. Restart Claude Code
Customization:
You can also define the status line format directly in ~/.claude/settings.json:
{
"statusLine": {
"format": "{{dir}} {{git}} | {{tokens}} | {{model}}",
"updateInterval": 1000
}
}
Ado's /statusline command (Ado Tip #14):
Ado introduces interactive customization using /statusline. When you run it, Claude shows available variables and helps you build a desired format through conversation.
Claude Code's real power comes from slash commands. They go beyond conversation and let you control the system and retrieve information instantly.
| Command | Description | When to use |
|---|---|---|
| /usage | Visualize current token usage and reset time | at session start, when the conversation grows |
| /clear | Clear conversation and start with fresh context | when context is polluted, when starting new work |
| /stats | Analyze usage (GitHub-style activity graph, favorite models, streaks) | weekly review, usage pattern analysis |
| /context | X-ray of context window usage | when performance drops, when optimizing |
| Command | Description | When to use |
|---|---|---|
| /chrome | Start Chrome integration | web scraping, UI testing, debugging |
| /mcp | List MCP servers and enable/disable | MCP management, context optimization |
| /permissions | Manage approved commands | security review, removing risky commands |
| /export | Export chat history to Markdown | documentation, sharing with a team, study material |
! prefix (Ado Tip #4)Prefixing with ! runs a shell command immediately without Claude "handling" it, and injects the result into context. This reduces token waste and increases speed.
Example:
# Typical approach (slow, wastes tokens)
> "Run git status"
Claude: "Sure, I'll run git status..."
[executes and prints output]
# With ! prefix (fast, efficient)
> !git status
[prints output immediately; Claude only reads it]
Ado's advice:
"The ! prefix is one of my most-used features. It's perfect for quick checks like !git diff, !npm test, !docker ps."
CLAUDE.md is a project manual and behavior guide for AI. Claude reads it first to understand your stack, coding style, key libraries, and what it must not do.
In a new project, running /init makes Claude analyze the codebase and auto-generate a draft CLAUDE.md.
Example:
/init
Generated CLAUDE.md:
# Project: E-commerce Platform
## Tech Stack
- **Frontend**: Next.js 14, React 18, TailwindCSS
- **Backend**: Node.js, Express, PostgreSQL
- **ORM**: Drizzle
- **Authentication**: NextAuth.js
- **Payment**: Stripe
## Project Structure
- `/app`: Next.js app directory (routes, layouts)
- `/components`: Reusable React components
- `/lib`: Utility functions, database client
- `/api`: Backend API routes
## Coding Standards
- Use TypeScript strict mode
- Prefer server components over client components
- Use `async/await` instead of `.then()`
- Always validate user input with Zod
## DO NOT
- Never commit `.env` files
- Never use `any` type in TypeScript
- Never bypass authentication checks
- Never expose API keys in client code
## Common Commands
- `npm run dev`: Start development server
- `npm run build`: Build for production
- `npm run db:push`: Push schema changes to database
You can update CLAUDE.md without editing it by hand.
Example:
Update Claude.md: always use bun instead of npm
Claude updates it automatically:
## Common Commands
- `bun dev`: Start development server (always use bun, not npm)
- `bun run build`: Build for production
- `bun db:push`: Push schema changes to database
ykdojo advises keeping CLAUDE.md as concise and clear as possible.
Bad (too verbose):
## Authentication
Our authentication system is built using NextAuth.js, which is a complete authentication solution for
Next.js applications. It provides a flexible and secure way to add authentication to your app. We use the
Credentials provider to authenticate users with email and password. The session strategy is set to JWT,
which means that the session is stored in a JWT token on the client side...
Good (concise):
## Authentication
- NextAuth.js with Credentials provider
- JWT session strategy
- **DO NOT**: Bypass auth checks, expose session secrets
ykdojo's advice:
"Start without a CLAUDE.md. If you find yourself repeating the same things, add them then. Too much info wastes context."
Power users heavily use aliases to minimize typing. Here are the aliases ykdojo uses.
Add to ~/.zshrc or ~/.bashrc:
# Claude Code aliases
alias c='claude'
alias cc='claude --continue' # continue the last conversation
alias cr='claude --resume' # pick from conversation list
alias ch='claude --chrome' # chrome integration mode
# Git aliases (used with Claude)
alias gb='git branch'
alias gco='git checkout'
alias gst='git status'
alias gd='git diff'
# quick exit
alias q='exit'
Usage examples:
# without aliases
$ claude --continue
$ claude --chrome
# with aliases
$ cc
$ ch
ykdojo's advice:
"If you run something dozens of times a day, create an alias. Typing time adds up to a huge difference."
Claude Code automatically saves all conversations, but without good management they can be hard to find later.
$ claude --continue
# or
$ c -c
This immediately continues your last conversation.
Use /rename during a chat to give a session a meaningful name.
/rename auth-system-refactor
Now you can resume it by name:
$ claude --resume auth-system-refactor
Ado's advice:
"Always name important work. '2025-01-15 14:30' is far harder to remember than 'stripe-integration'."
You can bring a Claude Code session started in a web browser into your local terminal:
$ claude --teleport <session_id>
/export
Exports the current chat history to a Markdown file. Common uses: