OpenParable
Skip to content
← Back to skills

Bgs Production

Research
bgs-production

Bgs Production is an Agent Skill for research published in the lamm-mit/scienceclaw repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Query BGS World Mineral Statistics for production, imports, and exports by commodity, country, and year

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/lamm-mit/scienceclaw/blob/HEAD/skills/bgs-production/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/bgs-production, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

BGS World Mineral Statistics

Query the British Geological Survey's World Mineral Statistics database for mineral production, imports, and exports by commodity, country, and year. Covers global mineral data with country-level breakdowns.

Usage

Basic search:

python3 {baseDir}/scripts/bgs_query.py --query "lithium"

Production by country:

python3 {baseDir}/scripts/bgs_query.py --query "Cobalt" --country "Congo"

Filter by year range:

python3 {baseDir}/scripts/bgs_query.py --query "Copper" --year-from 2018 --year-to 2022

Get country ranking:

python3 {baseDir}/scripts/bgs_query.py --query "Graphite" --ranking --top-n 10

Filter by statistic type:

python3 {baseDir}/scripts/bgs_query.py --query "Nickel" --statistic-type "Exports"

JSON output:

python3 {baseDir}/scripts/bgs_query.py --query "Rare earths" --format json --limit 20

Parameters

ParameterDescriptionDefault
--queryCommodity name to search forRequired
--countryFilter by country name-
--year-fromStart year for date filter-
--year-toEnd year for date filter-
--statistic-typeStatistic type: Production, Imports, ExportsProduction
--rankingShow country ranking by productionfalse
--top-nNumber of top countries in ranking15
--limitMaximum records to return50
--formatOutput format: summary, detailed, jsonsummary

Examples

# Top lithium producers
python3 {baseDir}/scripts/bgs_query.py --query "Lithium" --ranking --top-n 10

# Cobalt production in Congo over time
python3 {baseDir}/scripts/bgs_query.py --query "Cobalt" --country "Congo" --year-from 2015 --format detailed

# Rare earth exports globally
python3 {baseDir}/scripts/bgs_query.py --query "Rare earths" --statistic-type "Exports" --format json

# Graphite production ranking for 2021
python3 {baseDir}/scripts/bgs_query.py --query "Graphite" --ranking --year-from 2021 --year-to 2021

Notes

  • Data from the BGS OGC API (free, no authentication required)
  • Covers global mineral production, imports, and exports statistics
  • Country names use BGS conventions (e.g., "Congo (Democratic Republic)" not "DRC")
  • Year filtering is applied client-side after fetching records
  • Rate limiting: be courteous, avoid excessive requests