Lesson 2 - Prompting Fundamentals

Master the core principles of effective prompting: clarity, context, constraints, and examples. Learn to craft prompts that get high-quality results consistently.

Duration: 2-3 hours

Learning Objectives

By the end of this lesson, you will be able to:

  • Apply the 4 Cs of effective prompting (Clear, Contextual, Constrained, with Examples)
  • Structure prompts for different use cases (code generation, explanation, brainstorming)
  • Use Claude for both productivity tasks and product building
  • Evaluate prompt quality and predict Claude's response effectiveness

Videos

The 4 Cs of Effective Prompting

Learn the universal framework for crafting prompts that work: Clear, Contextual, Constrained, with Examples.

Duration: 7 minutes

Prompting for Different Goals

How to adjust your prompting approach based on whether you're generating code, getting explanations, or brainstorming ideas.

Duration: 7 minutes

Prompt Recipes: Templates You Can Steal

Ready-to-use prompt templates for common scenarios, customizable for your needs.

Duration: 7 minutes

Key Concepts

The 4 Cs Framework Explained

**1. CLEAR (Specificity)** ❌ Vague: 'Make a website' ✅ Clear: 'Create a single-page portfolio website with a hero section, about me, and contact form' **2. CONTEXTUAL (Background)** ❌ No context: 'Write a function to process payments' ✅ With context: 'I'm building an e-commerce checkout for a Next.js app. Write a server function to process Stripe payments' **3. CONSTRAINED (Boundaries)** ❌ Unlimited: 'Build a todo app' ✅ Constrained: 'Build a todo app using React + localStorage (no backend), with max 3 features, mobile-friendly' **4. EXAMPLES (Patterns)** ❌ No examples: 'Write in a friendly tone' ✅ With examples: 'Write in a friendly tone. Good example: "Hey! Let's build this together." Bad example: "Greetings. We shall proceed with construction."' **Combined Example:** I'm building a learning platform for non-programmers (CONTEXT). Create a lesson card component that displays: title, duration, difficulty badge, and a "Start Lesson" button (CLEAR). Use React + TypeScript + Tailwind CSS. Keep it under 50 lines. Make it accessible (ARIA labels) (CONSTRAINED). Style it like cards on Udemy or Coursera — clean, minimal, lots of whitespace (EXAMPLE).

Prompt Recipes Library

**Recipe 1: Build a Feature** ``` I'm working on [project description]. I want to add [feature name] that allows users to [action]. Tech stack: [languages/frameworks] Constraints: [performance, accessibility, etc.] The feature should: 1. [Requirement 1] 2. [Requirement 2] 3. [Requirement 3] Before coding, please ask clarifying questions about: - Data structure - Edge cases - Integration points ``` **Recipe 2: Explain This Concept** ``` I'm learning about [concept] for [context/purpose]. My current knowledge level: [beginner/intermediate/advanced in relevant area] Please explain [concept] by: 1. Using an analogy from everyday life 2. Breaking it into 3-5 key points 3. Showing a simple code example (if applicable) 4. Explaining one common mistake people make with this concept ``` **Recipe 3: Review My Work** ``` I wrote [code/document/design] for [purpose]. Please review it and provide feedback on: 1. [Specific aspect 1 — e.g., code quality, clarity, accessibility] 2. [Specific aspect 2 — e.g., performance, user experience] 3. [Specific aspect 3 — e.g., edge cases, security] My skill level: [beginner/intermediate] Be honest but constructive — I'm here to learn. [Paste your work here] ``` **Recipe 4: Brainstorm Solutions** ``` Problem: [Describe the problem in 1-2 sentences] Context: - Target users: [who] - Constraints: [time, budget, technical limitations] - What I've tried: [previous attempts, if any] Please generate: 1. 10 creative solutions (quantity over quality) 2. Then pick the top 3 and explain pros/cons of each 3. Recommend one with reasoning ``` **Recipe 5: Create a Plan** ``` Goal: [What you want to achieve] Current state: [Where you are now] Desired state: [Where you want to be] Timeline: [How long you have] Please create a step-by-step plan that: - Breaks the goal into weekly milestones - Identifies potential roadblocks - Suggests resources or learning needed - Keeps scope realistic for [timeline] ```

Prompting for Productivity (Beyond Code)

Claude isn't just for building apps — use it to supercharge your daily work: **Writing:** - 'Draft a project proposal for [topic] targeted at [audience]' - 'Rewrite this paragraph to be more concise and persuasive' - 'Generate 10 headlines for a blog post about [topic]' **Research:** - 'Summarize the key arguments in this article: [paste text]' - 'Compare and contrast [A] vs [B] in a table format' - 'What are the top 5 trends in [industry] for 2024?' **Analysis:** - 'Analyze this data and identify patterns: [paste CSV or numbers]' - 'What's missing from this project plan? [paste plan]' - 'SWOT analysis for [business idea]' **Learning:** - 'Create a 30-day learning plan for [skill]' - 'Quiz me on [topic] with 10 questions, reveal answers after I respond' - 'Explain the difference between [X] and [Y]' **Pro tip:** Use Claude for meta-tasks like 'Help me write a better prompt for [goal]'

Common Prompt Patterns

**The Persona Pattern:** 'You are [role/expert]. [Task]' Example: 'You are a senior UX designer. Review this user flow for accessibility issues.' **The Template Pattern:** 'Fill in this template: [structure]' Example: 'Fill in this template: Problem: ___ | Solution: ___ | Impact: ___' **The Chain-of-Thought Pattern:** 'Think through this step-by-step: [problem]' Forces Claude to show reasoning, improves complex answers. **The Few-Shot Pattern:** 'Here are 3 examples: [examples]. Now do this: [task]' Teaches by example instead of explanation. **The Constraint Pattern:** '[Task] BUT [constraint]' Example: 'Explain quantum computing BUT use only words a 10-year-old knows' **The Refinement Pattern:** '[Task]. Then critique your answer and improve it.' Makes Claude self-edit for better quality. **Combine patterns:** 'You are a product manager (Persona). Think step-by-step (Chain). Create a feature spec BUT keep it under 200 words (Constraint).'

Key Definitions

**Prompt:** The input/instruction you give to Claude **Prompt Engineering:** The skill of crafting effective prompts **Token:** Unit of text Claude processes (roughly 4 characters) **Context Window:** How much text Claude can remember in one conversation **Few-Shot Learning:** Teaching by example (show 2-3 examples, Claude infers the pattern) **Zero-Shot:** Giving a task without examples (relies on Claude's training) **Temperature:** Setting that controls randomness (higher = more creative, lower = more deterministic)

Common Mistakes & Pitfalls

Assuming Claude knows your context

Claude can't read your mind. Always provide background, even if it feels obvious to you.

Using jargon without defining it

If you use domain-specific terms, either define them or ask Claude to ask about anything unclear.

One-size-fits-all prompting

Adjust your approach based on the task. Code generation needs detail; brainstorming needs freedom.

Not specifying output format

Want a table? Bullet points? Code? Say so upfront. 'Format as a markdown table' gets better results.

Giving up after one bad response

Refine your prompt instead of starting over. 'Can you make that more concise?' often works.

Exercises

Exercise 1: The 4 Cs Practice

30 minutes

Take a vague prompt and transform it using the 4 Cs framework.

Expected Output:

A before/after document showing: original vague prompt, improved prompt with all 4 Cs labeled, and Claude's responses to both (screenshot or text)

Success Criteria:

  • Original prompt is intentionally vague (e.g., 'make an app')
  • Improved prompt clearly demonstrates all 4 Cs with labels
  • Tested both prompts with Claude and captured responses
  • Reflected on quality difference between responses
  • Identified which C had the biggest impact

Exercise 2: Build Your Prompt Recipe Book

45 minutes

Create 5 reusable prompt templates for tasks you do regularly (work, learning, or building).

Expected Output:

A personal prompt library document with 5 templates, each including: use case, template text with [brackets] for customization, example of filled template

Success Criteria:

  • At least 5 different templates covering different use cases
  • Templates use [bracket placeholders] for easy customization
  • Each template includes one filled example
  • At least one template is for productivity (not just coding)
  • Templates can be reused without modification except brackets

Exercise 3: Productivity Challenge

60 minutes

Use Claude for 3 different non-coding tasks today (writing, research, or analysis).

Expected Output:

A log of 3 tasks showing: (1) what you needed, (2) prompt you used, (3) Claude's output, (4) how you used it, (5) time saved estimate

Success Criteria:

  • Completed 3 distinct tasks (not variations of the same thing)
  • At least one task you'd normally do manually without AI
  • Documented the full prompt-to-output flow for each
  • Honestly estimated time saved vs. doing it manually
  • Identified one task where Claude surprised you positively

Lesson Reflection

Take a moment to reflect on what you've learned:

  • 1. Think about a task you did this week. How could you have used Claude to do it faster or better?
  • 2. Which of the 4 Cs (Clear, Contextual, Constrained, Examples) do you naturally include? Which do you forget?
  • 3. What's one prompt you wrote in Lesson 1 that you'd improve now using what you learned today?