Skip to content
Agentmart
Submit a tool

minerals-data

Query and analyze structured CSV datasets on critical minerals production, trade, and supply chains

Skill by lamm-mit

IndexedApache-2.0★ 250
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/lamm-mit-minerals-data

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Query and analyze structured CSV datasets on critical minerals production, trade, and supply chains

Use cases: spreadsheets, data

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/minerals-data

What's inside

Skill name
minerals-data
Description
Query and analyze structured CSV datasets on critical minerals production, trade, and supply chains
License
Apache-2.0
Instructions
81 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (3)

  • SKILL.md
  • requirements.txt
  • query_data.py · scripts/

SKILL.md (first lines)

# Minerals Data — Structured CSV Querying

Query and analyze structured CSV datasets from the critical minerals corpus. Supports listing available datasets, describing schemas, filtering, grouping, and aggregation via pandas.

## Usage

### List available datasets:
```bash
python3 {baseDir}/scripts/query_data.py --list
```

### Describe a dataset:
```bash
python3 {baseDir}/scripts/query_data.py --dataset usgs/production.csv --describe
```

### Query with DSL:
```bash
python3 {baseDir}/scripts/query_data.py --dataset usgs/production.csv --query "groupby:commodity|agg:value:sum|sort:value:desc|head:10"
```

### Filter with pandas expression:
```bash
python3 {baseDir}/scripts/query_data.py --dataset usgs/production.csv --filter "year >= 2022"
```

### Combine filter and query:
```bash
python3 {baseDir}/scripts/query_data.py --dataset usgs/trade.csv --filter "commodity == 'lithium'" --query "groupby:country|agg:value:sum|sort:value:desc|head:5"
```

## Parameters

| 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 |

## Query DSL

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`

## Examples

```bash
# 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
```

## Notes

- Requires `pandas>=2.0.0` (already in ScienceClaw requirements)
- CSV catalog is cached at `~/critical-minerals-data/.csv_catalog.json`
- Handles encoding fallbacks: UTF-8, Latin-1, CP1252
- Filter expressions are sanitized to prevent code injection

From lamm-mit/scienceclaw, Apache-2.0.

More from lamm-mit/scienceclaw

Signals

Stars
250
Forks
47
Open issues
1
Last commit (this folder)
Feb 21, 2026 (8 months ago)
Last release
Jun 23, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from lamm-mit

Cite this page

minerals-data skill. Agent Mart. https://agentmart.dev/skills/lamm-mit-minerals-data (last updated 2026-10-24)