Install any skill in seconds. Free to start, no credit card required.
Get Started Free →tryghost/Format numbers
Format numbers using the formatNumber function from Shade whenever someone edits a TSX file.
Passed 17 of 19 test cases with the skill, and 3 of 19 without it.
and 10 more in the full report
17 fixed3 passed either way2 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 16 test cases the skill fixed. Same model, same prompt, with and without the skill.
In LinkClickBadge.tsx, render link.count which may be undefined or null, falling back to 0. Apply our required number formatting utility.
| Checked | Without skill | With skill |
|---|---|---|
| Imports formatNumber from @tryghost/shade/utils | Missed | Passed |
| Passes link.count fallback expression into formatNumber | Passed | Passed |
The instructions your model reads when the skill loads.
When editing .tsx files, ensure all user-facing numbers are formatted using the formatNumber utility from @tryghost/shade/utils.
import { formatNumber } from '@tryghost/shade/utils';
Use formatNumber() when rendering any numeric value that is displayed to the user, including:
centsToDollars() for monetary values)<span>{formatNumber(totalMembers)}</span>
<span>{formatNumber(link.count || 0)}</span>
<span>{`${currencySymbol}${formatNumber(centsToDollars(mrr))}`}</span>
<span>{post.members > 0 ? `+${formatNumber(post.members)}` : '0'}</span>
Do NOT use any of these patterns for formatting numbers in TSX files:
// BAD: raw .toLocaleString()
<span>{count.toLocaleString()}</span>
// BAD: manual Intl.NumberFormat
<span>{new Intl.NumberFormat('en-US').format(count)}</span>
test cases passed, vs 3 / 19 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.