# Spatial prediction uncertainty

> Spatial prediction uncertainty is an open-source agent skill for analytics and data. Maps where a spatial ML soil prediction is reliable, using AOA, DI and LPD. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/ccarbajal16/soil-dsm-skills/tree/main/plugins/dsm-soil/skills/spatial-prediction-uncertainty
- **Repository:** https://github.com/ccarbajal16/soil-dsm-skills
- **GitHub stars:** 13
- **License:** MIT
- **Skill name:** spatial-prediction-uncertainty
- **Collection:** https://github.com/ccarbajal16/soil-dsm-skills
- **Categories:** [analytics and data](https://ai-powered.com/categories/analytics-and-data)
- **Listing updated:** 2026-12-03

## About

This skill guides an agent through producing per-pixel uncertainty for raster machine learning predictions, such as digital soil maps and nutrient or soil organic carbon products. It pairs a distributional view (prediction intervals from quantile regression forests, ensemble spread or conformal prediction) with a coverage view that shows whether the model has seen data similar to each location. The coverage side relies on the area of applicability, dissimilarity index and local data point density, computed with the R CAST package.

The workflow starts with an honest cross-validation chosen to match the sampling structure, since the applicability threshold depends on its nearest-neighbour distances. The agent then masks predictions to the applicability area, adds a density layer, and can calibrate dissimilarity or density values into expected error for a performance map. It also covers evaluating intervals with coverage and proper scoring rules, and using low-coverage zones to plan new sampling.

The skill expects a raster prediction stack, training data with coordinates, and R with the CAST package. General validation metrics are delegated to a companion skill in the same plugin.

## When your agent uses it

> Quantify, map, and communicate the uncertainty of a spatial ML prediction on BOTH axes — distributional ("how variable is the outcome here?") and epistemic coverage ("has the model even seen anything like here?"). Use when you need honest per-pixel uncertainty for a digital soil map, nutrient/fertility map, SOC prediction, or any raster ML product: prediction intervals, the area of applicability (AOA), the dissimilarity index (DI), local data point density (LPD), a DI/LPD→performance map, and targeted resampling of low-coverage zones. Triggers: "area of applicability", "AOA", "dissimilarity index", "DI", "local data point density", "LPD", "CAST", "aoa()", "where can I trust this map", "extrapolation risk", "prediction uncertainty map", "conformal prediction", "proper scoring rule / CRPS", "mask the map where the model is guessing".

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ccarbajal16/soil-dsm-skills/tree/HEAD/plugins/dsm-soil/skills/spatial-prediction-uncertainty)
- [License: MIT](https://github.com/ccarbajal16/soil-dsm-skills/tree/HEAD/plugins/dsm-soil/skills/spatial-prediction-uncertainty)

## Features

- **Per-pixel prediction intervals:** Produces distributional uncertainty from quantile regression forests, ensemble spread or conformal prediction.
- **Area of applicability mask:** Computes dissimilarity index and applicability area to show where the model's error estimate holds.
- **Local data point density:** Counts training points supporting each pixel to grade reliability inside the applicability area.
- **Performance error mapping:** Calibrates dissimilarity or density values into expected RMSE for a per-pixel performance layer.
- **Honest cross-validation setup:** Selects spatial or kNN-based cross-validation matched to clustered or random sampling.
- **Targeted sampling guidance:** Uses low-coverage zones to decide where new field samples would most reduce uncertainty.

## Good for

- Mask a soil organic carbon map to the area where the model is reliable
- Compute prediction intervals for a per-pixel digital soil map
- Identify low-coverage zones to target the next soil sampling campaign
- Calibrate dissimilarity index values into an expected error map
- Check whether prediction interval coverage matches the nominal level

## Install

### Claude Code

This skill ships in the `dsm-soil` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add ccarbajal16/soil-dsm-skills
/plugin install dsm-soil@soil-dsm-skills
```

Or copy only this skill to `~/.claude/skills/spatial-prediction-uncertainty`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ccarbajal16/soil-dsm-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/spatial-prediction-uncertainty &&
cp -R "$tmp/plugins/dsm-soil/skills/spatial-prediction-uncertainty" ~/.claude/skills/spatial-prediction-uncertainty &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/spatial-prediction-uncertainty` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/spatial-prediction-uncertainty` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ccarbajal16/soil-dsm-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/spatial-prediction-uncertainty &&
cp -R "$tmp/plugins/dsm-soil/skills/spatial-prediction-uncertainty" ~/.agents/skills/spatial-prediction-uncertainty &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/spatial-prediction-uncertainty` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/spatial-prediction-uncertainty` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ccarbajal16/soil-dsm-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/spatial-prediction-uncertainty &&
cp -R "$tmp/plugins/dsm-soil/skills/spatial-prediction-uncertainty" ~/.cursor/skills/spatial-prediction-uncertainty &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/spatial-prediction-uncertainty` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ccarbajal16/soil-dsm-skills.git --path plugins/dsm-soil/skills/spatial-prediction-uncertainty
```

Or copy the folder to `~/.gemini/skills/spatial-prediction-uncertainty` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/spatial-prediction-uncertainty`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ccarbajal16/soil-dsm-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/spatial-prediction-uncertainty &&
cp -R "$tmp/plugins/dsm-soil/skills/spatial-prediction-uncertainty" ~/.copilot/skills/spatial-prediction-uncertainty &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/spatial-prediction-uncertainty` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ccarbajal16/soil-dsm-skills.git
```

Then copy `soil-dsm-skills/plugins/dsm-soil/skills/spatial-prediction-uncertainty` into your agent's skills folder as `spatial-prediction-uncertainty`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Spatial prediction uncertainty need to run?

It expects a raster prediction stack, training data and the R CAST package, with functions such as aoa() and knndm().

### When should I use this instead of general validation?

It covers the uncertainty product itself, including intervals, applicability masks and density layers; general cross-validation and accuracy metrics are deferred to a separate soil map validation skill.

### Why are prediction intervals not enough on their own?

The skill explains that quantile forest and ensemble intervals can be tight even where the model is extrapolating, so a coverage layer is also needed.

### How do I install Spatial prediction uncertainty in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/spatial-prediction-uncertainty to use it in all your projects, or to .claude/skills/spatial-prediction-uncertainty in one project. Or install the dsm-soil plugin, which includes it: /plugin marketplace add ccarbajal16/soil-dsm-skills, then /plugin install dsm-soil@soil-dsm-skills.

### Does Spatial prediction uncertainty run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Spatial prediction uncertainty?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Spatial prediction uncertainty?

The closest alternatives to Spatial prediction uncertainty are Spatial statistics areal, Data scientist, Esf satellite data, Market mirror evidence review and Tao finetune kumo forecast.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Spatial statistics areal](https://ai-powered.com/skills/spatial-statistics-areal): Spatial statistics areal is an open-source agent skill for analytics and data.
- [Data scientist](https://ai-powered.com/skills/data-scientist): Data scientist is an open-source agent skill for analytics and data.
- [Esf satellite data](https://ai-powered.com/skills/esf-satellite-data): Esf satellite data is an open-source agent skill for analytics and data.
- [Market mirror evidence review](https://ai-powered.com/skills/market-mirror-evidence-review): Market mirror evidence review is an open-source agent skill for analytics and data.
- [Tao finetune kumo forecast](https://ai-powered.com/skills/tao-finetune-kumo-forecast): Tao finetune kumo forecast is an open-source agent skill for ai models and llm tooling.
- [Datanalysis credit risk](https://ai-powered.com/skills/datanalysis-credit-risk): Datanalysis credit risk is an open-source agent skill for analytics and data.
- [Bigquery AI ML](https://ai-powered.com/skills/bigquery-ai-ml): Bigquery AI ML is an open-source agent skill for databases.

---
Source: https://ai-powered.com/skills/spatial-prediction-uncertainty
