Skip to main content

Effective Prompting (Keep It Simple)

Context is King

0:00
LearnStep 1/2

Providing File Context

Context is King

Claude Code needs to see your code to fix it. While it can search your directory, explicitly providing context makes it faster and more accurate.

The /add Command

Use /add to bring files into the conversation:

text

Automatic Context

Claude also uses agentic tools to read files on demand. If you ask about a file you haven't added, it will often try to find and read it automatically.

Describe the "Why"

Instead of detailed instructions, explain the goal:

text

This gives Claude the context to make good decisions about implementation.