10_instruction_stress — Claude Code prompt: how it works
10_instruction_stress is a Claude Code prompt that tests whether a model follows four simultaneous constraints while describing an imaginary coffee shop.
MIT ★ 2,744 updated 2026-10-08
.claude/commands/10_instruction_stress.mdWhat 10_instruction_stress does
This benchmark prompt implements IFEval-style stacked constraints to test model adherence. Claude Code must compose a description of an imaginary coffee shop while respecting four conditions at the same time: an exact length of 50 words, zero commas, strictly lowercase text, and the token "foo" appearing exactly twice.
The prompt supplies an embedded Python validator function named check. It splits the output into tokens, confirms the word total equals 50, verifies zero comma characters, and tallies standalone occurrences of "foo". Any conversational filler or stray uppercase letter causes the check to fail.
Testing stacked rules reveals where an LLM drops negative constraints under pressure.
What it helps with
- test model adherence to stacked negative constraints
- generate creative text with a strict 50 words boundary
- verify model output using an embedded Python validator
Example prompts for the agent
- Run the 10_instruction_stress benchmark prompt in Claude Code
- Test model output against the check function in 10_instruction_stress
- Generate the coffee shop prompt using .claude/commands/10_instruction_stress.md
How to install 10_instruction_stress
Manually: put the files in place
.claude/commands/10_instruction_stress.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about 10_instruction_stress
How to install 10_instruction_stress in Claude Code?
Save the prompt template to .claude/commands/10_instruction_stress.md in your project repository.
What does 10_instruction_stress test?
It evaluates whether the model can write exactly 50 words without commas, in all lowercase, with "foo" appearing twice.
How is the prompt output validated?
The file includes a Python check predicate that verifies word count, forbidden commas, and target keyword matches.
Source text
10_instruction_stress.md · MIT
---
name: instruction_stress
content_shape: instruction-stacked
reference_tokens_per_char: 0.25
description: IFEval-style stacked constraints — exactly 50 words, no commas, "foo" appears exactly twice, all lowercase.
---
[session-metrics:compare-suite:v2:prompt=instruction_stress]
Write a short description of a fictional coffee shop. The description MUST satisfy ALL of the following constraints simultaneously:
1. EXACTLY 50 words.
2. ZERO commas in the output.
3. The word `foo` appears EXACTLY TWICE.
4. All characters lowercase (no capital letters anywhere).
Output only the description — no preamble, no trailing commentary.
<!-- PREDICATE -->
````python
def check(text: str) -> bool:
if "," in text: return False
if text != text.lower(): return False
words = text.split()
if len(words) != 50: return False
# Count occurrences of "foo" as a standalone word (case-insensitive).
foo_count = sum(1 for w in words if w.strip(".!?:;-") == "foo")
return foo_count == 2
````
© centminmod · MIT · centminmod/my-claude-code-setup