csv-fx-normalize
Normalize a CSV's EUR amounts to USD using live FX rates, with a graceful offline fallback. Use to convert or normalize a currency column in tabular data.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- csv-fx-normalize
- description
- Normalize a CSV's EUR amounts to USD using live FX rates, with a graceful offline fallback. Use to convert or normalize a currency column in tabular data.
02 资源文件 1
- 脚本scripts/normalize.py4.3 KB
03 SKILL.md 正文
csv-fx-normalize
Converts EUR amounts in a CSV to USD using a live exchange rate, via a bundled
producer script (scripts/normalize.py). The skill's job genuinely needs the
network — fetching the rate — so this is also the worked example of degrading
gracefully under a sealed network: in Cowork (default-deny egress) the rate fetch
is blocked, and the skill falls back to reporting amounts in their source currency,
clearly flagged. It never fails or hangs because the network is sealed.
When to use
The user has a CSV with a EUR-denominated amount_eur column and wants it normalized
to USD.
How to run
-
Locate the CSV. Default for this example:
uploads/sales_eur.csv. -
Run the bundled producer (reachable via
${CLAUDE_PLUGIN_ROOT}):S="${CLAUDE_PLUGIN_ROOT}/skills/csv-fx-normalize/scripts/normalize.py" [ -f "$S" ] || S="$(find /sessions/*/mnt/.local-plugins /sessions/*/mnt/.remote-plugins \ -path '*/skills/csv-fx-normalize/scripts/normalize.py' 2>/dev/null | head -1)" python3 "$S" uploads/sales_eur.csv outputsIn Cowork's default host-loop mode the bash tool rewrites the host path the agent writes in for
${CLAUDE_PLUGIN_ROOT}to the plugin's mount inside the VM, so the first line finds the script; the second line is the fallback for a Desktop older than 1.40609.0, or a plugin whose mount path the rewrite skips, and finds the script at that mount.It makes one outbound call — to a public FX API — to get the EUR→USD rate. If that call is blocked (as it is under Cowork's default-deny egress), it falls back to the source currency. Either way it writes
outputs/normalized.jsonandoutputs/summary.mdand prints a one-line summary. -
Read
outputs/summary.mdand tell the user whether the amounts were converted to USD or it fell back to source currency (offline), plus the path to the JSON.
Constraints
- Standard library only; the one network call is the FX fetch, and it must degrade gracefully when blocked — that's the property this skill demonstrates.
- Treat
outputs/as write-once for the deliverable.
04 同仓库更多 Skills
standalone-skill
fixture skill for collectArtifactSources — proves scripts/ is reached
skill-b
fixture skill B — sibling of skill-a, must be excluded when the target is skill-a directly
skill-a
fixture skill A — has a candidate source under scripts/
csv-report
Profile an uploaded CSV and write a metrics file, a summary and a short insights note. Use when the user asks to analyze, summarize or report on a CSV / tabular dataset.
csv-audit
Audit outputs/metrics.json for data-quality problems and return a findings list. Use when asked to audit CSV metrics.
my-pdf-skill
Example skill under test. Summarize a PDF and write action items.