Claude Code: What I Learned After a Few Months
Author: CarloThis post grew out of my personal notes — collected over several months of working regularly with Claude Code.
Claude Code is not a browser chat interface — it's a CLI tool. You open a terminal, type claude, and work directly inside your own project. Claude has access to the real files, can read, write and execute code — all locally, all in the context of your project.
AI chats with coding assistants still tend to feel chaotic: you start typing, the context grows huge, and eventually the model starts producing nonsense. But it doesn't have to be chaos - it just needs a system.
1. Setup: Getting Started
Three commands to begin: claude starts Claude Code,
/terminal-setup enables Shift+Enter in VS Code for multiline input,
and /doctor checks that everything is configured correctly — API key present, connection working, dependencies in order. If you run into setup issues, start here.
Then run /init. This creates a CLAUDE.md file in your project directory - Claude's project bible. Claude reads this file automatically at the start of every chat. This is where project-specific instructions go: which package manager to use, your code style preferences, which UI library, whether Claude should ask before committing. It's worth expanding this file manually — it's the key to consistent results across sessions. For example: # Always use pnpm, # No semicolons, # Never auto-commit (if you're the careful type 😉)
2. The Core Workflow: Plan → Execute → Clear
Before every task, type /plan. This activates Plan Mode - Claude explores the codebase, thinks through the solution, and presents a plan before a single line of code is changed. Execution only happens after your approval. Use Alt+M to toggle between Plan Mode and Accept Edits.
Shift+Enter lets you write multiline input - allowing you to compose a clear, structured prompt before Claude does anything.
Once a task is done, type /clear. This resets the context — reducing costs and keeping the chat clean. If a session gets long but you don't want to lose the context, /compact summarizes everything down to the essentials instead of discarding it.
And /resume lets you pull up any previous session and continue where you left off.
3. Controlling Context
Instead of pasting code into the chat, reference files directly with @path/to/file. Claude reads exactly the file or folder you specify - no unnecessary context, no guessing. In practice, instead of pasting code just write:
@src/components/Button.tsx – why is the onClick handler failing?
And as mentioned, you can bake in permanent rules in CLAUDE.md like: # Always use Tailwind CSS (if you’re a fan! 😉)
4. Choosing Your Model
For the model itself: /model switches between available options. Sonnet is the default for everyday development work — balanced between quality and speed. Haiku is cheaper and faster, great for simple tasks and quick iterations. For complex architectural decisions or tricky debugging, Opus is worth it.
4. Power Features
4.1 MCP (Model Context Protocol) lets you integrate external services directly into Claude Code. A useful example is Context7 - an MCP server that fetches current library documentation live, instead of relying on the model's training knowledge.
Installation:
claude mcp add --transport http context7 https://mcp.context7.com/mcp --scope project
--scope project means this server is only active for this project.
Add it to CLAUDE.md with # Use Context7 for current library docs — after that, a simple "use context7" in the chat is enough, and Claude fetches the latest docs before responding (this makes a real difference with fast-moving libraries). Use /mcp to see all active MCP servers and don't forget to restart Claude for newly added MCP servers to appear.
4.2 Agents
With /agents you can create specialized sub-agents - small, focused helpers with a clear job. The flow: type /agents, create a new agent in the interactive menu and describe what it should do. Claude Code automatically creates a file under .claude/agents/. Example for a code summary agent - the file .claude/agents/code-summarizer.md contains:
Make a short summary of what this code is doing.
Once set up, the agent is called directly in the chat with typing @code-summarizer which looks like that:
@"code-summarizer (agent)" take a look at Program.cs
Claude hands the task to the agent, which responds with its specific focus - without you having to explain the context again.
4.3 Custom slash commands
Custom slash commands are also easy to create. Create a Markdown file under .claude/commands/ - the filename becomes the command name. The file .claude/commands/test.md contains the prompt with $0, $1 etc. as placeholders: Create a txt file named $0. Write in that file: $1
After restarting Claude Code the command is available. Call it with space-separated arguments - use quotes for multi-word arguments:
/test blabla "I'm just a test"
Claude replaces $0 with blabla and $1 with "I'm just a test" and creates blabla.txt.
Note that every word counts as its own argument, which is why quotes are needed for multi-word values.
Conclusion
The difference between chaotic AI chat and a solid workflow comes down to two habits: /plan before every task — so Claude thinks before it acts. And /clear afterwards — so the next task starts with a clean context. Everything else, context control, model choice, MCP, agents, builds on top of that.