# 010122 Multi Currency Architecture

> Multi-currency architecture — price-per-currency with FK chain to countries and taxes, geo detection via edge headers, admin CRUD.

- **Type:** Skill
- **Install:** `agentstack add skill-natuleadan-skills-010122-multi-currency-architecture`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [natuleadan](https://agentstack.voostack.com/s/natuleadan)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [natuleadan](https://github.com/natuleadan)
- **Source:** https://github.com/natuleadan/skills/tree/main/skills/010122-multi-currency-architecture
- **Website:** https://www.skills.sh/natuleadan/skills

## Install

```sh
agentstack add skill-natuleadan-skills-010122-multi-currency-architecture
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Multi-Currency Architecture

## When to use

When building e-commerce or subscription systems that need to display and charge in multiple currencies based on the user's geographic location.

## References

| Topic | File |
|---|---|
| Currency + country + tax FK chain | `references/fk-chain.md` |
| Price table design per currency | `references/price-table.md` |
| Geo-based detection pipeline | `references/geo-detection.md` |
| CurrencyProvider and admin CRUD | `references/currency-provider.md` |

## Quick checklist

- [ ] `sys_currencies`: code, name, symbol, countryId FK, isDefault, isActive
- [ ] `sys_taxes`: countryId FK, currencyId FK, name, rate, isActive
- [ ] `prd_prices`: productId, variantId, currencyId FK, price, compareAtPrice, cost, isActive, validFrom, validUntil
- [ ] Unique constraint: `(productId, variantId, currencyId)` with `NULLS NOT DISTINCT`
- [ ] Geo detection: edge header (`cf-ipcountry`) → sys_countries → sys_currencies
- [ ] Fallback chain: user preference cookie → geo detection → default currency (USD)
- [ ] CurrencyProvider context: read-only (immutable without user preference)
- [ ] Admin CRUD: generic factory with FK protection on DELETE

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [natuleadan](https://github.com/natuleadan)
- **Source:** [natuleadan/skills](https://github.com/natuleadan/skills)
- **License:** MIT
- **Homepage:** https://www.skills.sh/natuleadan/skills

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-natuleadan-skills-010122-multi-currency-architecture
- Seller: https://agentstack.voostack.com/s/natuleadan
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
