OpenParable
Skip to content
← Back to skills

Minerals Web Ingest

Research
minerals-web-ingest

Minerals Web Ingest 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.

Ingest and normalize web pages for critical-minerals intelligence, with optional Firecrawl fetching, deduplication manifest, and JSONL export

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/minerals-web-ingest/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/minerals-web-ingest, 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.

Minerals Web Ingest

Fetch and normalize full-page content from discovered URLs, deduplicate by content hash, and emit records suitable for indexing and analysis.

Usage

# Ingest URLs from monitor output
python3 {baseDir}/scripts/web_ingest.py \
  --input-json monitor_records.json \
  --output-jsonl ingested_records.jsonl \
  --format summary

# Direct URL ingest
python3 {baseDir}/scripts/web_ingest.py \
  --url https://www.energy.gov/articles/example \
  --url https://www.usgs.gov/news/example \
  --format json

# Prefer Firecrawl (if FIRECRAWL_API_KEY is set)
python3 {baseDir}/scripts/web_ingest.py --input-json gov_records.json --prefer-firecrawl

Parameters

ParameterDescriptionDefault
--input-jsonJSON input file with URL records-
--urlDirect URL input (repeatable)-
--output-jsonlOptional JSONL output path-
--manifest-pathURL->content hash dedupe manifest~/.scienceclaw/minerals_web_ingest_manifest.json
--timeoutHTTP timeout seconds30
--max-charsMax chars stored per page12000
--prefer-firecrawlUse Firecrawl first, fallback to requestsfalse
--formatsummary, detailed, jsonsummary

Output Schema

Ingested records include: url, source, published_at, title, summary, commodity_tags, country_tags, policy_signal, confidence, retrieved_at, source_type, content, content_hash.

Notes

  • If Firecrawl is unavailable or fails, script falls back to requests + BeautifulSoup extraction.
  • Manifest-based dedupe prevents reprocessing unchanged pages.
  • Use this output as input to corpus indexing or profile-generation pipelines.