Skip to main content
The quality of your automation depends on the quality of your prompt. Here’s how to write prompts that get reliable results.

Be Specific

Vague prompts lead to unpredictable results. Define exactly what you want. Vague:
Check for new issues and do something with them
Specific:
1. Find Linear issues created in the last 24 hours with label "bug"
2. For each issue, check if it has reproduction steps
3. If missing reproduction steps, comment: "Please add reproduction steps to help us fix this faster"
4. If it has reproduction steps, add label "triaged"

Use Numbered Steps

Structure your prompt as a numbered sequence. This helps the AI follow a clear path and makes debugging easier.
1. Fetch all PRs merged to main in the last 24 hours
2. Group PRs by type (feature, bugfix, chore)
3. For each group, format as a bulleted list with PR titles and links
4. Post to #changelog with today's date as the header
5. If no PRs were merged, skip posting

Include Edge Cases

Tell the automation what to do when things go wrong or when there’s nothing to do.
1. Try to fetch data from API
2. If API returns an error:
   - Log the error
   - Post a brief error message to #automation-errors
   - Do not spam the team channel
3. If no data is found:
   - Skip posting (don't post "no updates")
4. Continue to next step

Conditional Logic

Use clear if/then language to handle different scenarios.
If the PR has changes to the database schema:
  - Request review from @database-team
  - Run database migration checks
  - Add label "needs-migration-review"
Otherwise:
  - Follow standard review process
Common conditions:
  • File path patterns (if changes include /api/*)
  • PR size thresholds (if more than 500 lines changed)
  • Time-based (if during business hours)
  • Priority levels (if priority is urgent)

Format Output for Readability

Specify how output should be formatted. Slack messages are easier to scan when well-structured. Good format:
Use Slack Block Kit to format with:
- A header with today's date
- Sections for each category
- Bullet points for each item
- Links to relevant PRs

Example output:
✨ New Features
• User authentication - PR #123
• Dark mode support - PR #456

🐛 Bug Fixes
• Fixed login redirect - PR #789
Bad format:
New feature user authentication in PR 123 and dark mode in PR 456. Also fixed bug with login redirect in PR 789.
Always provide links back to the source so team members can take action.
For each item, include:
- GitHub PR or issue link
- Linear issue link if connected
- Commit SHA for code changes
- Direct link to logs or dashboards

Use Variables for Configuration

Make prompts flexible by calling out configurable values.
Configuration:
- STALE_THRESHOLD: 14 days
- TARGET_CHANNEL: #standup
- PRIORITY_THRESHOLD: high

Find issues older than {STALE_THRESHOLD} that are {PRIORITY_THRESHOLD} priority...
Post results to {TARGET_CHANNEL}...
This makes it easy to adjust behavior without rewriting the whole prompt.

Document Your Intent

Add a brief comment at the top explaining what the automation does. This helps when revisiting the automation later.
# Purpose: Weekly stale issue reminder
# Posts to: #standup every Monday
# Threshold: Issues not updated in 14+ days

1. Find all open Linear issues that haven't been updated in 14 days...