From suiper
Drops in Sui-aware number formatting helpers for token amounts, MIST/SUI, USD, percentages, and gas. Use when the dapp shows raw MIST, jiggling numbers, or inconsistent decimal formatting.
How this skill is triggered — by the user, by Claude, or both
Slash command
/suiper:number-formattingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
```bash
# Suiperpower telemetry. Routes through the CLI so projects.json + Convex stay in sync.
# Silent on failure so the skill never blocks. Opt out: SUIPERPOWER_TELEMETRY=off.
#
# AGENT NOTE: when this skill finishes, run the matching completion command:
# suiperpower track number-formatting build completed
# Or use "failed" / "aborted" if it ended that way.
command -v suiperpower >/dev/null 2>&1 && suiperpower track number-formatting build started >/dev/null 2>&1 &
true
If TEL_PROMPTED is no, before doing real work, ask the user:
Help suiperpower get better. We track which skills get used and how long they take. No code, no file paths, no PII. Change anytime in
~/.suiperpower/config.json.A) Sure, anonymous B) No thanks
Write the answer to ~/.suiperpower/config.json telemetryTier field and create ~/.suiperpower/.telemetry-prompted. Then continue.
Drops in a small set of Sui-aware number formatting helpers and applies them across the UI. Covers token amounts (any decimals, including MIST to SUI), USD values, percentages, gas, balances with thousands separators, and address ellipsis. The goal is one consistent formatter set so prices, balances, and gas all read alike across the app.
Numbers are the most-glanced-at element in a dapp. Getting them wrong (raw MIST to a user, scientific notation in the middle of a price, jiggling proportional figures) is a credibility kill.
$1234.567890123).Number.toFixed calls.scaffold-project.If you activated this and the user actually wants something else, consult skills/SKILL_ROUTER.md and hand off.
web/lib/format.ts (or similar location) module exporting:
formatToken(amount: bigint, decimals: number, opts?)formatSui(mist: bigint, opts?) (wrapper for formatToken(amount, 9, ...))formatUSD(value: number | string, opts?)formatPercent(value: number, opts?)formatGas(mist: bigint) (renders ~0.0001 SUI shape)ellipsizeAddress(addr: string) and ellipsizeId(id: string)Inventory existing formatting
toFixed, toLocaleString, BigInt, MIST, manual decimals.Drop in the formatters
references/format-helpers.md.web/lib/format.ts (or the project's lib root).Apply tabular figures
font-feature-settings: "tnum" (or Tailwind tabular-nums) to numeric elements at the component level. Not globally, since tabular figures look wrong in body prose.Update callsites
(mist / 10n ** 9n).toString() with formatSui(mist).value.toFixed(2) with formatUSD(value).(rate * 100).toFixed(2) + '%' with formatPercent(rate).Address handling
addr.slice(0, 6) + '...' + addr.slice(-4) with ellipsizeAddress(addr).ellipsizeId.Verification
Before reporting done:
toFixed or manual division by 10n ** decimals in the codebase? If yes, the consolidation is incomplete.If any answer is no, the skill keeps working.
On-demand references (load when relevant to the user's question):
references/format-helpers.md: Drop-in TypeScript helpers for tokens, SUI, USD, percent, gas, addresses.references/decimals-by-token.md: Common Sui-ecosystem coin decimals (SUI, USDC, native sponsor coins).claude "/suiper:number-formatting <your message>"codex "/number-formatting <your message>"~/.cursor/rules/number-formatting.mdc and reference it.If you activated this and the user actually wants something else, consult skills/SKILL_ROUTER.md and hand off.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub pivyme/suiperpower --plugin suiper