dinero.js: Skill for Claude Code

.agents/skills/dinero-best-practices/SKILL.md

dinero-best-practices is a skill for Claude Code, Codex from dinerojs/dinero.js. It costs 70 tokens per session (728 once invoked), scanned A, original, MIT.

Coding guidance for Dinero.js, a JavaScript and TypeScript library for representing and calculating money safely.

In plain words
What is it for?
Use it when creating money values, adding or splitting amounts, multiplying prices, handling taxes, or choosing between regular-number and large-integer calculations.
Why use it?
It helps prevent incorrect totals, rounding errors, and mistakes when money comes from users, APIs, or databases.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is dinerojs/dinero.js's own configuration. It tells Claude Code and Codex how to work on dinero.js itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything dinero.js configures →

About the project

Dinero.js is a JavaScript and TypeScript library for representing, calculating, comparing, converting, and formatting monetary values. Applications use it to handle currencies and amounts with immutable operations, configurable numeric precision, and support for currencies with non-decimal subdivisions. Its catalogue skills guide coding agents in using the library.

dinerojs/dinero.js · 6,792 stars · on GitHub · dinerojs.com

Reuse

Borrowing it

Nothing to install: this file belongs to dinerojs/dinero.js. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dinerojs/dinero.js/main/.agents/skills/dinero-best-practices/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/dinerojs/dinero.js

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dinero-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/dinerojs/dinero.js/dinero-best-practices/github.svg)](https://agentmods.dev/skills/dinerojs/dinero.js/dinero-best-practices)
Your own site
<a href="https://agentmods.dev/skills/dinerojs/dinero.js/dinero-best-practices"><img src="https://agentmods.dev/badge/skills/dinerojs/dinero.js/dinero-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dinero-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/dinerojs/dinero.js/dinero-best-practices"><img src="https://agentmods.dev/badge/skills/dinerojs/dinero.js/dinero-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 728 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.00728
Opus 5 $0.00035 $0.00364
Sonnet 5 $0.00014 $0.00146
Haiku 4.5 $0.00007 $0.00073

Measured 11d ago against content hash 3284558f2e6c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

dinero-best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.agents/skills/dinero-best-practices/SKILL.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

Priority Category Impact Prefix
1 Object Creation CRITICAL creation-
2 Arithmetic CRITICAL arithmetic-
3 Precision HIGH precision-
4 Imports MEDIUM imports-

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

Read the full file on GitHub · 79 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 79 lines · 70 tokens per session scan A 3284558f2e6c

Subscribe to this mod's changes

dinero-best-practices is a skill published in the GitHub repository dinerojs/dinero.js (6,792 stars, last pushed yesterday), licensed MIT. It adds 70 tokens to every session and 728 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

alpaca-trade-api-sdk

Integrate and build on the @alpacahq/alpaca-trade-api TypeScript SDK for the Alpaca Trading and Market Data APIs (the unified Alpaca client, ergonomic order builders, normalized market-data shapes, pagination, typed errors, resilience, and real-time streaming). Use when writing or reviewing code that imports…

alpacahq/alpaca-trade-api-js · 123 tokens

starter-dashboard

Scaffold a local Next.js Alpaca dashboard using the published @alpacahq/alpaca-trade-api SDK for paper Trading API and Market Data API workflows. Use when the user asks for starter-dashboard, a starter Alpaca dashboard, a local Trading API demo, a Market Data API dashboard, or a greenfield Next.js Alpaca SDK prototype.

alpacahq/alpaca-trade-api-js · 75 tokens

reviewing-personhog-protocol

The full review process for personhog coordination-protocol changes — leases, fencing, handoffs, supervisors, failure budgets, warming, and changelog semantics. Use before pushing or requesting review on any personhog protocol changeset, when asked for an exhaustive or careful review of personhog code, and after any…

PostHog/posthog · 111 tokens

modeling-revenue-metrics

Build reusable revenue models — MRR, ARR, gross revenue, new/expansion/contraction/churn, ARPU, LTV, and per-customer/per-account revenue — on either PostHog data-warehouse views (HogQL) or an external dbt project. Use when the user wants to model, define, or compute recurring revenue, monthly/annual recurring…

PostHog/posthog · 231 tokens

auditing-llm-gateway-parity

Audits services/llm-gateway against PostHog/ai-gateway and updates services/llm-gateway/PARITY.md from current implementation evidence. Use when either gateway changes auth, attribution, billing, endpoints, providers, models, routing, or metadata; when reviewing a Python gateway change; or when asked to refresh…

PostHog/posthog · 97 tokens

django-startup-time

Keep heavy imports off the django.setup() path that every process (web, celery, temporal, migrate, shell, CI) pays for. Use when touching AppConfig.ready(), wiring signal receivers, editing the lazy API router (posthog/api/restrouter.py or its init.py shim), deferring a heavy import, when the startup-import-budget…

PostHog/posthog · 93 tokens