There are dozens of “prompting techniques” floating around the internet. Most are noise. These five are what I use in production with measurable impact.

1. Specific role + context, not generic

“You are an expert in X” is too vague. A useful role includes specific domain context and the constraints that apply.

Instead of: "You are a TypeScript expert", try: "You are a senior engineer reviewing TypeScript code for production. The codebase uses Node.js 20, strict mode, and Drizzle ORM. You prioritize security over brevity." The difference in output quality is noticeable.

2. Explicit output format

If you don’t say how you want the output, Claude will choose. Sometimes it chooses well; often it doesn’t. Specify: type (list, JSON, code, markdown), approximate length, and what to include/exclude.

"Respond with a JSON array. Each object has: { error: string, severity: 'low'|'medium'|'high', fix: string }. No additional explanations."

3. Chain-of-thought for complex tasks

For complex reasoning, explicitly asking for the process improves output quality. "Think step by step before answering" activates a more careful reasoning mode. It’s especially useful in debugging and code analysis where the first impulse is often wrong.

4. Few-shot examples for exact format

When format matters (and it almost always does), one example is worth a thousand description words. Show input → expected output before giving the real task. With two or three examples, Claude replicates the pattern with high fidelity.

5. Explicit negative constraints

“Don’t do X” is as important as “do Y”. Negative constraints prevent default behaviors you don’t want: "Don't explain the code you generate", "Don't use comments", "Don't add unnecessary error handling".

Without explicit constraints, Claude tends to be “helpful” by adding things you didn’t ask for. In an automated pipeline that’s noise, not value.