Claude Code Concepts
A brief orientation to Claude’s interfaces and how Claude Code works.
Ways to use Claude
Anthropic offers several ways to interact with Claude models:
| Interface | What it is |
|---|---|
| Chat (claude.ai) | Web-based conversation interface |
| Code | Agentic coding — Claude reads, writes, and runs code in your terminal or IDE (VS Code, JetBrains) |
| Cowork | Agentic non-coding tasks — document processing, image work, research, and other workflows for less technical users |
| API / SDK | Programmatic access for building Claude into your own applications |
Chat is what you get when you use Claude on the web, like other chatbots. Code and Cowork are agents that interact with local files for complex multistep tasks. Code is optimized for coding — it gives Claude direct access to your filesystem and terminal. Cowork is designed for non-coding tasks like processing documents and images, and is a good fit for users with less technical inclination.
In this lab we primarily use Claude Code. It gives Claude direct access to your filesystem and terminal, making it effective for data analysis, scripting, and project development. Some core details differ across Code and Cowork. For example, Cowork operates in a virtual environment, whereas by default Code operates directly on your system (though you can run it in a Dev Container). One implication is that skills, plugins, etc. are handled very differently across the interfaces. Custom skills in Cowork are installed by uploading zipped files via the Desktop App, while in Code they are installed on your filesystem. Skills installed in one are not available in the other.
How Claude Code interacts with your computer
When you launch Claude Code, you specify a working directory (the directory you run claude from). This is the project root where Claude focuses its work — reading files, writing code, and running commands.
Claude Code is not limited to this directory. It can read and write files elsewhere on your machine (subject to your permission settings), but the working directory is the default context for all operations.
At startup, Claude Code loads context from several sources:
CLAUDE.mdfiles — Instructions checked into the repo (project-level) or in your home directory (user-level)- Plugins — Bundles of skills, commands, and hooks (like this Dunn Lab plugin)
- MCP servers — External tool integrations configured in settings
See Managing Context for more on how to shape what Claude knows.
Extensibility: tools, skills, commands, hooks, and MCP
Claude Code’s capabilities can be extended in several ways. These differ in how they are triggered and what they do:
| Mechanism | Trigger | Purpose |
|---|---|---|
| Tools | Automatic — Claude decides when to use them | Built-in capabilities (read/write files, run bash, search code, etc.) |
| Skills | Automatic (context-based) or explicit (/skill-name) | Sets of instructions that guide Claude’s behavior for specific tasks |
| Commands | Explicit — user types a slash command | Predefined prompts that trigger specific Claude actions |
| Hooks | Automatic — fired by events (e.g., before a tool runs) | Shell scripts that run in response to Claude Code lifecycle events |
| MCP servers | Automatic — Claude decides when to call them | External integrations that give Claude access to additional tools and data sources |
For details on each, see the Claude Code documentation.
Best practices for effective use
Getting good results from Claude Code is less about prompt engineering and more about workflow discipline.
Plan before coding. Ask Claude to develop a detailed plan before writing any code. Review and refine the plan together until you’re confident in the approach. This avoids wasted effort and helps Claude make better decisions throughout implementation.
Work in small, testable steps. Break work into incremental tasks with clear, testable outcomes. After each task is completed and verified, ask Claude to commit (don’t commit manually — Claude generates detailed commit messages that document the reasoning behind changes). Then clear the context with /clear before starting the next task. This keeps the conversation focused and prevents context from getting stale or cluttered.
Let Claude handle errors. When code produces errors, don’t copy and paste error messages into the chat. Instead, ask Claude to run the code itself — it will see the full error output, have the surrounding context, and can diagnose and fix the problem directly. This is faster and less error-prone than manually relaying fragments of stack traces.