Skip to content
Data
Skill

/search-stac

Search and download satellite imagery from Microsoft Planetary Computer. Browse available collections, search by bbox and time range, list assets, and download specific items.

From plugin
geoai-skills
358 skills

Claude Code

$ npx -y skills add opengeos/geoai-skills --skill search-stac --agent claude-code

SKILL.md

search-stac.SKILL.md
name: search-stac
description: >
  Search and download satellite imagery from Microsoft Planetary Computer.
  Browse available collections, search by bbox and time range, list assets,
  and download specific items.
argument-hint: <collection|list> [--bbox <minx,miny,maxx,maxy>] [--datetime <range>] [--download] [--output DIR]
allowed-tools: Bash

You are helping the user search and download satellite imagery from the Planetary Computer STAC catalog using geoai.

Input: `$@`

Follow these steps in order.

Step 1 -- Determine the action

Parse `$@` to identify what the user wants:

  • If the input is `list`, `collections`, or asks "what is available": **list collections**.
  • If a collection name and `--bbox` are provided: **search for items**.
  • If `--download` is present: **download items** after searching.

Step 2 -- List collections (if requested)

python3 -c "
import geoai
df = geoai.pc_collection_list()
print(df.to_string())
"

If the user provided a filter keyword, pass it:

python3 -c "
import geoai
df = geoai.pc_collection_list(filter_by='FILTER')
print(df.to_string())
"

Report the available collections and stop (unless the user also specified a search).

Step 3 -- Search for items

Parse the collection name, bounding box (`--bbox`), and optional datetime range (`--datetime`).

The datetime range should be in the format `YYYY-MM-DD/YYYY-MM-DD` (start/end).

python3 -c "
import geoai

items = geoai.pc_stac_search(
    collection='COLLECTION',
    bbox=[MINX, MINY, MAXX, MAXY],
    time_range='TIME_RANGE',
    limit=LIMIT,
)
print(f'Found {len(items)} items')
print('---')
for item in items[:20]:
    assets = list(item.assets.keys())
    print(f'  {item.id}: {item.datetime} - assets: {assets}')
"

Replace `COLLECTION`, `MINX`, `MINY`, `MAXX`, `MAXY`, `TIME_RANGE`, and `LIMIT` with actual values. Use `limit=10` by default.

If `time_range` was not specified, omit it or pass `None`.

Step 4 -- List assets for an item (optional)

If the user asks about available assets or bands for a specific item:

python3 -c "
import geoai
assets = geoai.pc_item_asset_list(item_id='ITEM_ID', collection='COLLECTION')
for name, info in assets.items():
    print(f'  {name}: {info}')
"

Step 5 -- Download items (if --download flag or user confirms)

python3 -c "
import geoai, os

items = geoai.pc_stac_search(
    collection='COLLECTION',
    bbox=[MINX, MINY, MAXX, MAXY],
    time_range='TIME_RANGE',
    limit=LIMIT,
)

output_dir = 'OUTPUT_DIR'
os.makedirs(output_dir, exist_ok=True)

result = geoai.pc_stac_download(
    items,
    output_dir=output_dir,
)
print(f'Downloaded to: {output_dir}')
for f in os.listdir(output_dir):
    fpath = os.path.join(output_dir, f)
    if os.path.isfile(fpath):
        size_mb = os.path.getsize(fpath) / (1024 * 1024)
        print(f'  {f} ({size_mb:.1f} MB)')
"

Default output directory: `./stac_data/`

Step 6 -- Report and suggest follow-ups

Summarize the search or download results. Then suggest:

  • *"Use `/geoai-skills:inspect-geo` to examine any downloaded files."*
  • *"Use `/geoai-skills:process-raster` to clip or mosaic the imagery."*

Error handling

  • **`import geoai` fails** -> delegate to `/geoai-skills:install-geoai`.
  • **Invalid collection name** -> list available collections and suggest the closest match.
  • **No items found** -> suggest expanding the bbox, adjusting the date range, or trying a different collection.
  • **Download failure** -> report the error and suggest retrying with fewer items.
Read more
@opengeos
Ships withgeoai-skills

A Claude Code plugin that adds GeoAI-powered skills for geospatial data exploration, satellite imagery download, AI-based object detection, and session memory. Built on the GeoAI Python library.

Stars on GitHub

Momentum

stars in total
35
Star history of opengeos/geoai-skills on GitHub, a chart by star-history.com

Other skills on geoai-skills.

detect-objects

detect-objects

Run pre-trained AI models on geospatial imagery. Detect buildings, cars, ships, solar panels, agriculture fields, or use…

download-data

download-data

Download NAIP aerial imagery for a bounding box. Specify coordinates as minx,miny,maxx,maxy in WGS84 and optionally a year.

inspect-geo

inspect-geo

Inspect any raster or vector geospatial file. Returns CRS, bounds, bands, resolution, dtype, attribute summaries, and band…

install-geoai

install-geoai

Verify that the geoai Python package is installed and functional. If not, provide installation instructions. Optionally check…

overture-data

overture-data

Download Overture Maps data (buildings, places, roads, land use, water, etc.) for a bounding box. Returns a GeoDataFrame saved as…

process-raster

process-raster

Process raster data: clip by bounding box, stack multiple bands, mosaic GeoTIFFs, or convert between raster and vector formats.

More skills from other plugins.

context-loader
Auto-invoked

context-loader

Search memories from earlier Pi sessions in this repository. Use it when earlier work may already explain the code, error,…

mem04d69k
@mem0ai@mem0aiInstall Skill
analyzing-ai-citations

analyzing-ai-citations

Answer AI citation and answer engine optimization (AEO) questions in PostHog: whether AI answer engines (ChatGPT, Claude, and an…

posthog10d41k
@posthog@posthogInstall Skill

Questions about search-stac.

Which coding agents can use search-stac?
search-stac installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.