Agent skill

Dinero Best Practices

by dinerojs in dinerojs/dinero.js

Core best practices for the Dinero.js money library. An agent skill from dinerojs/dinero.js.

MITAuto-check passedDevelopment

Install Dinero Best Practices

skills CLI
$ npx skills add dinerojs/dinero.js --skill dinero-best-practices -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dinerojs/dinero.js dinero-best-practices --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dinerojs/dinero.js.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/dinero-best-practices .claude/skills/dinero-best-practices && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dinero-best-practices
GitHub stars
6.8k
Token cost
~756 tokens
SKILL.md length
263 words
Files
13
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

Core best practices for the Dinero.js money library. An agent skill from dinerojs/dinero.js.

  • Works in 4 steps: Object Creation (CRITICAL) → Arithmetic (CRITICAL) → Precision (HIGH) → …
  • Refactoring code that creates Dinero objects
  • SKILL.md covers When to Apply, Rule Categories by Priority, Quick Reference and How to Use
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Dinero Best Practices is an agent skill from dinerojs/dinero.js. Core best practices for the Dinero.js money library. Use when writing, reviewing, or refactoring code that creates Dinero objects, performs arithmetic on monetary values, or handles money in JavaScript/TypeScript. Triggers on imports from 'dinero.js', monetary calculations, or price/cost handling logic.

Its SKILL.md is about 760 tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files (for example `rules/arithmetic-allocate-not-divide.md`, `rules/arithmetic-immutability.md` and `rules/arithmetic-percentages.md`).

It sits in Development, covering Refactoring. It works with JavaScript and TypeScript. The repository describes itself as: Create, calculate, and format money in JavaScript and TypeScript. The licence is MIT.

When your agent uses it

  • Refactoring code that creates Dinero objects
  • Performs arithmetic on monetary values
  • Handles money in JavaScript/TypeScript
  • Imports from dinero.js

Example prompts

  • “dinero.js”
  • “/dinero-best-practices”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Object Creation (CRITICAL)
  2. Arithmetic (CRITICAL)
  3. Precision (HIGH)
  4. Imports (MEDIUM)

What it can do on your machine

Read from SKILL.md and the folder at commit 76b969e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • v2.dinerojs.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dinero Best Practices loads about 756 tokens when it runs. Until then it costs about 82 tokens; SKILL.md has 263 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~82
When it runs · the whole SKILL.md, loaded when a task matches
~756

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from dinerojs/dinero.js at commit 76b969e, republished under its MIT licence (© dinerojs). 263 words, ~756 tokens.

Download SKILL.mdSave it as .claude/skills/dinero-best-practices/SKILL.md (or your agent's skills folder). This skill also uses 12 other files; get the full folder from GitHub.
name
dinero-best-practices
description
Core best practices for the Dinero.js money library. Use when writing, reviewing, or refactoring code that creates Dinero objects, performs arithmetic on monetary values, or handles money in JavaScript/TypeScript. Triggers on imports from 'dinero.js', monetary calculations, or price/cost handling logic.
license
MIT
metadata.author
dinerojs
metadata.version
1.0.0

Dinero.js Best Practices

Core rules for working with Dinero.js, the JavaScript/TypeScript library for creating, calculating, and formatting money safely. Contains rules across 4 categories, prioritized by impact.

When to Apply

Reference these guidelines when:

  • Creating Dinero objects from user input, API responses, or database values
  • Performing arithmetic on monetary values (adding, splitting, multiplying)
  • Choosing between number and bigint calculators
  • Importing from dinero.js, dinero.js/currencies, or dinero.js/bigint
  • Working with prices, costs, taxes, or any financial calculation

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Object CreationCRITICALcreation-
2ArithmeticCRITICALarithmetic-
3PrecisionHIGHprecision-
4ImportsMEDIUMimports-

Quick Reference

1. Object Creation (CRITICAL)
  • creation-minor-units - Always pass amounts as integers in minor currency units
  • creation-from-floats - Use a helper to convert float inputs to minor units
  • creation-zero-exponent - Currencies with exponent 0 (e.g., JPY) take major units directly
2. Arithmetic (CRITICAL)
  • arithmetic-immutability - All operations return new objects; capture the return value
  • arithmetic-allocate-not-divide - Use allocate for splitting money, not manual division
  • arithmetic-scaled-amounts - Never multiply by a raw decimal; use scaled amounts
  • arithmetic-percentages - Calculate percentages with allocate or scaled multiply
3. Precision (HIGH)
  • precision-bigint - Use dinero.js/bigint for amounts exceeding Number.MAX_SAFE_INTEGER
  • precision-crypto - Cryptocurrencies require bigint due to high exponents
  • precision-trim-scale - Use trimScale to remove trailing zeros after chained operations
4. Imports (MEDIUM)
  • imports-tree-shaking - Import only what you use; standalone functions enable tree-shaking
  • imports-bigint-currencies - Match calculator type: use dinero.js/bigint/currencies with dinero.js/bigint

How to Use

Read individual rule files for detailed explanations and code examples:

rules/creation-minor-units.md
rules/arithmetic-allocate-not-divide.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

© dinerojs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 12 other files in .agents/skills/dinero-best-practices of dinerojs/dinero.js.

  • SKILL.md
  • rules/arithmetic-allocate-not-divide.md
  • rules/arithmetic-immutability.md
  • rules/arithmetic-percentages.md
  • rules/arithmetic-scaled-amounts.md
  • rules/creation-from-floats.md
  • rules/creation-minor-units.md
  • rules/creation-zero-exponent.md
  • rules/imports-bigint-currencies.md
  • rules/imports-tree-shaking.md
  • rules/precision-bigint.md
  • rules/precision-crypto.md
  • rules/precision-trim-scale.md

Open the folder on GitHubat commit 76b969e

Compare with similar skills

Dinero Best Practices next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dinero Best Practices compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dinero Best Practices this skilldinerojs/dinero.js6.8k—~756Automated safety check: PassMIT
ast-grep Codemod Referencewarp-drive-data/warp-drive3.2k—~2.6kAutomated safety check: PassMIT
DRY Refactoring With jscpdkucherenko/jscpd6.4k—~2.1kAutomated safety check: PassMIT
Coding Agentmastra-ai/mastra29k—~2.3kAutomated safety check: PassCustom licence
jscpd Duplicate Code Detectorkucherenko/jscpd6.4k—~4.5kAutomated safety check: PassMIT
Crowdin API Clientcrowdin/crowdin-cli320—~1.1kAutomated safety check: PassMIT

Similar skills

  • ast-grep Codemod Reference

    warp-drive-data/warp-drive

    Reference for writing and debugging TypeScript and JavaScript codemods with @ast-grep/napi: parsing, node queries, meta-variables, rule objects and editing.

    3.2k GitHub stars~2.6k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Removes copy-paste duplication found by jscpd, starting with exact clones and hotspots, then renamed and near-miss copies, using proven refactoring strategies.

    6.4k GitHub stars~2.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Coding Agent

    mastra-ai/mastra

    Authoring playbook for building agents that write, edit, review, or refactor code.

    29k GitHub stars~2.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Finds duplicated code in 220+ languages with jscpd, reports exact, renamed and near-miss clones in a compact agent-friendly format and measures duplication.

    6.4k GitHub stars~4.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Crowdin API Client

    crowdin/crowdin-cli

    A skill your agent uses when implementing, refactoring, or reviewing @crowdin/crowdin-api-client usage in any JavaScript or TypeScript project, especially for endpoint selection, request/response…

    320 GitHub stars~1.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Typescript Best Practices

    jwynia/agent-skills

    Guide AI agents through TypeScript coding best practices including type safety, error handling, code organization, and architecture patterns.

    170 GitHub stars~2.5k tokensUpdated 7 mo ago
    DevelopmentAuto-check passed

More from dinerojs/dinero.js

  • Commit

    dinerojs/dinero.js

    Create a git commit with optional automatic Linear issue linking.

    6.8k GitHub stars~667 tokensUpdated 5 days ago
    Auto-check passed
  • Dinero Currency Patterns

    dinerojs/dinero.js

    Currency handling patterns for the Dinero.js money library. An agent skill from dinerojs/dinero.js.

    6.8k GitHub stars~650 tokensUpdated 5 days ago
    Auto-check passed
  • Dinero Formatting

    dinerojs/dinero.js

    Formatting patterns for the Dinero.js money library. An agent skill from dinerojs/dinero.js.

    6.8k GitHub stars~622 tokensUpdated 5 days ago
    Auto-check passed

Categories

Questions about Dinero Best Practices

What does Dinero Best Practices do?

Core best practices for the Dinero.js money library. An agent skill from dinerojs/dinero.js. js.js money library.

When should I use Dinero Best Practices?

Dinero Best Practices fits situations like: refactoring code that creates Dinero objects; performs arithmetic on monetary values; handles money in JavaScript/TypeScript; imports from dinero.js.

How do I install Dinero Best Practices in Claude Code?

Run `npx skills add dinerojs/dinero.js --skill dinero-best-practices -a claude-code`. Or copy the skill folder (.agents/skills/dinero-best-practices in dinerojs/dinero.js) into .claude/skills/dinero-best-practices in your project. Claude Code loads it when a task matches its description.

How do I install Dinero Best Practices in Codex?

Run `npx skills add dinerojs/dinero.js --skill dinero-best-practices -a codex`. Or copy the skill folder (.agents/skills/dinero-best-practices in dinerojs/dinero.js) into .agents/skills/dinero-best-practices in your project. Codex loads it when a task matches its description.

Can I use Dinero Best Practices in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dinerojs/dinero.js --skill dinero-best-practices -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dinero-best-practices, .gemini/skills/dinero-best-practices, .github/skills/dinero-best-practices and .opencode/skills/dinero-best-practices in your project.

What does Dinero Best Practices need to run?

SKILL.md names no scripts, command-line tools or credentials: Dinero Best Practices is instructions for the agent only.

Does Dinero Best Practices access the network?

SKILL.md names 1 domain. As links in the text: v2.dinerojs.com. This is read from the text; nothing was executed.

Is Dinero Best Practices safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dinero Best Practices use?

Dinero Best Practices is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dinero Best Practices use?

About 756 tokens (SKILL.md is roughly 3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Dinero Best Practices?

Skills that share tags, products or a category with Dinero Best Practices: ast-grep Codemod Reference (warp-drive-data/warp-drive, 3.2k stars), DRY Refactoring With jscpd (kucherenko/jscpd, 6.4k stars), Coding Agent (mastra-ai/mastra, 29k stars) and jscpd Duplicate Code Detector (kucherenko/jscpd, 6.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dinero Best Practices?

dinerojs (a GitHub organization) maintains it in dinerojs/dinero.js, which has 6,804 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 5, 2026.

Source: dinerojs/dinero.js on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.