dinero.js: Skill for Claude Code

.agents/skills/dinero-currency-patterns/SKILL.md

dinero-currency-patterns is a skill for Claude Code, Codex from dinerojs/dinero.js. It costs 71 tokens per session (572 once invoked), scanned A, original, MIT.

Guidance for handling money amounts and currencies with Dinero.js, a JavaScript library for representing monetary values. It covers currency types, conversion, database storage, and payment-service integrations.

In plain words
What is it for?
Use it when converting currencies, defining custom currencies, accepting currency codes from outside systems, designing database storage, or connecting Dinero.js to payment services.
Why use it?
It helps avoid mixing currencies or storing monetary values incorrectly. It also gives patterns for validating currency data and working with services such as Stripe or PayPal.

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-currency-patterns/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-currency-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/dinerojs/dinero.js/dinero-currency-patterns/github.svg)](https://agentmods.dev/skills/dinerojs/dinero.js/dinero-currency-patterns)
Your own site
<a href="https://agentmods.dev/skills/dinerojs/dinero.js/dinero-currency-patterns"><img src="https://agentmods.dev/badge/skills/dinerojs/dinero.js/dinero-currency-patterns/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-currency-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/dinerojs/dinero.js/dinero-currency-patterns"><img src="https://agentmods.dev/badge/skills/dinerojs/dinero.js/dinero-currency-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 572 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.00071 $0.00572
Opus 5 $0.00036 $0.00286
Sonnet 5 $0.00014 $0.00114
Haiku 4.5 $0.00007 $0.00057

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

Security

Grade A, and why

dinero-currency-patterns 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-currency-patterns/SKILL.md · 75 lines

How it starts

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

Dinero.js Currency Patterns

Patterns for handling currencies with Dinero.js: type safety, conversions, custom currencies, database storage, and payment service integration.

When to Apply

Reference these guidelines when:

  • Converting between currencies with convert
  • Defining custom currencies (e.g., cryptocurrencies, loyalty points)
  • Looking up currencies dynamically from external input
  • Storing monetary values in a database
  • Integrating with payment services (Stripe, PayPal, Square)

Rule Categories by Priority

Priority Category Impact Prefix
1 Type Safety HIGH types-
2 Conversion HIGH convert-
3 Storage HIGH storage-
4 Payment Integration MEDIUM payment-

Quick Reference

1. Type Safety (HIGH)

  • types-as-const - Define custom currencies with as const satisfies for compile-time safety
  • types-currency-mismatch - TypeScript catches currency mismatches in operations at compile time
  • types-lookup-validation - Validate currency codes from external sources at runtime

2. Conversion (HIGH)

  • convert-scaled-rates - Use scaled amounts for fractional exchange rates, not floats
  • convert-reusable - Build reusable converter functions with higher-order patterns

3. Storage (HIGH)

  • storage-database - Store amount, currency code, and scale as separate columns
  • storage-no-money-type - Avoid PostgreSQL's money type for multi-currency applications

4. Payment Integration (MEDIUM)

  • payment-services - Map Dinero objects to payment service formats with dedicated helpers

How to Use

Read individual rule files for detailed explanations and code examples:

rules/types-as-const.md
rules/convert-scaled-rates.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

Read the full file on GitHub · 75 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 75 lines · 71 tokens per session scan A 46c8f62ca371

Subscribe to this mod's changes

dinero-currency-patterns is a skill published in the GitHub repository dinerojs/dinero.js (6,792 stars, last pushed today), licensed MIT. It adds 71 tokens to every session and 572 once invoked, about $0.0004 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

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

netsuite-ai-connector-instructions

NetSuite Intelligence skill — teaches AI the correct tool selection order, output formatting, domain knowledge, multi-subsidiary and currency handling, and SuiteQL safety checklist for any AI + NetSuite AI Service Connector session.

oracle/netsuite-suitecloud-sdk · 52 tokens

netsuite-finance-analyst

Use this skill when the user needs NetSuite-based finance analysis, Director of Financial Analysis support, period-close guidance, variance review, reconciliation review, cash reporting, or executive-ready financial narrative generation. Apply it to requests involving income statements, balance sheets, cash flow…

oracle/netsuite-suitecloud-sdk · 124 tokens

nfeio-node-sdk

NFE.io Node.js SDK integration expert (package: nfe-io). MUST trigger when: code imports 'nfe-io' or references NfeClient; user mentions NFE.io, NFS-e, NF-e, CT-e, CF-e, CFe-SAT, nota fiscal, nota fiscal eletronica, Brazilian invoice, fiscal document, electronic invoice Brazil, CNPJ lookup, CPF lookup, service…

nfe/client-nodejs · 264 tokens