Basic prompting in Claude Code
Basic prompting in Claude Code means writing clear, natural-language instructions that tell Claude what you want it to do with your codebase—fixing bugs, building features, running tests, or automating repetitive tasks. Unlike a chat interface, Claude Code connects your instructions directly to your local filesystem, terminal, and development tools, so it can read files, edit code, run commands, and iterate on results without you having to switch between tools.
You interact with Claude Code through a conversational interface (terminal REPL, IDE extension, web app, or desktop app). You describe what you want in plain English, optionally referencing specific files with the @ symbol, and Claude reads the relevant code, forms a plan, executes changes, and shows you what it did. The quality of your prompts directly affects how accurately and efficiently Claude completes tasks.
Basic prompting covers everyday development requests: describing a bug with its error message, asking for a new endpoint with specific acceptance criteria, requesting a refactor with constraints, or piping log output directly into Claude for analysis. The key skill is writing prompts that are specific enough for Claude to act without guessing—naming the files involved, the expected behavior, and any constraints like test patterns or coding style.
When you’d use it
- ◆Bug diagnosis from an error message — A developer pastes a stack trace or error message into Claude Code and asks it to find and fix the root cause. Claude traces the error through the codebase, identifies the problematic code, and implements a fix.
- ◆Adding a new feature with acceptance criteria — A developer describes a new API endpoint or UI component with specific requirements (validation rules, response codes, edge cases). Claude reads the relevant files, implements the feature, and writes tests matching the project's existing test pattern.
- ◆Multi-file refactoring — A developer asks Claude to rename a function, change an architectural pattern (e.g., switch from session cookies to JWT), or restructure a module. Claude searches the entire codebase for affected references and updates them consistently.
- ◆Log analysis and incident response — A developer pipes server or application logs directly into Claude using Unix piping (`cat error.log | claude -p "find the root cause"`) to get a fast diagnosis and suggested fix without manually scanning hundreds of log lines.
- ◆Automated test generation — A developer points Claude at untested code and asks it to write a test suite following the project's existing test conventions, saving time on boilerplate while ensuring the tests match the codebase's style.
What changed recently
- ◆2026-04-23 — Anthropic identified and resolved three separate issues that degraded Claude Code quality (affecting Claude Code, the Claude Agent SDK, and Claude Cowork). All fixes were deployed in v2.1.116 on April 20, 2026. Usage limits were reset for all subscribers on April 23, 2026.
- ◆2026-02-17 — Claude Sonnet 4.6 became the new default model in Claude Code. Plan Mode was enhanced: Claude now asks clarifying questions upfront and builds a user-editable plan.md file before executing. Claude Code became available in the desktop app, enabling parallel local and remote sessions.
- ◆2026-06-15 — Claude Agent SDK (formerly Claude Code SDK) became available on Pro, Max, Team, and Enterprise plans, including support for subagents and hooks for custom agentic workflows.
- ◆2025-07 — Checkpointing system introduced: Claude automatically snapshots files before each change. Users can rewind to any checkpoint (restoring code, conversation, or both) via double-tap Escape or the /rewind command.
This is the short version
The full chapter has three worked examples, the common pitfalls, and the workflow that makes it pay — plus the other 84 features, kept current.
Get Claude Master — $97 →