Promptles
Constraints

Specify the Trigger

Name the event, the condition, and the action.

Every automation starts with an event. Tell Claude what kicks off the workflow, what conditions must be met before it runs, and what should happen at each step. A vague 'when something changes, update the sheet' leaves Claude guessing at the event source, the polling interval, and the failure mode. A clear trigger-condition-action structure prevents half-built automations.

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 Slack Notifier

    You want a Node.js script called `notify.js` that watches a directory called `uploads/` for new files. When a new file appears, the script should post a message to the Slack channel `#file-alerts` using the Slack Web API. The message should include the filename and file size.…

  • The Notification System

    You want a Node.js script called `alerts.js` that polls a PostgreSQL table called `support_tickets` every 5 minutes for new rows where `priority = 'urgent'` and `notified = false`. For each urgent ticket found, the script should: (1) send an email via SendGrid to the on-call…

Other principles in Constraints