# Soil fertility mapping

> Soil fertility mapping is an open-source agent skill for health and science. Guides an agent through multi-property soil fertility maps and composite fertility indices. 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/soil-fertility-mapping
- **Repository:** https://github.com/ccarbajal16/soil-dsm-skills
- **GitHub stars:** 13
- **License:** MIT
- **Skill name:** soil-fertility-mapping
- **Collection:** https://github.com/ccarbajal16/soil-dsm-skills
- **Categories:** [health and science](https://ai-powered.com/categories/health-and-science)
- **Listing updated:** 2026-12-03

## About

This skill walks an agent through building national or regional maps of several soil properties and nutrients, including texture, pH, CEC, organic carbon, nitrogen, phosphorus, potassium, calcium and bulk density, from harmonized legacy soil records using machine learning. It separates the workflow into per-property mapping, a composite Soil Fertility Index, and uncertainty reporting, and it advises which properties tend to map well (inherent ones such as pH and calcium) and which map poorly (management-driven ones such as available phosphorus and total nitrogen).

The instructions cover data harmonization to a common depth and grid, per-property feature selection, quantile regression forests or ensemble models with per-pixel intervals, and validation with a panel of metrics plus spatial cross-validation. For the index, it describes several routes, including weighted additive scoring, fuzzy zoning, supervised classification and pixelwise expert thresholds, and it recommends Monte-Carlo propagation of uncertainty and applicability masks such as the area of applicability.

The skill is a text guide with no bundled scripts. It refers to external R tools such as CAST and spup, and to a soilquality package, so the user needs soil legacy data, covariate rasters and an R or similar environment to carry out the steps.

## When your agent uses it

> Produce national/regional maps of multiple soil fertility properties and nutrients from harmonized legacy data with machine learning, and integrate them into a composite Soil Fertility Index (SFI) with honest, propagated uncertainty. Use when the goal is a multi-property fertility product (texture, pH, CEC, OC, N, P, K, Ca, BD) at broad scale — a GSNmap-style national soil-nutrient assessment, a fertility/soil-quality index, or region-specific management diagnosis. Triggers: "soil fertility map", "soil fertility index", "SFI", "nutrient mapping", "GSNmap", "map N P K", "soil quality index", "national soil property maps", "map CEC / pH / texture".

## 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/soil-fertility-mapping)
- [License: MIT](https://github.com/ccarbajal16/soil-dsm-skills/tree/HEAD/plugins/dsm-soil/skills/soil-fertility-mapping)

## Features

- **Per-property map workflow:** Steps for predicting each soil property or nutrient separately, with covariate selection and per-pixel uncertainty.
- **Harmonization guidance:** Advice on merging legacy soil records, standardizing depth, lab methods and time windows before modelling.
- **Composite fertility index routes:** Several ways to combine property maps into an index, from weighted scoring to threshold classes.
- **Uncertainty propagation:** Monte-Carlo approach to carry per-pixel property uncertainty into fertility class probabilities.
- **Applicability masking:** Method for marking where a model is reliable, using area of applicability and data-density measures.
- **Validation metric panel:** Recommends reporting several accuracy metrics per property plus spatial cross-validation.

## Good for

- Build a national soil nutrient map from legacy soil sampling records
- Compute a soil fertility index for a region from mapped properties
- Map nitrogen, phosphorus and potassium with honest uncertainty
- Diagnose management limits on fertility for a specific area
- Classify soil fertility zones and report where the classification is reliable

## 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/soil-fertility-mapping`:

```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/soil-fertility-mapping &&
cp -R "$tmp/plugins/dsm-soil/skills/soil-fertility-mapping" ~/.claude/skills/soil-fertility-mapping &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/soil-fertility-mapping` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/soil-fertility-mapping` 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/soil-fertility-mapping &&
cp -R "$tmp/plugins/dsm-soil/skills/soil-fertility-mapping" ~/.agents/skills/soil-fertility-mapping &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/soil-fertility-mapping` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/soil-fertility-mapping` 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/soil-fertility-mapping &&
cp -R "$tmp/plugins/dsm-soil/skills/soil-fertility-mapping" ~/.cursor/skills/soil-fertility-mapping &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/soil-fertility-mapping` 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/soil-fertility-mapping
```

Or copy the folder to `~/.gemini/skills/soil-fertility-mapping` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/soil-fertility-mapping`:

```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/soil-fertility-mapping &&
cp -R "$tmp/plugins/dsm-soil/skills/soil-fertility-mapping" ~/.copilot/skills/soil-fertility-mapping &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/soil-fertility-mapping` 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/soil-fertility-mapping` into your agent's skills folder as `soil-fertility-mapping`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need before Soil fertility mapping can be used?

It assumes harmonized legacy soil data and environmental covariate layers such as climate, terrain and parent material, and it points to external R tools like CAST and spup for parts of the workflow.

### Which soil properties does Soil fertility mapping cover?

Texture, pH, CEC, organic carbon, nitrogen, phosphorus, potassium, calcium and bulk density.

### Does Soil fertility mapping predict nitrogen and phosphorus well?

The skill states that management-driven properties such as available phosphorus and total nitrogen typically map poorly from environmental covariates and should carry lower confidence.

### Does Soil fertility mapping include scripts?

No, the skill folder contains only the SKILL.md instructions with no bundled scripts.

### How do I install Soil fertility mapping in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/soil-fertility-mapping to use it in all your projects, or to .claude/skills/soil-fertility-mapping 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 Soil fertility mapping 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 Soil fertility mapping?

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 Soil fertility mapping?

The closest alternatives to Soil fertility mapping are Digital soil mapping workflow, ML for soil prediction, Soil map validation, Soil quality index and Ensemble ML for soil.

## Where this comes from

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

## Alternatives

- [Digital soil mapping workflow](https://ai-powered.com/skills/digital-soil-mapping-workflow): Digital soil mapping workflow is an open-source agent skill for health and science.
- [ML for soil prediction](https://ai-powered.com/skills/ml-for-soil-prediction): ML for soil prediction is an open-source agent skill for health and science.
- [Soil map validation](https://ai-powered.com/skills/soil-map-validation): Soil map validation is an open-source agent skill for health and science.
- [Soil quality index](https://ai-powered.com/skills/soil-quality-index): Soil quality index is an open-source agent skill for health and science.
- [Ensemble ML for soil](https://ai-powered.com/skills/ensemble-ml-for-soil): Ensemble ML for soil is an open-source agent skill for health and science.
- [Soc stock mrv](https://ai-powered.com/skills/soc-stock-mrv): Soc stock mrv is an open-source agent skill for health and science.
- [Hybrid process ML soc](https://ai-powered.com/skills/hybrid-process-ml-soc): Hybrid process ML soc is an open-source agent skill for health and science.
- [Rothc temporal modelling](https://ai-powered.com/skills/rothc-temporal-modelling): Rothc temporal modelling is an open-source agent skill for health and science.

---
Source: https://ai-powered.com/skills/soil-fertility-mapping
