Skip to content

Commit 1d5f270

Browse files
Nick Sullivanclaude
andcommitted
✨ Add three key principles to prompt engineering guide
- Explain motivation: why constraints exist helps LLMs generalize - Descriptive over directive: avoid aggressive MUST/CRITICAL language - Positive framing: state what TO do, not what to avoid 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 44a107d commit 1d5f270

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.cursor/rules/prompt-engineering.mdc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ you create for LLM consumption.
3939
prompts
4040
- Examples teach patterns: What you show is what the LLM will do
4141
- Clarity over brevity: Never sacrifice unambiguous interpretation for token savings
42+
- Explain motivation: Tell the LLM *why* a constraint exists - it generalizes from
43+
reasoning better than from bare rules
44+
- Descriptive over directive: "Use this tool when modifying files" works better than
45+
"CRITICAL: You MUST use this tool" - aggressive language can cause over-triggering
46+
- Positive framing: "Write in flowing prose" is clearer than "Don't use markdown" -
47+
positive instructions are unambiguous, negative ones require constructing then negating
4248

4349
## Pattern Reinforcement Through Examples
4450

0 commit comments

Comments
 (0)