Promptles
Clarity

Be Specific

Name the exact file and function you want changed. Describe what the change should do, what the defaults should be, and give an example of expected input/output. The more specific you are, the less Claude Code has to guess. And guessing means follow-up questions or wrong code.

Where you'll practice this

4 Promptles scenarios teach this principle directly. Each one drops you into a real engineering ticket and asks you to write the prompt you'd send to Claude Code.

  • Your First Prompt

    You have a JavaScript file called `greet.js` that contains a single function `greet(name)` which returns `"Hello, <name>!"`. Your team has decided to add a new feature: the function should also accept an optional `greeting` parameter so users can customize the greeting (e.g.,…

  • Putting It All Together

    You're building a simple shopping tool. The file `cart.js` needs two functions: `addItem` that takes an item name and price and adds them to an array of items, and `getTotal` that takes no parameters and returns the sum of all item prices. The items should be stored in a…

  • The Anomaly Flagger

    You have a CSV file `daily_revenue.csv` with columns: `product` (string, 50 product lines), `date` (YYYY-MM-DD, one year of daily data), and `revenue` (decimal). You want a Python script called `flag_anomalies.py` that flags any day where a product's revenue deviates more than 2…

  • Frame to Faithful Component

    You've got one self-contained frame: a 'Notification row' — avatar on the left, a title, a timestamp, and an unread dot on the right. You want one clean, faithful React component out of it: the right element structure, the design's tokens, and props named after the data so it's…

Other principles in Clarity