← All skills

Prompt Engineering

Hard-Constraint Prompt

When the AI keeps drifting, lock it down. Word limits, banned phrases, mandatory sections, exact format.

Step 1

Get the skill

Pick one. Copy to paste straight away, or download constraint-prompt.md to keep.

Step 2

Paste it into your AI

Use when you keep getting "almost right" outputs. Banned-word lists are the highest leverage constraint.

Preview the skill· what gets copied
Generate the output under these HARD constraints.

Task: {{TASK}}

Constraints (any violation is a fail, re-generate):
- Word count: between {{MIN}} and {{MAX}}
- Banned words: {{LIST}}
- Mandatory sections: {{LIST}}
- Tone: {{TONE}}
- Format: {{FORMAT}}
- Must NOT mention: {{LIST}}

Before returning, do a constraint check. If anything fails, fix it silently and return only the compliant output.

Works with: Claude · ChatGPT · Gemini · Any model

By Rishi Jain