skills/minerals-data/SKILL.md
Query and analyze structured CSV datasets on critical minerals production, trade, and supply chains
npx skillsauth add lamm-mit/scienceclaw minerals-dataInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Query and analyze structured CSV datasets from the critical minerals corpus. Supports listing available datasets, describing schemas, filtering, grouping, and aggregation via pandas.
python3 {baseDir}/scripts/query_data.py --list
python3 {baseDir}/scripts/query_data.py --dataset usgs/production.csv --describe
python3 {baseDir}/scripts/query_data.py --dataset usgs/production.csv --query "groupby:commodity|agg:value:sum|sort:value:desc|head:10"
python3 {baseDir}/scripts/query_data.py --dataset usgs/production.csv --filter "year >= 2022"
python3 {baseDir}/scripts/query_data.py --dataset usgs/trade.csv --filter "commodity == 'lithium'" --query "groupby:country|agg:value:sum|sort:value:desc|head:5"
| Parameter | Description | Default |
|-----------|-------------|---------|
| --list | List all available CSV datasets | - |
| --dataset | Path to CSV file (relative to corpus dir) | - |
| --describe | Show schema, dtypes, sample rows, statistics | - |
| --query | Pipe-delimited DSL for pandas operations | - |
| --filter | Pandas query expression for filtering | - |
| --corpus-dir | Directory containing data files | ~/critical-minerals-data/ |
| --format | Output format: table, json, csv | table |
Pipe-delimited operations that map to pandas:
| Operation | Syntax | Example |
|-----------|--------|---------|
| Group by | groupby:col | groupby:commodity |
| Aggregate | agg:col:func | agg:value:sum |
| Sort | sort:col:dir | sort:value:desc |
| Head | head:n | head:10 |
| Select columns | select:col1,col2 | select:commodity,value |
Functions: sum, mean, count, min, max, median, std
# Top producing countries for lithium
python3 {baseDir}/scripts/query_data.py --dataset usgs/production.csv \
--filter "commodity == 'lithium'" \
--query "groupby:country|agg:value:sum|sort:value:desc|head:10"
# Year-over-year trade data
python3 {baseDir}/scripts/query_data.py --dataset comtrade/exports.csv \
--query "groupby:year|agg:value:sum|sort:year:asc"
# Dataset overview
python3 {baseDir}/scripts/query_data.py --dataset worldbank/indicators.csv --describe
pandas>=2.0.0 (already in ScienceClaw requirements)~/critical-minerals-data/.csv_catalog.jsontools
Onboard and manage Paperclip AI for research-paper knowledge and agent orchestration
development
Perform AI-powered web searches with real-time information using Perplexity models via LiteLLM and OpenRouter. This skill should be used when conducting web searches for current information, finding recent scientific literature, getting grounded answers with source citations, or accessing information beyond the model knowledge cutoff. Provides access to multiple Perplexity models including Sonar Pro, Sonar Pro Search (advanced agentic search), and Sonar Reasoning Pro through a single OpenRouter API key.
testing
Generate a structured scientific PDF report from a JSON description. Accepts a JSON file specifying title, authors, abstract, sections (headings, text, tables, figures), and inline data panels (heatmap, bar, scatter, line). Produces a publication-style A4 PDF using reportlab with no LaTeX dependency. All figures are either loaded from PNG paths or generated on-the-fly from inline data.
development
Execute arbitrary Python code and return stdout. NumPy, pandas, scipy, matplotlib, and other scientific libraries are available.