Agent skills for working with energy and commodity data. Maintained by OilPriceAPI.
| Skill | What it does |
|---|---|
energy-units |
Correct conversion between energy and commodity units — including the volume↔mass conversions that depend on density rather than a fixed ratio. Crude, refined products, natural gas, LNG, coal. |
Most LLM agents support skills. One agent-agnostic method is npx skills:
npx skills add OilpriceAPI/agent-skills -s energy-unitsFor Claude Code, copy the skill directory into ~/.claude/skills/.
Several of the most common energy conversions are not fixed ratios, and applying a single constant fails silently — the answer looks plausible and is wrong by 5–15%.
- Barrels ↔ tonnes depends on density. Across common crudes the factor ranges 6.83–7.61 bbl/t, an 11% spread. The widely-quoted "7.33" matches no major benchmark.
- US coal quotes short tons; seaborne coal quotes metric tonnes. Comparing them directly overstates US prices by 10.2%.
- US gas is priced per MMBtu but volumed in Mcf, and the two are routinely treated as 1:1 — a 3.7% error before gas quality is considered.
Every figure in the skill is computed from first principles rather than copied from a secondary source, and the skill instructs the agent to state its density assumption on any volume↔mass answer.
Conversions usually accompany a real price. OilPriceAPI serves a keyless demo endpoint, so an agent can fetch live values without credentials:
curl https://api.oilpriceapi.com/v1/demo/pricesEach record carries its own unit, currency and source timestamp — the three fields
needed to convert correctly. The full catalogue is 463 series; the free tier is 200
requests/month with no card required.
- Docs: https://docs.oilpriceapi.com
- OpenAPI: https://api.oilpriceapi.com/.well-known/openapi.json
- MCP server:
oilpriceapi-mcp
Skill content is CC-BY-4.0. Conversion factors follow standard industry references (IEA, Energy Institute Statistical Review, EIA). API gravity values for named crudes are typical assay figures and vary by cargo — treat them as defaults to override when an assay is available.
Corrections to conversion factors are very welcome, especially with an assay or standards citation. Open an issue or a PR.