Key Techniques
1. Be Specific and Direct
Bad: "Help me with code" Good: "Write a Python function that takes a list of integers and returns the top 3 most frequent elements. Use type hints and include docstring."
2. Use XML Tags for Structure
<instructions>
Analyze the following code for security vulnerabilities.
Focus on: SQL injection, XSS, authentication bypass.
</instructions>
<code>
{user_code}
</code>3. Chain of Thought
"Think step by step before answering. First identify the problem, then consider approaches, then implement the best one."
4. Few-Shot Examples
Provide 2-3 input/output examples before the actual task.
5. Role Prompting
"You are a senior security researcher with 15 years of experience in web application penetration testing."
6. Prefilled Responses
Start Claude's response with the format you want.