Claude Code is Anthropic's agentic coding tool. Unlike an autocomplete assistant that suggests the next line, Claude Code works on whole tasks: it reads your codebase, plans changes, edits multiple files, runs commands and tests, and iterates until the job is done. It runs in the terminal, and is also available through IDE integrations, a desktop app and on the web.
Demos make it look effortless. Real projects, with legacy code, team conventions, flaky tests and production risk, need a more deliberate workflow. This guide covers how experienced developers set up and use Claude Code day to day.
Installation
Anthropic offers several ways to install Claude Code, including a native installer script for macOS, Linux and Windows, Homebrew on macOS, WinGet on Windows and the npm package for those who prefer Node-based installation. After installing, run the claude command inside your project folder and sign in with your Claude subscription or an API account from the Claude Console.
Check the official setup documentation for current system requirements, since supported platforms and recommended methods change over time.
Start every project with CLAUDE.md
The most valuable thing you can do is give Claude Code good project memory. Claude Code automatically reads a file called CLAUDE.md in your project root at the start of each session.
Run the init slash command to have Claude generate a first version by scanning your codebase, then refine it by hand. A good CLAUDE.md includes:
- what the project is and its main components
- how to build, run, test and lint, with exact commands
- coding conventions, such as naming, error handling and folder structure
- things to avoid, such as "never edit generated files in the dist folder"
- architecture notes and important design decisions
- how to run a single test quickly
Keep it concise and current. Treat it like documentation for a new team member who will read it every morning. You can also have CLAUDE.md files in subdirectories for module-specific guidance, and a personal file in your home directory for preferences that apply to all projects. The memory slash command opens these files for editing.
Explore before you change
On an unfamiliar or large codebase, ask questions before asking for changes:
- Explain how authentication works in this project.
- Which files handle invoice PDF generation?
- What would break if we changed the user table's email column?
Claude Code searches and reads files to answer. This builds your own understanding and gives Claude useful context for the work that follows.
Use plan mode for anything non-trivial
Plan mode lets Claude Code analyse the codebase and propose a plan without editing files. You can toggle it with a keyboard shortcut in the terminal interface. Review the plan, ask for changes, then let Claude execute.
A typical flow for a feature:
1. Describe the feature and constraints.
2. Ask for a plan in plan mode.
3. Challenge the plan: edge cases, tests, migration, performance.
4. Approve and let Claude implement.
5. Review the diff.
Planning first catches misunderstandings when they are cheap to fix.
Write precise requests
Claude Code is capable, but vague requests produce vague results. Compare:
- Weak: fix the login bug.
- Strong: users with a plus sign in their email cannot log in. Reproduce it with a unit test in the auth tests file, fix the validation in the login service, and make sure all auth tests pass.
Good requests state the goal, the scope, the files or areas involved, the constraints and how to verify success.
Let tests drive the work
AI-written code should be verified by tests, not by eyeballing.
- Ask Claude to write a failing test that reproduces a bug before fixing it.
- For new features, ask for tests alongside implementation.
- Tell Claude the exact command to run tests, ideally in CLAUDE.md.
- Ask it to run the tests and iterate until they pass.
Claude Code works best when it has a fast, reliable feedback loop. If your test suite takes 40 minutes, show it how to run only the relevant tests.
Permissions, staying in control
By default, Claude Code asks permission before editing files or running commands. You can configure this with allow and deny rules in settings files: a shared settings file in the project's claude folder that you commit for the team, and a local settings file for personal overrides that stays out of version control. The permissions slash command lets you review and edit rules interactively.
Sensible practice:
- allow safe, frequent commands such as running tests, linters and read-only Git commands
- deny or require approval for destructive commands, deployments and anything touching production
- never store secrets where Claude can read them unnecessarily
Avoid blanket permission bypass modes except inside isolated containers or virtual machines.
Slash commands and skills
Claude Code includes built-in slash commands, such as clear to start fresh, compact to summarise a long conversation and free context, init, memory, permissions, mcp, agents and hooks.
You can also create your own reusable instructions. Skills are folders containing a SKILL.md file with instructions, plus optional scripts and resources, stored in the claude skills folder of your project or your home directory. Claude can load a skill automatically when it is relevant, or you can invoke it by name as a slash command. Older custom commands stored as markdown files in the claude commands folder continue to work.
Good candidates for skills include:
- your team's pull request checklist
- a release notes generator
- a database migration procedure
- a security review routine
Subagents for focused work
Subagents are specialised assistants with their own system prompt, tool permissions and separate context window. You define them as markdown files in the claude agents folder, or create them with the agents slash command.
Examples:
- a code reviewer that only reads code and reports issues
- a test writer that focuses on coverage
- a documentation agent
Because each subagent has its own context, the main conversation stays clean, and you can restrict risky tools to agents that genuinely need them.
Hooks for automatic guardrails
Hooks are shell commands that run automatically at specific points, such as before a tool is used, after a file is edited or when a session ends. Configure them in settings or through the hooks slash command.
Useful hooks:
- run the formatter after every file edit
- block edits to protected files
- run a quick lint check before Claude finishes
- send a notification when a long task completes
Hooks are deterministic, so they enforce rules that should never depend on the model remembering.
Connect your tools with MCP
Claude Code supports the Model Context Protocol, so you can connect it to issue trackers, databases, documentation, monitoring tools and more. Add servers with the claude mcp command, and share project-level server configuration with your team through a configuration file in the repository. Our article on MCP explains the protocol.
Plugins
Plugins bundle skills, subagents, hooks and MCP servers into a single installable package. Teams use them to share a standard setup, for example a plugin that adds the company's code review skill, deployment hooks and internal MCP servers in one step.
Git workflow
Claude Code works naturally with Git.
- Start each task on a new branch.
- Ask Claude to make small, focused commits with clear messages.
- Review every diff before merging, just as you would for a colleague.
- Use Git worktrees to run separate Claude Code sessions on different tasks in parallel without conflicts.
- Ask Claude to open a pull request description that explains what changed and why.
Claude Code can also run in CI and respond in GitHub through an official GitHub Actions integration, which is useful for automated reviews and small fixes. See our article on using Claude for code review in a CI pipeline.
Managing context in long sessions
Long sessions accumulate file contents and command output. When the conversation grows, Claude Code can compact it automatically, and you can run the compact command yourself with a note about what to keep. Start a fresh session with the clear command when switching to an unrelated task.
Reviewing AI-written code
Treat Claude Code's output as a pull request from a fast, capable colleague who has never worked at your company before.
Check for:
- correctness against requirements and edge cases
- adherence to project conventions
- security, especially input validation, authentication and secrets
- unnecessary complexity or duplicated code
- tests that actually test behaviour rather than mirroring the implementation
- changes outside the requested scope
You remain responsible for what you merge.
A sample daily workflow
1. Pull the latest code and open Claude Code in the project.
2. Pick a ticket, create a branch and paste the ticket details.
3. Ask Claude to explore relevant code and propose a plan.
4. Approve, then let it implement with tests.
5. Run the full test suite and linters.
6. Review the diff carefully and request adjustments.
7. Commit, push and open a pull request.
8. Update CLAUDE.md with anything Claude got wrong that a note would prevent.
That last step compounds. Every correction you record makes future sessions better.
Common mistakes
- No CLAUDE.md, so Claude rediscovers the project every session.
- Huge, vague requests instead of scoped tasks.
- Skipping tests and trusting the code because it looks right.
- Granting broad permissions on a machine with production access.
- Letting sessions run so long that early context is lost.
- Merging without review.
Key takeaways
- Invest in CLAUDE.md as living project memory.
- Explore, plan, implement, test and review, in that order.
- Configure permissions deliberately and use hooks for hard rules.
- Use skills, subagents, MCP and plugins to scale good practices across the team.
- Keep Git discipline and review every change.
Used this way, Claude Code becomes less of a novelty and more of a dependable team member, one that speeds up the boring parts and lets you focus on design and judgement.
Related articles on MindStick
- Using Claude for Code Review in a CI Pipeline
- Model Context Protocol Explained, Connecting Claude to Your Data
- Claude Code Not Working, Common Setup Problems and Fixes
- Building AI Agents With Claude, Patterns That Work
Claude Code is updated frequently. Commands, settings and installation methods may change, so check the official Claude Code documentation for current details.
Leave a Comment