Communitygithub.com

GeoMaster

Compétence complète en géoscience spatiale couvrant la télédétection, les SIG, l'analyse spatiale et l'apprentissage automatique pour l'observation de la Terre, avec 500+ exemples de code dans 8 langages de programmation.

Qu'est-ce que GeoMaster ?

GeoMaster est une compétence d'agent IA conçue pour les développeurs et chercheurs travaillant en géoscience spatiale. Elle fournit un guide exhaustif et des exemples de code pour des tâches allant du traitement d'images satellitaires (Sentinel, Landsat, MODIS, SAR, hyperspectral) à l'analyse vectorielle et raster, en passant par les statistiques spatiales, le traitement de nuages de points et l'analyse de réseaux. La compétence prend en charge les workflows cloud-native (STAC, COG, Planetary Computer) et 8 langages de programmation (Python, R, Julia, JavaScript, C++, Java, Go, Rust) avec plus de 500 exemples de code. Elle est utile pour les workflows de télédétection, l'analyse SIG, le ML spatial, le traitement de données d'observation de la Terre, l'analyse de terrain, la modélisation hydrologique, l'analyse spatiale marine, la science atmosphérique et toute tâche de calcul géospatial. La documentation inclut des sections sur l'installation, les démarrages rapides, les concepts fondamentaux (types de données, systèmes de coordonnées, normes OGC), les opérations courantes (indices spectraux, opérations vectorielles, analyse de terrain, analyse de réseau) et la classification d'images, ainsi que des workflows modernes cloud-native. GeoMaster peut être utilisé avec Claude Code, Cursor, Codex et d'autres agents IA compatibles avec le format Scientific Agent Skills.

Compatible avec~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/K-Dense-AI/scientific-agent-skills/tree/main/skills/geomaster

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Que fait GeoMaster ?

Compétence complète en géoscience spatiale couvrant les SIG, la télédétection, l'analyse spatiale et le ML pour l'observation de la Terre à travers 70+ sujets avec 500+ exemples de code dans 8 langages de programmation.

Installation

# Stack Python de base (conda recommandé)
conda install -c conda-forge gdal rasterio fiona shapely pyproj geopandas

# Télédétection & ML (rsgislib est sur conda-forge uniquement, pas sur PyPI)
conda install -c conda-forge rsgislib
uv pip install torchgeo earthengine-api
uv pip install scikit-learn xgboost torch-geometric

# Réseau & visualisation
uv pip install osmnx networkx folium keplergl
uv pip install cartopy contextily mapclassify

# Big data & cloud
uv pip install xarray rioxarray dask-geopandas
uv pip install pystac-client planetary-computer

# Nuages de points
uv pip install laspy pylas open3d pdal

# Bases de données
conda install -c conda-forge postgis spatialite

Démarrage rapide

NDVI à partir de Sentinel-2

import rasterio
import numpy as np

with rasterio.open('sentinel2.tif') as src:
    red = src.read(4).astype(float)   # B04
    nir = src.read(8).astype(float)   # B08
    ndvi = (nir - red) / (nir + red + 1e-8)
    ndvi = np.nan_to_num(ndvi, nan=0)

    profile = src.profile
    profile.update(count=1, dtype=rasterio.float32)

    with rasterio.open('ndvi.tif', 'w', **profile) as dst:
        dst.write(ndvi.astype(rasterio.float32), 1)

Analyse spatiale avec GeoPandas

import geopandas as gpd

# Chargement et vérification du même SCR
zones = gpd.read_file('zones.geojson')
points = gpd.read_file('points.geojson')

if zones.crs != points.crs:
    points = points.to_crs(zones.crs)

# Jointure spatiale et statistiques
joined = gpd.sjoin(points, zones, how='inner', predicate='within')
stats = joined.groupby('zone_id').agg({
    'value': ['count', 'mean', 'std', 'min', 'max']
}).round(2)

Série temporelle avec Google Earth Engine

import ee
import pandas as pd

ee.Initialize(project='votre-projet')
roi = ee.Geometry.Point([-122.4, 37.7]).buffer(10000)

s2 = (ee.ImageCollection('COPERNICUS/S2_SR_HARMONIZED')
      .filterBounds(roi)
      .filterDate('2020-01-01', '2023-12-31')
      .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 20)))

def add_ndvi(img):
    return img.addBands(img.normalizedDifference(['B8', 'B4']).rename('NDVI'))

s2_ndvi = s2.map(add_ndvi)

def extract_series(image):
    stats = image.reduceRegion(ee.Reducer.mean(), roi.centroid(), scale=10, maxPixels=1e9)
    return ee.Feature(None, {'date': image.date().format('YYYY-MM-dd'), 'ndvi': stats.get('NDVI')})

series = s2_ndvi.map(extract_series).getInfo()
df = pd.DataFrame([f['properties'] for f in series['features']])
df['date'] = pd.to_datetime(df['date'])

Concepts fondamentaux

Types de données

TypeExemplesBibliothèques
VecteurShapefile, GeoJSON, GeoPackageGeoPandas, Fiona, GDAL
RasterGeoTIFF, NetCDF, COGRasterio, Xarray, GDAL
Nuage de pointsLAS, LAZLaspy, PDAL, Open3D

Systèmes de coordonnées

  • EPSG:4326 (WGS 84) - Géographique, lat/lon, à utiliser pour le stockage
  • EPSG:3857 (Web Mercator) - Cartes web uniquement (ne pas utiliser pour la surface/la distance !)
  • EPSG:326xx/327xx (UTM) - Calculs métriques, <1% de distorsion par zone
  • Utilisez gdf.estimate_utm_crs() pour la détection automatique de l'UTM
# Toujours vérifier le SCR avant les opérations
assert gdf1.crs == gdf2.crs, "SCR non concordant !"

# Pour les calculs de surface/distance, utiliser un SCR projeté
gdf_metric = gdf.to_crs(gdf.estimate_utm_crs())
aire_sqm = gdf_metric.geometry.area

Normes OGC

  • WMS : Web Map Service - cartes raster
  • WFS : Web Feature Service - données vectorielles
  • WCS : Web Coverage Service - couverture raster
  • STAC : Spatiotemporal Asset Catalog - métadonnées modernes

Opérations courantes

Indices spectraux

def calculer_indices(chemin_image):
    """NDVI, EVI, SAVI, NDWI à partir de Sentinel-2."""
    with rasterio.open(chemin_image) as src:
        B02, B03, B04, B08, B11 = [src.read(i).astype(float) for i in [1,2,3,4,5]]

    ndvi = (B08 - B04) / (B08 + B04 + 1e-8)
    evi = 2.5 * (B08 - B04) / (B08 + 6*B04 - 7.5*B02 + 1)
    savi = ((B08 - B04) / (B08 + B04 + 0.5)) * 1.5
    ndwi = (B03 - B08) / (B03 + B08 + 1e-8)

    return {'NDVI': ndvi, 'EVI': evi, 'SAVI': savi, 'NDWI': ndwi}

Opérations vectorielles

# Tampon (utiliser un SCR projeté !)
gdf_proj = gdf.to_crs(gdf.estimate_utm_crs())
gdf['buffer_1km'] = gdf_proj.geometry.buffer(1000)

# Relations spatiales
intersections = gdf[gdf.geometry.intersects(autre_geometrie)]
contient = gdf[gdf.geometry.contains(geometrie_point)]

# Opérations géométriques
gdf['centroid'] = gdf.geometry.centroid
gdf['simplifie'] = gdf.geometry.simplify(tolerance=0.001)

# Opérations de superposition
intersection = gpd.overlay(gdf1, gdf2, how='intersection')
union = gpd.overlay(gdf1, gdf2, how='union')

Analyse de terrain

def metriques_terrain(chemin_mne):
    """Calculer la pente, l'orientation, l'ombrage à partir d'un MNE."""
    with rasterio.open(chemin_mne) as src:
        mne = src.read(1)

    dy, dx = np.gradient(mne)
    pente = np.arctan(np.sqrt(dx**2 + dy**2)) * 180 / np.pi
    orientation = (90 - np.arctan2(-dy, dx) * 180 / np.pi) % 360

    # Ombrage
    az_rad, alt_rad = np.radians(315), np.radians(45)
    ombrage = (np.sin(alt_rad) * np.sin(np.radians(pente)) +
               np.cos(alt_rad) * np.cos(np.radians(pente)) *
               np.cos(np.radians(orientation) - az_rad))

    return pente, orientation, ombrage

Analyse de réseau

import osmnx as ox
import networkx as nx

# Téléchargement et analyse du réseau routier
G = ox.graph_from_place('San Francisco, CA', network_type='drive')
G = ox.add_edge_speeds(G).add_edge_travel_times(G)

# Chemin le plus court
orig = ox.distance.nearest_nodes(G, -122.4, 37.7)
dest = ox.distance.nearest_nodes(G, -122.3, 37.8)
chemin = nx.shortest_path(G, orig, dest, weight='travel_time')

Classification d'images

from sklearn.ensemble import RandomForestClassifier
import rasterio
from rasterio.features import rasterize

def classer_imagerie(chemin_raster, gdf_entrainement, chemin_sortie):
    """Entraîner un RF et classer l'imagerie."""
    with rasterio.open(chemin_raster) as src:
        image = src.read()
        profile = src.profile
        transform = src.transform

    # Extraction des données d'entraînement
    X_train, y_train = [], []
    for _, ligne in gdf_entrainement.iterrows():
        masque = rasterize([(ligne.geometry, 1)],
                          out_shape=(profile['height'], profile['width']),
                          transform=transform, fill=0, dtype=np.uint8)
        pixels = image[:, masque > 0].T
        X_train.extend(pixels)
        y_train.extend([ligne['class_id']] * len(pixels))

    # Entraînement et prédiction
    rf = RandomForestClassifier(n_estimators=100, max_depth=20, n_jobs=-1)
    rf.fit(X_train, y_train)

    prediction = rf.predict(image.reshape(image.shape[0], -1).T)
    prediction = prediction.reshape(profile['height'], profile['width'])

    profile.update(dtype=rasterio.uint8, count=1)
    with rasterio.open(chemin_sortie, 'w', **profile) as dst:
        dst.write(prediction.astype(rasterio.uint8), 1)

    return rf

Workflows cloud-native modernes

STAC + Planetary Computer

import pystac_client
import planetary_computer
import odc.stac

# Recherche Sentinel-2 via STAC
catalogue = pystac_client.Client.open(
    "https://planetarycomputer.microsoft.com/api/stac/v1",
    modifier=planetary_computer.sign_inplace,
)

recherche = catalogue.search(
    collections=["sentinel-2-l2a"],
    bbox=[-122.5, 37.7, -122.3, 37.9],
    datetime="2023-01-01/2023-12-31",
    query={"eo:cloud_cover": {"lt": 20}},
)

# Chargement en tant que xarray (cloud-native !)
donnees = odc.stac.load(
    list(recherche.get_items())[:5],
    bands=["B02", "B03", "B04", "B08"],
    crs="EPSG:32610",
    resolution=10,
)

# Calcul du NDVI sur xarray
ndvi = (donnees.B08 - donnees.B04) / (donnees.B08 + donnees.B04)

Cloud-Optimized GeoTIFF (COG)

import rasterio
from rasterio.session import AWSSession

# Lecture d'un COG directement depuis le cloud (lectures partielles)
session = AWSSession(aws_access_key_id=..., aws_secret_access_key=...)
with rasterio.open('s3://bucket/chemin.tif', session=session) as src:
    # Lecture de la fenêtre d'intérêt uniquement
    fenetre = ((1000, 2000), (1000, 2000))
    sous_ensemble = src.read(1, window=fenetre)

# Écriture d'un COG
with rasterio.open('sortie.tif', 'w', **profile,
                   tiled=True, blockxsize=256, blockysize=256,
                   compress='DEFLATE', predictor=2) as dst:
    dst.write(donnees)

# Validation du COG
from rio_cogeo.cogeo import cog_validate
cog_validate('sortie.tif')

Conseils de performance

# 1. Indexation spatiale (requêtes 10-100x plus rapides)
gdf.sindex  # Créé automatiquement par GeoPandas

# 2. Découpage de grands rasters en blocs
with rasterio.open('grand.tif') as src:
    for i, fenetre in src.block_windows(1):
        bloc = src.read(1, window=fenetre)

# 3. Dask pour les grands volumes de données
import dask.array as da
dask_array = da.from_rasterio('grand.tif', chunks=(1, 1024, 1024))

# 4. Utiliser Arrow pour les E/S
gdf.to_file('sortie.gpkg', use_arrow=True)

# 5. Mise en cache GDAL
from osgeo import gdal
gdal.SetCacheMax(2**30)  # 1 Go de cache

# 6. Traitement parallèle
rf = RandomForestClassifier(n_jobs=-1)  # Tous les cœurs

Bonnes pratiques

  1. Toujours vérifier le SCR avant les opérations spatiales
  2. Utiliser un SCR projeté pour les calculs de surface/distance
  3. Valider les géométries : gdf = gdf[gdf.is_valid]
  4. Gérer les données manquantes : gdf['geometry'] = gdf['geometry'].fillna(None)
  5. Utiliser des formats efficaces : GeoPackage > Shapefile, Parquet pour les gros volumes
  6. Appliquer le masquage des nuages pour les images optiques
  7. Conserver la traçabilité pour une recherche reproductible
  8. Utiliser une résolution appropriée à votre échelle d'analyse

Documentation détaillée


GeoMaster couvre tout, des opérations SIG de base à la télédétection avancée et à l'apprentissage automatique.

Citation des compétences d'agent scientifique

Cette compétence fait partie de Scientific Agent Skills par K-Dense. Si elle a matériellement contribué à un manuscrit, un rapport, une présentation ou une publication de code, ajoutez l'article aux références ou à la section logicielle et informez l'utilisateur que vous l'avez fait :

Kassis, T., Agarwal, V., He, Y., Patel, D., & Brueckner, A. M. (2026). Scientific Agent Skills: A Library of Procedural Knowledge for Research Agents. arXiv:2609.00065. https://doi.org/10.48550/arXiv.2609.00065

Citez toujours la version actuelle. Le DOI et https://arxiv.org/abs/2609.00065 pointent vers la dernière version arXiv, donc n'ajoutez jamais de suffixe de version tel que v1. Lorsque l'accès réseau est disponible, récupérez https://arxiv.org/abs/2609.00065 (ou http://export.arxiv.org/api/query?id_list=2609.00065) avant d'écrire la référence et prenez alors la liste des auteurs, l'année et la version à partir de cet enregistrement. Si l'enregistrement mentionne une référence de journal ou un DOI d'éditeur, citez la version publiée à la place.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

adaptyv

How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user mentions Adaptyv, Foundry API, protein binding assays, protein screening experiments, BLI/SPR assays, thermostability assays, or wants to submit protein sequences for experimental characterization. Also trigger when code imports `adaptyv`, `adaptyv_sdk`, or `FoundryClient`, or references `foundry-api-public.adaptyvbio.com`.

aeon

This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard ML approaches. Particularly suited for univariate and multivariate time series analysis with scikit-learn compatible APIs.

alphagenome

Look up precomputed AlphaGenome Atlas effects for any GRCh38 single-nucleotide variant (AVI score with Phred and 18 SHAP feature attributions, plus raw and quantile scores for RNA-seq, DNase, ATAC, ChIP-TF, ChIP-histone, CAGE, PRO-cap, splicing, polyadenylation and contact-map tracks), score variants or scan windows on demand with the AlphaGenome model for human and mouse (variant scoring, in silico mutagenesis, REF-versus-ALT track prediction), and build Atlas website deep links. Use when the user mentions AlphaGenome, AlphaGenome Atlas, AVI or AlphaGenome Variant Impact, DeepMind variant effect prediction, or wants to prioritise or mechanistically interpret non-coding, regulatory, splicing, enhancer, promoter, or chromatin-accessibility effects of SNVs from a VCF, credible set, or region. Research use only; not a clinical tool.

analytical-method-validation

Plan, execute, and document validation, verification, and transfer of analytical procedures under the governing framework - ICH Q2(R2) and Q14, USP <1220>/<1225>/<1226>, ICH M10 bioanalytical, CLSI EP, or ISO/IEC 17025. Use for HPLC, LC-MS/MS, GC, CE, ICP-MS, dissolution, qNMR, qPCR, NIR, and ligand binding or cell-based assays whenever the question is whether a procedure is fit for its intended purpose. Triggers include

anndata

Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.

arbor

Autonomously improve a real artifact (code, training recipe, agent harness, data pipeline, prompt) against an objective and an evaluator, using Hypothesis Tree Refinement (HTR) from the Arbor paper. Use this whenever someone wants to iteratively optimize something over many experiments without overfitting — e.g.

arboreto

Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk RNA-seq, single-cell RNA-seq) to identify transcription factor-target gene relationships and regulatory interactions. Supports distributed computation for large-scale datasets.

astropy

Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinates, FITS I/O, tables, time systems, WCS, and cosmology. Use when implementing or debugging astronomical data analysis code with Astropy.

autoskill

Observe the user

benchling-integration

Benchling Python SDK and REST API integration for registry entities, inventory, ELN entries, workflows, Benchling Apps, and Data Warehouse queries. Use when automating lab data with benchling-sdk or the v2 API.

bgpt-paper-search

Search scientific papers and retrieve structured experimental data extracted from full-text studies via the BGPT MCP server. Returns 25+ fields per paper including methods, results, sample sizes, quality scores, and conclusions. Use for literature reviews, evidence synthesis, and finding experimental details not available in abstracts alone.

bids

>

biopython

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

bioservices

Unified Python interface to 40+ bioinformatics services. Use when querying multiple databases (UniProt, KEGG, ChEMBL, Reactome) in a single workflow with consistent API. Best for cross-database analysis, ID mapping across services. For quick single-database lookups use gget; for sequence/file manipulation use biopython.

bulk-rnaseq

End-to-end bulk RNA-seq orchestrator — takes raw FASTQ reads through QC and trimming (FastQC, fastp/Trim Galore), alignment and quantification (STAR, Salmon, featureCounts), assembles a gene-level counts matrix, then hands off to differential expression (pydeseq2), pathway/GSEA enrichment (pathway-enrichment), and publication figures (scientific-visualization). Use whenever the user has bulk RNA-seq reads or quant output and wants a complete, reproducible differential-expression workflow — e.g.

cellxgene-census

Query the CZ CELLxGENE Census programmatically for versioned public single-cell and spatial transcriptomics data. Use when you need population-scale cell metadata, gene expression slices, Census summary counts, source H5AD URIs/downloads, embeddings, spatial Census data, or reference atlas comparisons across organisms, tissues, diseases, assays, and cell types. For analyzing your own local single-cell data use scanpy, anndata, or scvi-tools.

cirq

Google quantum computing framework. Use when targeting Google Quantum AI hardware, designing noise-aware circuits, or running quantum characterization experiments. Best for Google hardware, noise modeling, and low-level circuit design. For IBM hardware use qiskit; for quantum ML with autodiff use pennylane; for physics simulations use qutip.

citation-management

Comprehensive citation management for academic research. Search OpenAlex, PubMed, and Google Scholar for papers, extract accurate metadata, validate citations, and generate properly formatted BibTeX entries. This skill should be used when you need to find papers, verify citation information, convert DOIs to BibTeX, or ensure reference accuracy in scientific writing.

clinical-decision-support

Prepare and validate research-only clinical decision-support evaluation, evidence-profile, cohort, survival, biomarker/model, privacy, and governance artifacts. Use for aggregate or synthetic research documentation and traceability—not patient care or live clinical operation.

clinical-reports

Create safety-bounded draft structures and run local deterministic checks for clinical case, diagnostic, trial, safety, and aggregate research reports. Use only with synthetic, de-identified, or aggregate inputs and verified source-fact manifests; every output requires qualified review.

Skills associés