Promptles
Clarity

Name Your Outputs

Tell Claude exactly what the function should be called and what it should return. Leaving the function name or return type ambiguous means Claude has to make choices you might not agree with.

Where you'll practice this

2 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.

  • The Welcome Banner

    You're building a landing page and need a function that generates an HTML welcome banner. The function should take a `username` and return a styled `<div>` containing a welcome message. The project uses plain JavaScript in a file called `banner.js`.

  • The CLI Tool

    You want a Node.js CLI tool in a file called `campaigns.js` that your team can run to check the status of marketing campaigns. The tool should call your API at `GET /api/campaigns` and display the results as a formatted table in the terminal. It should accept a `--status` flag…

Other principles in Clarity