Wordwrap a string with ANSI escape codes
100
Pending
Does it follow best practices?
Impact
100%
1.04xAverage score across 10 eval scenarios
Pending
The risk profile of this skill
{
"context": "This criteria evaluates how effectively the engineer uses the wrap-ansi package to handle text wrapping while correctly calculating visual width and ignoring ANSI escape codes. The focus is on using the appropriate package functions and options to achieve proper terminal text formatting.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses wrapAnsi function",
"description": "The solution imports and uses the wrapAnsi function (or default export) from the wrap-ansi package as the primary mechanism for text wrapping",
"max_score": 30
},
{
"name": "Passes column width",
"description": "The columnWidth parameter is correctly passed as the second argument to wrapAnsi to control the maximum line width",
"max_score": 15
},
{
"name": "Handles hard wrapping",
"description": "The solution uses the hard: true option to ensure long words that exceed the column width are broken across lines, preventing any line from exceeding the specified width",
"max_score": 25
},
{
"name": "Preserves ANSI codes",
"description": "The solution correctly relies on wrap-ansi's built-in ANSI code preservation without attempting to manually strip, parse, or re-insert ANSI escape sequences",
"max_score": 20
},
{
"name": "Returns wrapped string",
"description": "The solution returns the result from wrapAnsi directly (or with minimal processing) rather than implementing custom wrapping logic",
"max_score": 10
}
]
}docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10