/cloud-native-remote-sensing:create-cogfrom cloud-native-remote-sensing
Converts geospatial raster data to Cloud-Optimized GeoTIFF (COG) using GDAL and validates with rio-cogeo. Handles GDAL version differences, compression settings, and remote files.
Ships in cloud-native-remote-sensing. 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.
Use this skill when you need to convert any geospatial raster data to a Cloud-Optimized GeoTIFF.
gdal Conda package. Install using conda install -c conda-forge gdalrio-cogeo Python package for validation. Install using pip install rio-cogeoBoth must come from a conda environment, not base. Check what is available before installing:
conda env list
conda activate <env>
gdal --version
If neither is installed, ask the user which environment to install into before proceeding.
rio cogeo validate <file>
Always validate the input before converting and the output after converting.
Check gdal --version first, then use the matching command.
GDAL version >= 3.11 (the gdal subcommand interface)
gdal raster convert -f COG <input file> <output file>
GDAL version < 3.11 (the legacy utility)
gdal_translate -of COG <input file> <output file>
Note the flag difference. The new gdal raster convert takes -f (or
--format). It does NOT accept -of, which is the legacy gdal_translate
flag, and fails with "Option 'o' is not a boolean option."
Creation options are passed with --co KEY=VALUE on the new interface,
-co KEY=VALUE on the legacy one.
If the output file already exists, the command errors out. Add
--overwrite only when you intend to replace it.
The COG driver already applies LZW compression by default, so the output is compressed even if you pass nothing. But the default uses no predictor, which wastes a lot of space on continuous data. Set the compression and predictor explicitly. Use DEFLATE as the default, since it is readable by every GeoTIFF client.
gdal raster convert -f COG --co COMPRESS=DEFLATE --co PREDICTOR=YES <input> <output>
Only exception - If the input data is JPEG compressed - typically used in aerial/drone imagery), retain the same with COMPRESS=JPEG
Append the text _cog to the converted filename. If the input is
data.tif, the output should be named data_cog.tif
If the given file is a remote file, do not download it. Use GDAL Virtual
File Systems by prefixing the URL with /vsicurl/
rio cogeo validate /vsicurl/https://example.com/data.tif
gdal raster convert -f COG /vsicurl/https://example.com/data.tif data_cog.tif
A remote input gives no obvious output location. Write to the current working directory unless a location is specified by the user.
In Windows Powershell, set the following environment variable MSYS_NO_PATHCONV=1
to avoid errors when using paths starting with /vsicurl
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub spatialthoughts/spatialthoughts-ai-skills --plugin cloud-native-remote-sensing2 skills in this plugin