Compressed caveman-style prose for AI coding agents — cuts ~65% output tokens while keeping full technical accuracy
96
100%
Does it follow best practices?
Impact
96%
1.00xAverage score across 38 eval scenarios
Passed
No known issues
Write a Python decorator @require_role("admin") for a Flask API that checks if the current user (from a JWT in the Authorization header) has the required role. Return 401 if no token, 403 if wrong role. The decorator should work with any role string and preserve the wrapped function's metadata.
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
scenario-11
scenario-12
scenario-13
scenario-14
scenario-15
scenario-16
scenario-17
scenario-18
scenario-19
scenario-20
scenario-21
scenario-22
scenario-23
scenario-24
scenario-25
scenario-26
scenario-27
scenario-28
scenario-29
scenario-30
scenario-31
scenario-32
scenario-33
scenario-34
scenario-35
scenario-36
scenario-37