Install any skill in seconds. Free to start, no credit card required.
Get Started Free →dpearson2699/swift-formatstyle
Formats and parses locale-aware numbers, decimals, currencies, percentages, dates, durations, measurements, names, lists, byte counts, and URLs with Foundation FormatStyle and ParseableFormatStyle.
Passed 11 of 22 test cases with the skill, and 11 of 22 without it.
2 fixed18 passed either way1 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
In an iOS application, I want to format relative dates relative to a fixed past anchor point using `Date.AnchoredRelativeFormatStyle`. What minimum iOS deployment target is required for this specific Foundation API?
| Checked | Without skill | With skill |
|---|---|---|
| Identifies iOS 18 as the minimum availability requirement for `Date.AnchoredRelativeFormatStyle`. | Missed | Passed |
The instructions your model reads when the skill loads.
Use Foundation's type-safe FormatStyle APIs for user-facing display and ParseableFormatStyle when the same convention must accept input. Route String Catalogs, plurals, localized copy, bundles, and RTL layout to ios-localization; formatting still requires locale review even when no text is translated.
en_US, de_DE, ar_SA, and ja_JP.Load FormatStyle Recipes when implementation needs concrete modifiers, date intervals, relative dates, duration patterns, measurements, names, lists, byte counts, or URL component controls.
| Value | Default style | Important constraint |
|---|---|---|
Int, Double | .number | Configure precision, rounding, grouping, notation, or sign only as required. |
Decimal | .number, .percent, .currency(code:) | Prefer for exact decimal display and parsing. |
| Currency | .currency(code:) | Pass an ISO 4217 code; never hardcode a symbol. |
| Percent | .percent | Confirm whether the input is a fraction (0.85) or whole percent (85). |
Date | .dateTime, .relative, .interval | Relative output should usually stand alone, not be embedded in a sentence. |
Duration | .time(pattern:), .units(allowed:width:) | Requires iOS 16+; choose compact clock output versus labeled units. |
Measurement | .measurement(width:usage:) | usage: controls locale-aware conversion policy. |
PersonNameComponents | .name(style:) | Do not manually concatenate name parts. |
| Collections | .list(type:width:) | Let locale rules choose separators and conjunctions. |
| Byte count | .byteCount(style:) | Choose file, memory, decimal, or binary semantics deliberately. |
test cases passed, vs 11 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.