How to Use Claude Code: A Practical 2026 Guide

Learning how to use Claude Code takes one install command and one habit: run claude inside your project directory, then describe what you want, review the diff it proposes, and approve or correct it. It is a terminal-based coding agent, not an editor plugin, so it reads your files, runs commands, and hands you changes to accept rather than autocompleting as you type. Most tutorials stop at the install step, which is the least useful part, because the real skill is how you steer it once it is running.
I have used Claude Code daily for months. The commands take an afternoon to learn. The thing that actually separates a smooth session from a frustrating one is how precisely you can tell it what to change, especially when the problem is something you can see on screen but cannot easily name.
How do you install Claude Code?
Installation is one command and one login. You install the CLI, authenticate with your account, and you are ready to run it in any project.
npm install -g @anthropic-ai/claude-code
claude
The first run prompts you to log in and pick a working directory. From there, Claude Code operates on the folder you launched it in, so start it at the root of the project you want it to work on.
The mental shift, if you are coming from an editor plugin, is that Claude Code is agentic. It does not just suggest a line; it can read many files, plan a change, edit several files, and run your tests, pausing for your approval at each meaningful step. If you are weighing it against an editor-first tool, this comparison of Claude Code vs Cursor lays out where each one fits.
How to use Claude Code: the core loop
Everything in Claude Code is a variation on the same rhythm. You state intent in plain language, it proposes a change, and you review before it lands. Learning how to use Claude Code well is mostly learning to make that loop tight.
Start by describing a task at the right size. "Add a dark mode toggle to the settings page and persist the choice" is a good unit of work. A whole feature at once is too big, and a single line is too small to be worth the round trip.
Then review the diff it proposes. Claude Code shows you what it wants to change before it writes, and approving blindly is where people get burned. Read the diff, accept it, or tell it what is off and let it revise.
Keep sessions scoped. When you finish a coherent chunk of work, start fresh so the context stays clean. A few commands are worth memorizing early.
| Action | How | When to use it |
|---|---|---|
| Start a session | claude in your project | Beginning any task |
| Give a one-off task | claude -p "your prompt" | Quick, scripted changes |
| Add an MCP server | claude mcp add <name> | Extending what it can see |
| Undo a change | Ask it to revert, or use git | After a wrong edit |
| Reset context | Start a new session | When context gets noisy |
Claude Code rewards small, named units of work and punishes vague, sprawling requests. "Fix the layout" invites a guess; "center the submit button inside the login card" gets a scoped edit.
What can MCP and skills add to Claude Code?
Out of the box, Claude Code sees your files and can run commands. MCP servers and skills are how you extend that reach, and they are where the tool gets genuinely powerful.
The Model Context Protocol lets Claude Code talk to external tools and data sources through a standard interface. You add one with claude mcp add, and from then on the agent can call it. People wire in databases, issue trackers, documentation, and browser automation this way. A Claude Code MCP setup is the difference between an agent that only sees code and one that sees your whole workflow.
Skills are reusable instructions and capabilities you can invoke by name. This guide to Claude Code skills covers how they package a repeatable task so you are not re-explaining the same procedure every session.
There are also hooks, which run your own scripts at defined points in the agent's lifecycle, useful for enforcing checks or logging. Between MCP, skills, and hooks, most teams shape Claude Code into something that fits their specific stack rather than using it raw.
Add MCP servers deliberately, not all at once. Each one adds tools the agent can call, and a lean set keeps its choices focused. Start with the one that removes your biggest daily friction.
One thing MCP is especially good for is giving Claude Code context it does not have on its own, and the most common missing context is your screen.
Why does Claude Code edit the wrong UI element?
Because Claude Code cannot see your screen by default, and when you paste a screenshot it has to guess which coded element you mean. Whether Claude Code can see your screen is clear on this: the CLI agent has no eyes unless you feed it images or wire in a screen-context layer.
So the common workaround is to screenshot a bug and paste it in with a description. The screenshot is pixels. Claude Code infers which element in your code matches the shape you circled, from position and nearby text, and when two controls look alike the inference is wrong.
Claude Code fixing the wrong element is the exact failure. It edits a lookalike component, you verify, it is wrong, you re-prompt, and each wrong round costs 30 to 90 seconds. A screenshot is a picture, not a pointer, and that gap is where the loop breaks.
The general fix for this is to feed Claude Code better context, not more of it. How to give Claude Code context covers the range, from CLAUDE.md files to scoped file references, but the hardest context to supply is "this specific control I am looking at right now."
How do you point Claude Code at a screen bug?
Give it the named element under your pointer instead of a screenshot to interpret. macOS exposes this through the Accessibility API. The call AXUIElementCopyElementAtPosition returns a control's role, title, value, frame, and parent chain, which is a precise handle on exactly what you circled.
That turns "this button" into AXButton "Continue" inside AXGroup "login-card" with a confidence score. Handed that, Claude Code edits the right component the first time instead of guessing.
This is what PinVari does, and it connects to Claude Code through the same MCP mechanism you already use. You hold ⌥⌘A, circle or point at the broken control, and speak the fix. It screenshots the region, transcribes on-device, resolves the named accessibility element under your pointer, and exposes it to Claude Code over a local MCP server on 127.0.0.1. The agent-facing tool returns the resolved element path, your spoken instruction, and a screenshot cropped to just that region. When a control has no accessibility label, it falls back to on-device Vision OCR.
Setup is one line, claude mcp add --scope user pinvari -- "$HOME/.pinvari/mcp/pinvari-mcp", and everything runs on your machine with no API keys and nothing uploaded by default. You point and speak; Claude Code receives a named element, which is the cleanest way to close the see-it-to-fixed loop.
Once you know how to use Claude Code's core loop, this is the highest-leverage addition to it. If pointing instead of describing is the part of your workflow you most want to fix, PinVari is a one-time purchase built for exactly that handoff.
FAQ
How do I start using Claude Code?
Install it with npm install -g @anthropic-ai/claude-code, run claude inside your project directory, and log in when prompted. Then describe a task in plain language, review the diff it proposes, and approve or correct it. The whole workflow is a describe-review-approve loop rather than line-by-line autocomplete.
Is Claude Code better than Cursor?
They serve different habits. Claude Code is a terminal agent that runs commands and works across your whole project, while Cursor is an AI-native editor that keeps you in a familiar VS Code interface. Many developers use both; the comparison guide on Claude Code vs Cursor covers which fits which kind of work.
What is MCP in Claude Code?
MCP, the Model Context Protocol, is how Claude Code connects to external tools and data through a standard interface. You add a server with claude mcp add, and the agent can then call it, whether that is a database, an issue tracker, or a screen-context layer. It is the main way to extend what Claude Code can see and do.
Can Claude Code see my screen?
Not by default. Claude Code has no eyes unless you paste a screenshot or connect a screen-context layer through MCP. Pasting screenshots works but forces the agent to guess which element you mean, which is why a tool that resolves the named element under your pointer is more reliable.
How do I stop Claude Code from editing the wrong element?
Name the element explicitly in your prompt, or use a tool that resolves the accessibility element under your pointer and hands it to Claude Code over MCP. "The button labeled Save in the settings panel" beats "this button," and a resolved named element removes the guess entirely.
Hand your agent the exact element
PinVari resolves what you point at into a named, executable instruction — on-device, no keys, your own agent. One click inside PinVari connects Claude Code, Cursor, VS Code or Codex — or paste one CLI line from pinvari.com/connect.
PinVari → Connect → your agent (one click)Get PinVari — $39 →


