How to Use Claude Code for Coding: Plan Mode, Agents, and More

By Shubham Dhiman ยท August 11, 2026

What Is Claude Code?

Claude Code is Anthropic's command-line tool for agentic coding. It lets you delegate real engineering work, writing features, fixing bugs, refactoring, running tests, directly from your terminal, with Claude reading your codebase, running commands, and iterating until the job is done.

Getting Started

Install Claude Code via npm (npm install -g @anthropic-ai/claude-code), then run "claude" inside your project directory. Claude reads your repo structure, respects .gitignore, and can be pointed at a CLAUDE.md file for project-specific context and conventions.

Plan Mode: Think Before You Code

Plan mode is one of Claude Code's most useful features for non-trivial changes. Instead of jumping straight into edits, press Shift+Tab (or type /plan) to have Claude research the codebase, read relevant files, and propose a step-by-step implementation plan before touching anything. You review the plan, ask for changes, and only once you approve does Claude start writing code. This is especially valuable for larger refactors, new features, or anything where you want a second look before code changes happen.

Agents and Subagents

Claude Code can spin up subagents, isolated instances of Claude with their own context window, to handle specific pieces of work in parallel or in isolation. For example, one subagent might explore the codebase to find where a bug originates while the main session keeps working on something else, or a code-review subagent might critique a diff before you commit. Subagents keep the main conversation's context clean, since their detailed exploration doesn't clutter the primary thread, only their summarized findings come back. You can also define custom subagent types, such as a test-writer or security-reviewer, with their own instructions and tool access, tailored to repeatable tasks in your workflow.

Skills

Skills are packaged, reusable instructions for specific kinds of tasks, such as a deploy checklist, a code review rubric, or a repo-specific workflow. When Claude Code recognizes a task matches an available skill, it loads that skill's instructions before proceeding, so you get consistent, repeatable results instead of re-explaining your process every time.

MCP and Tool Access

Claude Code supports the Model Context Protocol (MCP), which lets you connect external tools and data sources, such as GitHub, databases, browsers, and project management tools, directly into your coding sessions. This means Claude can, for instance, look up a ticket, check a design file, or query a database without leaving the terminal.

Best Practices

A few habits make Claude Code noticeably more effective: keep a CLAUDE.md file with project conventions and architecture notes so Claude doesn't have to rediscover them each session; use plan mode for anything touching more than a file or two; let Claude run your test suite and linter rather than eyeballing correctness; and review diffs before committing, the same way you would with a human collaborator's pull request.

Wrapping Up

Claude Code turns the terminal into an agentic coding environment. Plan mode gives you a checkpoint before changes happen, subagents let you parallelize and isolate work, and skills and MCP tools extend what a single session can do. Together, they make it practical to hand off real, non-trivial engineering work and trust the result.