/geoai-skills:detect-objects <model> <input_raster> [--text PROMPT] [--output FILE]from geoai-skills
Runs pre-trained AI models on geospatial imagery to detect buildings, cars, ships, solar panels, agriculture fields, or perform text-prompted segmentation with GroundedSAM. Requires GPU for best performance.
Ships in geoai-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are helping the user run AI object detection on geospatial imagery using geoai.
Input: $@
Follow these steps in order.
Extract:
$0 as the model name: buildings, cars, ships, solar-panels, parking-lots, agriculture, or grounded-sam$1 as the input raster path--text PROMPT for GroundedSAM text-prompted segmentation (required when model is grounded-sam)--output FILE for the output vector file (default: ./<model>_detections.gpkg)If the model name is not recognized, list the available models and ask the user to pick one.
Model mapping:
| Argument | GeoAI Class |
|---|---|
buildings | geoai.BuildingFootprintExtractor |
cars | geoai.CarDetector |
ships | geoai.ShipDetector |
solar-panels | geoai.SolarPanelDetector |
parking-lots | geoai.ParkingSplotDetector |
agriculture | geoai.AgricultureFieldDelineator |
grounded-sam | geoai.GroundedSAM |
python3 -c "
import torch
if torch.cuda.is_available():
print(f'GPU: {torch.cuda.get_device_name(0)}')
print(f'CUDA: {torch.version.cuda}')
print(f'Memory: {torch.cuda.get_device_properties(0).total_mem / 1e9:.1f} GB')
else:
print('GPU: not available (CPU mode)')
print('Warning: inference will be significantly slower without a GPU')
"
If no GPU is available, warn the user but continue.
If $1 looks like an absolute path, use it directly. Otherwise:
find "$PWD" -name "$1" -not -path '*/.git/*' 2>/dev/null
If no file specified and state exists, check for recently inspected/downloaded files:
STATE_DIR=""
test -f .geoai-skills/state.json && STATE_DIR=".geoai-skills"
PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || echo "$PWD")"
PROJECT_ID="$(echo "$PROJECT_ROOT" | tr '/' '-')"
test -f "$HOME/.geoai-skills/$PROJECT_ID/state.json" && STATE_DIR="$HOME/.geoai-skills/$PROJECT_ID"
python3 -c "
import geoai
detector = geoai.DETECTOR_CLASS()
gdf = detector.predict(
'INPUT_PATH',
output_path='OUTPUT_PATH',
)
print(f'Detections: {len(gdf)}')
print(f'Output: OUTPUT_PATH')
print(f'Columns: {list(gdf.columns)}')
if len(gdf) > 0:
print('---')
print('Sample (first 5):')
print(gdf.head().to_string())
"
Replace DETECTOR_CLASS with the appropriate class from the mapping table (e.g. BuildingFootprintExtractor).
python3 -c "
import geoai
sam = geoai.GroundedSAM()
gdf = sam.predict(
'INPUT_PATH',
text_prompt='TEXT_PROMPT',
output_path='OUTPUT_PATH',
)
print(f'Segments: {len(gdf)}')
print(f'Output: OUTPUT_PATH')
print(f'Columns: {list(gdf.columns)}')
if len(gdf) > 0:
print('---')
print('Sample (first 5):')
print(gdf.head().to_string())
"
Replace TEXT_PROMPT with the user's text prompt.
Replace INPUT_PATH and OUTPUT_PATH with actual values before running.
Summarize:
Then suggest: "Use /geoai-skills:inspect-geo to examine the detection output."
import geoai fails -> delegate to /geoai-skills:install-geoai.import torch fails -> suggest installing PyTorch: pip install torch torchvision.tile_size parameter, recommend a smaller value./geoai-skills:process-raster vector-to-raster first.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub opengeos/geoai-skills --plugin geoai-skills8 skills in this plugin
/download-dataDownload NAIP aerial imagery for a bounding box. Specify coordinates as minx,miny,maxx,maxy in WGS84 and optionally a year.
/inspect-geoInspect any raster or vector geospatial file. Returns CRS, bounds, bands, resolution, dtype, attribute summaries, and band statistics. Supports GeoTIFF, Shapefile, GeoJSON, GeoPackage, GeoParquet, and more.
/install-geoaiVerify that the geoai Python package is installed and functional. If not, provide installation instructions. Optionally check extra dependencies for deep learning models.
/overture-dataDownload Overture Maps data (buildings, places, roads, land use, water, etc.) for a bounding box. Returns a GeoDataFrame saved as GeoJSON or GeoPackage.
/process-rasterProcess raster data: clip by bounding box, stack multiple bands, mosaic GeoTIFFs, or convert between raster and vector formats.
/read-memoriesSearch past Claude Code session logs to recover context from previous conversations. Finds past decisions, data paths, CRS info, model configurations, and unresolved work. Works across all projects or scoped to the current one.