money-boundary-judgment
Skill6 starsChanged 34 days agoMITView on GitHub
How to cross an API that forces Double (framework parameters, chart plot values, any Double-only library) without breaking a "Decimal for money" rule. Use when a lint flags decimal-for-money, or when writing code that converts between Double and Decimal for monetary values.
In this repository79 other files it gives its agents.
- adr-phase-coverageSkill
- aposd-red-flag-reviewSkill
- apple-on-device-aiSkill
- artifact-gatesSkill
- asc-app-create-uiSkill
- asc-build-lifecycleSkill
- asc-cli-usageSkill
- asc-crash-triageSkill
- asc-id-resolverSkill
- asc-localize-metadataSkill
- asc-metadata-syncSkill
- asc-notarizationSkill
- asc-ppp-pricingSkill
- asc-release-flowSkill
- asc-revenuecat-catalog-syncSkill
- asc-shots-pipelineSkill
- asc-signing-setupSkill
- asc-submission-healthSkill
- asc-subscription-localizationSkill
- asc-testflight-orchestrationSkill
- asc-wall-submitSkill
- asc-workflowSkill
- asc-xcode-buildSkill
- choose-boring-technologySkill
- ci-preflightSkill
- conways-lawSkill
- cost-routingSkill
- cost-tier-routingSkill
- cunninghams-lawSkill
- ddd-strategic-auditSkill
- ddd-tactical-reviewSkill
- debug-test-captureSkill
- developing-ios-appsSkill
- doerrs-lawSkill
- fitts-lawSkill
- fix-regression-guardSkill
- galls-lawSkill
- goodharts-lawSkill
- greenspuns-tenth-ruleSkill
- gsd-core-hooksSkill
- hofstadters-lawSkill
- hyrums-lawSkill
- ios-accessibilitySkill
- ios-simulator-boot-healthSkill
- kerckhoffs-principleSkill
- kernighans-lawSkill
- knuths-optimization-principleSkill
- lady-lovelaces-objectionSkill
- leaky-abstractionsSkill
- linuss-lawSkill
- mobile-ios-designSkill
- moores-lawSkill
- no-deferSkill
- norvigs-lawSkill
- parkinsons-lawSkill
- peter-principleSkill
- postels-lawSkill
- post-fix-traceSkill
- qa-test-architectSkill
- rubber-duckSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Check the API's accepted types in the framework's current documentation before assuming.
- Very specific: line 27
Put // money-boundary: <which framework, which direction> on the declaration line, for example // money-boundary: charts plot value, …
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
money-boundary-judgment
Policy assumed: all monetary values are Decimal. Some frameworks only accept Double. The rule is kept by converting exactly once, at the edge, in the right direction.
1. Is Double actually forced?
Check the API's accepted types in the framework's current documentation before assuming. If Decimal works, use it and stop.
2. Which direction?
| Direction | Where it happens | Rule |
| Decimal -> Double | Display-only sinks (chart plot values, progress) | Convert at the last line before the framework (NSDecimalNumber(decimal:).doubleValue). The Double never flows back into money math. |
| Double -> Decimal | Inputs (framework parameters, parsed numbers) | Do not use Decimal(double): it carries binary error (e.g. 0.1 becomes 0.1000000000000000055...). Go through a string or round to currency minor units, then use only the Decimal. |
3. Is there math on the Double side?
Averages, sums, percentages of money are computed in Decimal first and converted after. A Double on a money-named variable that feeds arithmetic is not a boundary; it is the bug.
4. Mark it
Put // money-boundary: <which framework, which direction> on the declaration line, for example // money-boundary: charts plot value, Decimal -> Double. This is an optional convention: any linter or grep-based check for Double-typed money variables can look for the marker and accept the line, and the reason stays on record.
5. Test the conversion
For Double -> Decimal inputs: a test at limit-1, limit, limit+1 of the minor-unit precision (e.g. 19.989, 19.99, 19.991), asserting the exact Decimal.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

