1. Open the project and write the memory file
cd your-project
claude
/init
/init inspects the repository and drafts CLAUDE.md: how to build, how to test, conventions, what not to touch. Edit it. Every future session reads it first, which is why it pays for itself in one day — the agent stops rediscovering your project each time.
2. Ask for a plan, not a change
> Plan how to add rate limiting to the /api/upload route. Don't edit anything yet.
Read the plan. Correct it in plain language. Then: go ahead. Plan-then-execute produces better changes and cheaper sessions than letting the agent explore by editing.
3. Let it run the tests
Tell it how tests run (or let CLAUDE.md say so) and ask it to run them after the change. The loop — edit, test, read the failure, fix — is where the agent is strongest. Watch the permission prompts: each one is a chance to fence what it may do.
4. Permissions
/permissions
Allow read and edit freely, allow specific safe commands (Bash(npm test), Bash(git diff *)), and keep anything destructive on ask. In scripts, encode the same set with --allowedTools.
5. Compact when the topic changes
/compact focus on the rate limiter; drop the earlier exploration
Context is cost. Every turn resends everything so far. Compact at each change of direction and /clear between unrelated tasks — this single habit halves most people's bills.
6. Pick the model per step
Stay on the Sonnet tier by default. For the one genuinely hard decision, /model to Opus, make the decision, switch back. The models guide covers the tiers and how to pin them.
7. Commit and review
> Commit this as a single change with a message that explains the rate limit values.
Have it commit, then read the diff yourself. The agent is a fast, tireless junior engineer with an excellent memory of your CLAUDE.md — treat its output with the same review you would give one.
Where to go next
- Skills — teach it your team's procedures once.
- Subagents (
/agents) — split large tasks across specialised workers. - MCP servers (
/mcp) — give it your database, browser, ticket tracker. - The GitHub Action — the same loop on every pull request.
- Pricing — and how to stop watching the meter with a flat-rate plan.
Frequently asked questions
What is CLAUDE.md?
The project memory file Claude Code reads at the start of every session: build and test commands, conventions, boundaries. /init drafts it; you keep it current.
What is plan mode in Claude Code?
Asking for a plan without edits, approving it, then executing. It produces better changes and shorter, cheaper sessions than exploratory editing.
How do I stop Claude Code from asking permission every time?
Use /permissions to pre-approve safe tools and commands, or --allowedTools in scripts. Keep destructive commands on ask.
Run Claude Code on the gateway
Same models, two environment variables, credits at 7.69× face value — or a flat-rate unlimited plan.
Get an API key See unlimited plansAI Prime Tech is an independent API gateway and is not affiliated with, endorsed by, or sponsored by Anthropic. “Claude” and “Claude Code” are trademarks of Anthropic. Claude Code features described here follow Anthropic’s public documentation at the time of writing and change frequently; prices and model lists on this page are read from this gateway’s live settings.