dinerojs/skills

dinero-formatting

Formatting patterns for the Dinero.js money library. Use when displaying monetary values to users, formatting prices with currency symbols, handling locale-specific number formats, or working with non-decimal currencies. Triggers on toDecimal, toUnits, toSnapshot calls, or Intl.NumberFormat usage with Dinero objects.

First seen Feb 28, 2026

Installation

$ npx skills add dinerojs/skills --skill dinero-formatting

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from dinerojs/skills.

npx skills add dinerojs/skills

Browse all from dinerojs/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 2
License LICENSE
Default branch main
Open issues 0
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.0.0
LicenseMIT
More metadata
author
dinerojs
version
1.0.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,487 B
  • docs SUMMARY.md 342 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 309 installs

SKILL.md

Dinero.js Formatting

Patterns for formatting Dinero.js monetary values for display. Covers currency symbols, locale-aware formatting, non-decimal currencies, and serialization.

When to Apply

Reference these guidelines when:

  • Displaying prices, totals, or monetary values in a UI
  • Adding currency symbols or locale-specific formatting
  • Formatting non-decimal currencies (e.g., historical currencies with non-base-10 subdivisions)
  • Serializing Dinero objects for APIs, databases, or transport
  • Building reusable formatting utilities

Rule Categories by Priority

Priority Category Impact Prefix
1 Display CRITICAL display-
2 Locale HIGH locale-
3 Serialization HIGH serialization-
4 Non-Decimal MEDIUM nondecimal-

Quick Reference

1. Display (CRITICAL)

  • display-to-decimal - Use toDecimal for display strings, not toSnapshot
  • display-no-currency-symbols - Dinero.js does not format currency symbols; compose with Intl.NumberFormat

2. Locale (HIGH)

  • locale-intl-formatter - Build reusable formatters with Intl.NumberFormat
  • locale-multilingual - Create locale-parameterized formatters for multilingual sites

3. Serialization (HIGH)

  • serialization-snapshot - Use toSnapshot for transport and storage, not display
  • serialization-bigint-json - BigInt Dinero objects require a custom JSON replacer

4. Non-Decimal (MEDIUM)

  • nondecimal-to-units - Use toUnits for non-decimal currencies, not toDecimal

How to Use

Read individual rule files for detailed explanations and code examples:

rules/display-no-currency-symbols.md
rules/locale-intl-formatter.md

Each rule file contains:

  • Brief explanation of why it matters
  • Incorrect code example with explanation
  • Correct code example with explanation
  • Additional context and references