2.2

Asking Claude to Research

Getting Claude to explore before it executes

πŸ” Technique ⏱️ ~12 minutes

Claude Code can look at your existing files, understand codebases, and research approaches before suggesting solutions. But it won't do this automaticallyβ€”you have to ask.

πŸ” The Research Prompt

When you want Claude to understand before it acts, be explicit:

"Before we make any changes, look at the existing files in this project and tell me: - What's the current structure? - How are things connected? - What patterns are being used?"

This tells Claude to investigate rather than create. The output is information, not code.

πŸ“‹

Research Question Templates

Ready-to-use prompts for different types of research questions

πŸ“„ Preview PDF
Download PDF

πŸ’¬ Example Research Conversation

Here's what a good research session looks like:

You:

Before we add any features, please explore this folder and explain the current structure to me.

Claude:

I'll examine the files in your project...

[Claude reads files]

Here's what I found:
β€’ index.html - Main page with a navigation menu and hero section
β€’ style.css - Styling using a mobile-first approach
β€’ app.js - Handles menu toggle and form validation

The structure is straightforward: single-page site with external CSS and JS. Would you like me to suggest improvements or explain any part in detail?

You:

Yes, what would need to change if I wanted to add a blog section?

Claude:

To add a blog section, you'd need to...
[Claude provides analysis]

Notice how the conversation flows: research β†’ understanding β†’ planning. Only then would you move to building.

πŸ“‚ Understanding Your Codebase

If you're working on an existing project, Claude can map it out:

Try this:

"Explore this project folder and explain the structure to me. What does each file do? How do they work together?"

This is incredibly useful when you're picking up an old project or trying to understand code someone else wrote (or code Claude wrote in a previous session).

🎯 Research Questions to Ask

Here are prompts that trigger research mode:

  • "What files exist in this folder?"
  • "Read index.html and explain what it does"
  • "How is the CSS organized in this project?"
  • "What would I need to change to add a new feature?"
  • "Are there any issues or inconsistencies you notice?"

πŸ’‘ The "Before We Start" Pattern

Start complex tasks with: "Before we start building, I'd like you to..." This signals to Claude that you want thinking, not doing.

🌐 Researching Approaches

Claude also knows about different ways to solve problems. Ask it to compare options:

"I want to add user authentication to this app. What are the different approaches I could take? What are the trade-offs of each?"

Or for simpler decisions:

"Should the navigation be in a separate file or inline in index.html? What are the pros and cons?"

πŸ“ Documenting What You Learn

When Claude explains something useful, consider saving it. You can ask:

"Create a README.md file that documents what you just explained about this project structure."

This turns research into documentation you can reference laterβ€”a form of "compounding" we'll explore more in Module 3.

✨ Research Before Surgery

A doctor doesn't operate before understanding the patient. Claude shouldn't modify your code before understanding your project. Make research a habit, especially for anything complex.

πŸ”„ Research β†’ Plan β†’ Build

The best workflow often looks like:

  1. Research: "Look at the existing code and explain the structure"
  2. Plan: "Given that structure, how should we add [feature]?"
  3. Review: "Does this plan make sense? Any concerns?"
  4. Build: "Okay, implement the plan"

Steps 1-3 might take a few minutes. But they prevent hours of debugging later.

πŸ“š Resources & Further Reading

πŸ’­ Pause & Reflect

Before moving on, take a moment to consider:

  • When was the last time you dove into code without understanding it first?
  • What research questions would be most useful for your current projects?
  • How might this research-first approach save you time?

🎯 Research Skills Unlocked

You know how to make Claude think before it acts. Next: how to evaluate the plans Claude creates.

Topic 2.2 Complete β€’ Up Next: 2.3 – Reviewing a Plan