Promptles
Context

Describe Before You Prescribe

Before asking Claude to change existing code, describe what it currently does. This 'before' picture helps Claude understand the delta between current and desired behavior, leading to precise edits instead of rewrites.

Where you'll practice this

One Promptles scenario teaches this principle directly.

  • The API Extension

    You have an existing `GET /api/products` endpoint in `routes/products.ts` that returns all products from the database. You want to add a `search` query parameter so users can filter products by name. Currently the endpoint just calls `Product.findAll()` with no filters.

Other principles in Context